EOL Python 2.7 issues

Hi Forum,

With the upcoming EOL of Python 2.7 we realized that for years to come we can not do and we do not want to do without Python 2.7.

Information about how FreeBSD is dealing with the EOL Python 2.7 is hard to find. Does someone know more about the future plans for Python 2.7 on FreeBSD? Please share. Python 2.6 is also still in the ports collection.

There is Tauthon as fork of Python 2.7, but it is not in the ports collection yet. Tauthon would be able to run most Python 3.x code in addition to running all the 2.7 code. So almost no need for Python 3.0.

Tauthon can reduce the pressure on core-development when it is in the ports collection and made compatible with PIP.

Tauthon is on the list wanted ports. According to the list wanted ports Tauthon should be as easy to port as simply cloning lang/python27 into lang/tauthon; it will according to the list need additional integration with PYTHON2_DEFAULT to remove requirement that "python" be in the name.

How to support Tauthon becoming a port in the FreeBSD Ports Collection so long-term support for this fork of the Python 2 programming language, with backported features from 3.x , is guaranteed on our preferred BSD? There are some linux-distro’s that are preparing for Tauthon but we want to stick with FreeBSD. We do not want to migrate to Linux to be able to run Python 2.7 software for ever.

Thank you,
J.
 
This is really not a FreeBSD question. Core FreeBSD does not even install python, it is a port/package that users are free to install if they want, but they don't have to.

Therefore, your argument "Tauthon can reduce the pressure on core-development ..." seems tenuous: core development has nothing to do with Python.

I find the whole debate silly anyway. Python 2.X will not suddenly vanish, it will just not get any updates (not even security updates) starting in January. If you have Python 2 applications, the will continue to run fine, but you may have to security isolate them. Which is a good idea in the first place: Those security holes that exist today and that will NOT be fixed starting in January already exist today, and can already be exploited, so the absence of security updates in the future doesn't actually make them less secure, it just fails to make them more secure.

Furthermore, in my experience porting Python applications from 2 to 3 is typically very easy. I would guess an hour per 1000-2000 lines of source code (in addition to 2to3 doing the heavy lifting). Given that software is expensive to develop and to maintain, this is not a large factor.

But if in your opinion tauthon is a necessary ingredient, feel free to volunteer for the port. Don't expect other people to volunteer to make your life easier.

(I have several 10K lines of home-written Python, in addition to way more that I do at work. At work, the move from 2 to 3 started a long time ago, and AFAIK has been finished several months ago. At home, I just ported the next-to-last application during the Thanksgiving weekend. There is one application with 3K lines that I won't port for a few months, it can continue running in Python2.7, since it is completely security isolated on a host that has air gaps.)
 
In short, FreeBSD will not keep Python 2.7 and everything depending on it will leave togheter; however, as far I know, this is still not defined if that will happen when Python 2.7 reach EOL or if it will be kept for while.

I guess if there is something important depending on Python 2.7 that will be kept for a while to give time to be ported to 3.x; however I would not expect to that be kept for too long either.
 
core development has nothing to do with Python.
Core development has to do with users of Python. Because of the EOL of Python 2.7 these users have to invest in 1000-2000 lines per hour for porting to Python 3 to be able to run software (that runs fine on Python 2.7) with security updates from upstream for the base language of this software. Those users need now to learn Python 3 and invest in 2to3. Where for? The EOL of Python 2.7 kills business on the web.
But if in your opinion tauthon is a necessary ingredient, feel free to volunteer for the port. Don't expect other people to volunteer to make your life easie
Tauthon can make everybody's live easier. With Tauthon there is no need for Python 3. So everybody can always use Python 2.7 with security updates and benefit from the Python 3 features from one and the same python prompt. I do not experience added value from Python 3.
if there is something important depending on Python 2.7 that will be kept for a while to give time to be ported to 3.x
This also makes a point in favour of Tauthon. Porting to an other language is not needed with Tauthon. In a couple of years this is all gone happen again with Python 4.
 
Core development has to do with users of Python. Because of the EOL of Python 2.7 these users have to invest in 1000-2000 lines per hour for porting to Python 3 to be able to run software (that runs fine on Python 2.7) with security updates from upstream for the base language of this software. Those users need now to learn Python 3 and invest in 2to3. Where for? The EOL of Python 2.7 kills business on the web.

To make that simple, FreeBSD is not involved with Python development nor it is in Base then this is a portmgr subject, and they are responsible by the ports system management and not the relation between users and third party software management.

That said, when upstream EOL something, specially when that was noticed with relative advance, that software should leave except if there a very good reason to not, and for the least amount of necessary time.

When that is a minor/irrelevant software that just need a maintainer things may be different because those are minor/irrelevant things. Python involve a ton of effort to maintain and no one is willing to maintain something like that.

Also, Python3 was launched several years ago and then python developers had all the time in the world to learn it and port everything they need to it.

In regards to Tauthon, I had never heard of it but since anyone can maintain a port, you can port it, add to the tree and maintain it. ;)
 
  • Like
