|
|
Subscribe / Log in / New account

Linux distributions and Python 2

Linux distributions and Python 2

Posted Jun 12, 2018 14:56 UTC (Tue) by rbanffy (guest, #103898)
In reply to: Linux distributions and Python 2 by josh
Parent article: Linux distributions and Python 2

One easy way to check is to remove /usr/bin/python and fix whatever breaks by calling /usr/bin/python2.

Anyone publishing software that depends on Python 2 to be at /usr/bin/python is just inviting a lot of future pain.


to post comments

Linux distributions and Python 2

Posted Jun 14, 2018 0:18 UTC (Thu) by NAR (subscriber, #1313) [Link]

I guess the big problem will be site-specific scripts created years ago that run only once in a month, but if they fail, the sysadmin will get a phone call at 2AM.

Linux distributions and Python 2

Posted Jun 14, 2018 8:53 UTC (Thu) by danpb (subscriber, #4831) [Link]

This doesn't even remotely work for non-trivial programs, as there's no way you can have confidence that you've exercised all code paths simply by running it and seeing what breaks. You need to use an automated analysis and/or conversion tool first to check the entire codease, and after that try to execute it and if it works. Even then for non-trivial programs there's still a good chance it is broken. If the app has good unit test coverage this can help, but that's nowhere near foolproof.

Ideally everyone would none the less do the conversion to py3 and accept the risks/pain, but in reality I'd expect many companies will just keep around an ancient python2 version and not touch their apps/scripts :-(


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds