[ 
https://issues.apache.org/jira/browse/RANGER-5133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924997#comment-17924997
 ] 

Madhan Neethiraj edited comment on RANGER-5133 at 2/7/25 6:40 PM:
------------------------------------------------------------------

[~kudivuhadi] - Ranger has moved to Python3 about 5 years back - RANGER-2759. 
The issue reported here is not seen in docker setup of Ranger, which uses 
Python 3.8.10 (and no Python2). The issue was introduced in Python 3.12, with 
the removal of ConfigParser.readfp() - see 
[https://docs.python.org/3/whatsnew/3.12.html#configparser.]

 

BTW, can you update the description with the version of Python used in your 
deployment?

 

I would recommend going with Python 3.8.10, as this is being actively used in 
Ranger CI. 


was (Author: madhan.neethiraj):
[~kudivuhadi] - Ranger has moved to Python3 about 5 years back - RANGER-2759. 
The issue reported here is not seen in docker setup of Ranger, which uses 
Python 3.8.10 (and no Python2). The issue was introduced in Python 3.12, with 
the removal of ConfigParser.readfp() - see 
[https://docs.python.org/3/whatsnew/3.12.html#configparser.]

 

I would recommend going with Python 3.8.10, as this is being actively used in 
Ranger CI. 

> Clarify requirements regarding Python version
> ---------------------------------------------
>
>                 Key: RANGER-5133
>                 URL: https://issues.apache.org/jira/browse/RANGER-5133
>             Project: Ranger
>          Issue Type: Task
>          Components: admin, tagsync, usersync
>    Affects Versions: 2.5.0
>            Reporter: Krzysztof Sobolewski
>            Priority: Major
>
> There are plenty of Python scripts in Ranger, but it's unclear to me what 
> version of Python they should be running on. Our deployment environment 
> contains a fairly recent version of Python 3 (because Python 2 is long EOL), 
> and, for example, the database scripts do not work. For example, we had to 
> make the following change:
> {code:java}
>      fcp = ConfigParser()
>      fcp.optionxform = str
> -    fcp.readfp(config)
> +    fcp.read_file(config)
> {code}
> That's because `readfp` is no longer available in newer Python versions. Or, 
> the escape syntax in strings has changed and newer Python spews a lot of 
> warnings about it (the old syntax is about to be removed in the future).
> So my request here is to clarify that and/or fixup the scripts so they work 
> on current version of Python. Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to