Reactions: a6h
Core development has to do with users of Python.
Sorry, no. Core development has to do with the base OS. Python is not part of the base OS. FreeBSD, as it ships, does not come with Python.

Users are free to install it, from ports or packages. When they do, they need to evaluate the risk of installing software that will become obsolete.

Because of the EOL of Python 2.7 these users have to ...
That is true on every OS. If you want to use Python, as shipped by the Python foundation, you will either use a version without security fixes, or port to Python 3.

The EOL of Python 2.7 kills business on the web.
The EOL of Python 2.X has been known for about 10 years. I think about 2010 or so the Python foundation gave a warning that support for Python 2 would end in 2015. When that got close, they changed the end of support to 2020. You have had somewhere between 5 and 10 years of warning. You failed to deal with it. At that scale, that is not Python's problem, nor FreeBSD's problem. If the Python foundation had given you a week or a month of warning, I could understand that you are upset (and even then you would have had no recourse), but with many years of warning, you are being silly.

Tauthon can make everybody's live easier.
Then feel free to perform the port. Anyone can do that.
In a couple of years this is all gone happen again with Python 4.
I doubt that the transition of 3 -> 4 will be similar to the 2 -> 3 transition, but that is at least a decade in the future.

Most importantly: Remember, this is free software. Can you show us the contract you signed where it says that in exchange for your money, someone will provide support? No you can't. FreeBSD is maintained and developed by volunteers. Become one of them, if you want to have a say in decisions going forward. Or hire someone to do it for you. Or donate.
 
Most importantly: Remember, this is free software. Can you show us the contract you signed where it says that in exchange for your money, someone will provide support? No you can't.
The EOL of Python 2.7 looks like a way to make people pay for Open Source Software. People are allowed to build there setup with it, but when it is done you need to hire a developer to migration to Python 3. We can not build our setup on Python 3 because everything we need is written in Python 2.7, and is not gone be migrated by upstream. There is no need for the EOL of Python 2.7. Python 2.7 is perfect. Python 2.7 has no known security issues.
Then feel free to perform the port. Anyone can do that.
If anyone can do it I am gone look in to it. Thank you.
 
I generally stay away from any applications which developers didn't bother to migrate to Python 3. It clearly shows that developers aren't serious about maintaining their application or abandoned their application especially after 10 years of being warned of approaching EOL. They had plenty of time to do it and it's not FreeBSD nor port maintainers' fault. Usually any apps in ports that hasn't been updated or maintained will eventually be removed.
 
