[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MBF for deprecating Python2 usage



> What tearing need is there to change what the command ‘python’ does,
> in
> a backward-incompatible way?

Personally, I'm ready for python to point to python3 now.

I'm tired of writing python 2/3 compatible code because someone _might_
launch a script with "python my_python3_script.py instead of
./my_python3_script.py

Python has been remarkably good at avoiding breakage, but I've seen
other scripting languages have serious incompatibilities with far less
warning.

For example R packages need to be recompiled for point release updates.
Some perl scripts we inherited broke somewhere between perl 5.8 and
5.12.

Users have tools like virtualenv or conda to deal with the
incompatibilities.

It might be useful to add an option to the interpreter where if a
python script is launched without a usr/bin/python2 or usr/bin/python3
header it reports a deprecation warning (either to console or syslog)
so it's easier to find programs that still need updating.

Diane


Reply to: