r/Python Pythonista 8d ago

News The Move to Python 3 Begins!

As someone who spent decades in the mainframe community, I find it ... humorous ... that there are legacy Python2 code bases that are only just (or have yet to consider!) moving to Python3.

https://www.eveonline.com/news/view/the-move-to-python-3-begins

300 Upvotes

106 comments sorted by

View all comments

51

u/GraphicH 8d ago

Oh lawd. Really? I mean it was painful, I can tell you my company scrambled. I felt really lucky to be on a team where we had used a 3.X version from the get go. The only version, oddly enough, that was a "bumpy" upgrade was 3.13, due to some ... interesting? changes to SSL handling in urllib3. I still question the wisdom of:

https://github.com/urllib3/urllib3/pull/3577/files#diff-f2922ee77cbe0497677cfadf8dff15456050c6670d37d012c9416f37970f0d13R337

Which, essentially changed the behavior of urllib3 without changing the version you had installed, meaning a python 3.X -> 3.13 upgrade would immediately start breaking. Granted they were changing to be in-line with the default in 3.13 but this, plus the fact that requests did not make it easy to specify SSL context means a lot of people were "broken" talking to systems (many out side their control / ability to update the certificates on) using old certificates not compliant with the strict standards.

3

u/brandonZappy 8d ago

I’m still fighting this stupid Python 3.13 SSL thing.

2

u/GraphicH 7d ago

Yes, it was rather irritating and the biggest issue with it is, if I'm using requests or anything that built on top of urllib3, for web scrapping (I am, its a huge part of what my team does) then it's not like I can go politely ask the owner of the website to update their certificate. So we were stuck shimming in a modified SSL Context in multiple places to resolve this.