I generally stay away from any applications which developers didn't bother to migrate to Python 3. It clearly shows that developers aren't serious about maintaining their application or abandoned their application especially after 10 years of being warned of approaching EOL
Python is not like PHP with all kind of security issues that need to be fixed. Python 2.7 is perfect. There is no technical and no security reason for Python 3. I get the same site on Python 3 as I have on Python 2.7. It is foolish to rebuild an application that works perfect with no issues because of decisions made upstream. Do you also rebuild your house because there are new tools to build it? That is why I like the idea of Tauthon. Tauthon is Python 2.7 with features from Python 3. So you create your software once with Tauthon and add new features later without the need to port to a new language. Without being forced to invest in migration every couple of years because someone think of something new to add to the language.
 
SirDice
The issues you refer to are not the reason for Python 3. There is no need for Python 3 because of those issues. We need security updates for that, no new language. Python 3 shall nothing gone change about that kind of issues.
 
Python is not like PHP with all kind of security issues that need to be fixed. Python 2.7 is perfect. There is no technical and no security reason for Python 3. I get the same site on Python 3 as I have on Python 2.7. It is foolish to rebuild an application that works perfect with no issues because of decisions made upstream. Do you also rebuild your house because there are new tools to build it? That is why I like the idea of Tauthon. Tauthon is Python 2.7 with features from Python 3. So you create your software once with Tauthon and add new features later without the need to port to a new language. Without being forced to invest in migration every couple of years because someone think of something new to add to the language.

That's an absurd statement. Always assume there are security exploits to be found which hasn't been discovered yet. If you want perfect security then disconnect your internet.
 
Juronski as several people have already pointed out, it's not FreeBSD's call. Whenever something is EoL'ed upstream we always end up with the same pointless discussions. If you have a problem with the impending EoL of Python 2.7 you're more than welcome to state your case to the Python developers. Good luck with that.

Simply put, if/when something goes EoL upstream it's EoL for us too. There's nothing to discus here.
 
it's not FreeBSD's call.
You are right. It is an users call. The Python developers are not helpful. Not willing to discuss the issue of the EOL. There is a kind of hostility. Almost immediately received insults form the admin of the forum of the Python Community because I started a thread there about this. It is an EOL without added value. It feels like being trolled. I want to draw the attention to the issues because of this EOL, and that there is no need for always the same pointless discussions when something is EoL’ed upstream. Technically and security wise there is no need for the EOL of Python 2.7.

Python 2.7 is perfect enough to live for ever. It is good enough to even have Python 3 features. The EOL of Python 2.7 is a fact. There is also the problem that PIP en Virtualenv are not compatible with Tauthon. So there is no likewise alternative for the EOL of Python 2.7 on FreeBSD. Some Linux-distro’s already move to Tauthon. To me Tauthon looks like an alternative that can provide all FreeBSD users with best of all worlds (if also the compatibility with PIP and virtualenv is fixed). With Tauthon everybody can have Python 3 features in a Python 2.7 environment. So no need for an EOL discussion what so ever. People who really need all the output of Python 3 are free to use it without forcing all other users in to it.
if/when something goes EoL upstream it's EoL for us too
This is also true. I want an upstream that does not EOL Python 2.7.X. PyPy also does not EOL its 2.7. So maybe I thought more users feel this way so we can make an effort to make all the users happy with an Python 2.7 that does not EOL itself. Because of the EOL of 2.7 I want to promote a Tauthon-port and make awareness for the need. Do not know if I am skilled enough to maintain a Tauthon port, but I am gone look in to it. Contribute if you also want to make an end to always the same pointless discussions whenever something is EoL’ed upstream by the Python Community.
 
Juronski... it's not your call to make and Python is not yours to begin with. It's the developer's decision to discontinue support so they can focus on making Python 3 better and focus on developing version 4. It's absurd to waste so much resources and time on something that's outdated. I'm a Java developer and I would rather work with latest tools to simply my development time and I wouldn't want to get left behind with ancient tools. If someone have a job interview and employer asked the prospective employee if they worked with Python 3 and he/she said no... do you think the employer will hire someone with Python 2 skills when the company is using Python 3? Probably not if they don't have the time or money to train the prospective employee to bring him up to Python 3 level.

