Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don’t think there have been significant backwards-incompatible changes in Python 3 the language. There have been some, e.g. async and await were first introduced as soft keywords and then switched to being actual ones. But that’s not all that different from the treatment of yield in Python 2.

(Recent stdlib changes have been much more destructive, but I’m assuming that, like in the original thread, we’re drawing a distinction between those and changes to the actual language.)

Full disclosure, I welcomed Python 3, because for me that was the first time (since 2.4 on Windows XP) that I could count on my programs not randomly shitting their pants upon encountering Cyrillic in files or filenames, which for a native speaker of Russian you can imagine is quite important. (The csv stdlib module in Python 2 did that, IIRC. Perhaps I was holding it wrong, but experience shows that absolutely everybody did.)



One that bit me was the change to StopIteration propagating through chained generators, following PEP 479. Nothing huge, but I had to patch some previously working code to accommodate the new language release.


I think basically every new python version removes some standard libs and marks new ones as deprecated (at least 3.13 did), that’s potentially breaking.


Incompatible library changes do happen, but the 3.11–13 removals, or more specifically PEP 594[1] removals, were abnormally destructive.

[1] https://peps.python.org/pep-0594/


The bytecode format changes, too, as does the C ABI (although they're making improvements on the latter front - there's supposed to be a more stable subset now). But more recently, they committed to a proper scheduling procedure for standard library deprecations and removals.


It's still amazing to me that the old `csv` module expected you to open the file in binary mode. (This was fixed in 3.1 - the 3.0 release was honestly quite premature.)


And to this day it somehow has its own universal newlines implementation. Perhaps there’s a reason for that, but I’ve never heard of one.


Wait, what? I'm going to have to investigate that.


Footnote 1 (the only one) on https://docs.python.org/3/library/csv.html.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: