Hi Jakub,



I agree we don't need to support python 2. But then, if the script(s) are 
not compatible with Python 2, shouldn't we explicitly request Python 3 in 
the shebang? That way it will work even on a less up-to-date system that has
both Python 2 and 3, but has 2 as the default...




Cheers,

Jiri

---------- Původní e-mail ----------
Od: Jakub Jermář <[email protected]>
Komu: [email protected]
Datum: 1. 7. 2020 20:31:51
Předmět: Re: [HelenOS-devel] Python 3 vs python 2
"
Hi Jiri,


On 6/30/20 12:40 PM, Jiri Svoboda wrote:

"
Hi,




I upgraded to Fedora 32, which has Python 3 as the system default python. 
tools/ew.py stopped working because module thread does not exist in Python 3
(was renamed to _thread). I don't know if it's possible to make it work both
with Python 2 and Python 3. All our python scripts run system default Python
(whether it is 2 or 3).




Anybody knows what is the right approach to solving this? Somehow make the
script work with both versions (how?). Request Python 2 explicitly? Change
it to work with Python 3 and request Python3 explicitly?




Any suggestions from somebody more knowledgeable in our Python scripts?
"
there were more issues than _thread. Python 3 also does not support has_key(
). I fixed both of these in commit 663f445f6ae6d51eff8cb7bcc345d4a411d3ff7e.

I think we should simply switch to Python 3 and ditch Python 2 wherever some
issues pop up.


Cheers,


Jakub

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel
"
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to