Also system admins don't like having multiple Python versions on their server since it's add more workload to keep all the software up to date.

Like SirDice said, there's nothing more to discuss so if you want to complain about Python's EOL then you need to go directly to Python website and complain there. FreeBSD has NOTHING to do with it.
 
Contribute if you also want to make an end to always the same pointless discussions whenever something is EoL’ed upstream by the Python Community.
You mean every 10 years? And if this discussion comes around again in 10 years, I'll happily laugh at any fool who fell into this trap twice. And yes, this goes for swift also.
 
Just gonna leave this here for those 2.x'ers who run across this thread and are interested in migrating their code to 3.x1:

To make your project be single-source Python 2/3 compatible, the basic steps are:
  1. Only worry about supporting Python 2.7
  2. Make sure you have good test coverage (coverage.py can help; pip install coverage)
  3. Learn the differences between Python 2 & 3
  4. Use Futurize (or Modernize) to update your code (e.g. pip install future)
  5. Use Pylint to help make sure you don’t regress on your Python 3 support ( pip install pylint)
  6. Use caniusepython3 to find out which of your dependencies are blocking your use of Python 3 ( pip install caniusepython3)
  7. Once your dependencies are no longer blocking you, use continuous integration to make sure you stay compatible with Python 2 & 3 (tox can help test against multiple versions of Python; pip install tox)
  8. Consider using optional static type checking to make sure your type usage works in both Python 2 & 3 (e.g. use mypy to check your typing under both Python 2 & Python 3).
-- from "The Short Explanation" of Porting Python 2 Code to Python 3

1 I feel Tauthon is useful as a migration tool to Python 3 and should not be regarded as endless life support for Python 2 code that nobody wants to port to Python 3+.
 
Technically ... there is no need for the EOL of Python 2.7.
I respectfully disagree. The Python developers need to spend more time on things that go forward, and less time on doing trailing maintenance on a version that has been obsolescent for 10 years. It's their decision to make, and in my opinion they are smart and experienced enough to make the right one. It's not like folks didn't get enough warning.

Python 2.7 is perfect enough to live for ever.
As is IBM 360 assembly and Autocode. All perfectly fine programming languages, capable of writing useful programs, yet abandoned by their creators (in these examples, abandoned about 60 years ago, although one can still write 360 assembly today and run it on a Z, but nobody does any more). Just because something *can* live forever doesn't mean that it is a good investment of the maintainers time to make it live. And software doesn't survive on its own, it needs continuous maintenance in this day and age.

To me Tauthon looks like an alternative that can provide all FreeBSD users with best of all worlds ...
So maybe I thought more users feel this way so we can make an effort to make all the users happy with an Python 2.7 that does not EOL itself.
Quite possibly true. There is nothing that prevents a random group of people from building a Py2.7-compatible runtime that they want to maintain. It might be a great idea, or it might be a horrible idea (if they do a bad job). If someone wants to volunteer for porting Tauthon (or an alternative Python runtime) to FreeBSD and put it in ports, great. If lots of people think it's a good thing, it will happen as volunteers are found. My personal opinion (from writing and using LOTS of python code, these days it's my main programming language, and from living in Silicon Valley and talking to technology people over coffee): All the serious users started moving to Py3 years ago, and the porting process is done. I've heard from several friends that they turned their Py2 environments off a few months ago as a test, to make sure everything will be ported, and didn't experience problems. At home I'm less strict, but the transition seems to be a non-issue to most.

By the way, what ever happened to Jython? I used to run it (when it was still called JPython) from ~96 to 99, and was pretty happy with it back then. If it is still actively maintained, it might be a good alternative to Tauthon.
 
Sinking deeper and deeper in this EOL rabbit hole I noticed that things are just not true about the statements on python3statement.org. The statement is that Python 3 is needed “to simplify our code and take advantage of the many new features”. First of all: new features can be backported to Python 2.7. And modules improved in Python 3 can also be improved in Python 2.7. The new-features-statement about Python 3 is false.

Than simplicity.

The print function is the most widely known change in Python 3. If you look in to the print function the code is not made more simple in Python 3. It is made more complex. In Python 3 you have to code more to get the same output. So where is the EOL of Python 2.7 really about? Who is really taking advantage? IMO the EOL of Python 2.7 is to make admins go bananas so there bosses pay for development. See for your self:

Print in Python 2:
code: print 'Python', python_version()
output: Python 2.7.6

Print in Python 3:
code: print('Python', python_version())
Output: Python 3.4.1

What a fool I must be to believe that live is simpler now with Python 3.
 
Juronski, I kind of see where you are coming from, I am not a fan of having to ditch a platform because the upstream are effectively deciding to work on another project with the same name (Python 3). However Python2 -> Python3 is not quite like VB6 -> VB.NET; it is an evolution rather than a rewrite. It is very possible to migrate your code. You will probably want to do so before Python 4 comes out and the gap will be larger ;)

But to be honest, your code isn't the issue; as a Python developer you probably have loads of dependencies on random libraries through PIP? These will all inevitably migrate (if they haven't already done so) to Python 3. So you will either be planning to keep with the older (potentially vulnerable) dependencies or you are hoping that tauthon will be providing an adapter between the old and new implementations of Python? In that case your future solutions will be depending on both Python 2.x and 3.x scripts? That isn't very elegant.

When Python 4 comes out, can you garantee that Tauthon will also migrate to that and provide backwards compatibility for 3 and 2?

If you don't like the (almost disposable) nature of Python, you might consider a more stable language like C, C++ or Java.

Note that Perl was in the fairly rare position that the community rejected Perl 6 and kept with Perl 5 so Perl 6 had to fork. You might like to jump ship to Perl (5) for your next project since that community seems to be a little bit more stubborn (which is certainly not a bad thing IMO).
 
Print in Python 2:
code: print 'Python', python_version()
output: Python 2.7.6

Print in Python 3:
code: print('Python', python_version())
Output: Python 3.4.1

As a python newbie, I would assume print is a function. Likewise something like getAge(name) could be a function that returns a number. You would use it like?:

Code:
print(getAge "bob" )
Or possibly:
Code:
print getAge "bob"

No, it wouldn't work. Even in Python 2 you need parenthesis around the parameter:

Code:
print getAge("bob")

Why do we need a parenthesis around "bob" and not the parameters to print? So there seems to be a rule in Python 2 when you do and do not need a parenthesis around the parameter. Possibly it is if you do not need to use the returned value? Who knows? I imagine most developers just add the parenthesis regardless to play it safe.

This is an example where Python 3 is a little cleaner.
Possibly not "easier" for those used to Python 2 but it is more consistent. As you know, consistency and developer sanity are often very much related XD.

But my post is getting off topic. Just because a language version might be better doesn't have any bearing on whether another language should be deprecated. I am also under the opinion that languages that break anything other than the standard library are... crap and backwards compatibility is the least of your worries ;)
 
you probably have loads of dependencies on random libraries through PIP?
A kind of yes. The libraries are chosen not randomly pulled in.
These will all inevitably migrate (if they haven't already done so) to Python 3.
No they will not.
The Python 2 print is a statement.
The Python 3 print is a function.

To enable the print() function in Python 2, you need to add this import statement at the beginning of your source code:
Python:
from __future__ import print_function

Again it proves that there is no reason to EOL 2.7.
 
Thankfully, I don't have any Python code. I can't stand the language to the point I won't even consider software written in Python if there any alternatives.

Heh, running a Python program usually turns into a wild goose chase for a whole slew of dependencies. By the time I have managed to capture them all I am too exhausted to execute the actual program XD

I am not a fan of dependency focused languages. NodeJS, Python and (unfortunately) Rust are the worst offenders!
 
  • Thanks
Reactions: a6h
Back
Top