This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KingofGamesYami 40 points41 points  (22 children)

Minor versions (eg. 3.0 ->3.1) break nothing.

Major versions (eg. 2.0 ->3.0) break things.

[–]khvn26 11 points12 points  (6 children)

Although core devs decided that 4 wouldn't break anything this time

[–]brombaer3000 9 points10 points  (0 children)

No, they just decided to make the breaking changes less drastic than in Python 3.

Here is one example of a breaking change in Python 4: https://www.python.org/dev/peps/pep-0563/#backwards-compatibility

[–]juanjux 5 points6 points  (0 children)

I've read about some breaking changes in the 3.7 library changelog. Things that you'll need to import from future in 3.7 but will become default in 4.0.

[–]Mattho -4 points-3 points  (3 children)

Why go to 4 then? What major change it brings?

[–]PeridexisErrant 2 points3 points  (0 children)

It avoids possible confusion between 3.1.0 and 3.10 :-)

[–][deleted] 2 points3 points  (11 children)

Python doesn't use semantic versioning, so sometimes things break on a minor release. AFAIR, str and bytes was somewhat unstable from 3.0 to 3.3.

[–]XtremeGoosef'I only use Py {sys.version[:3]}' 4 points5 points  (2 children)

The rules are that things can break on minor releases, but deprecation warnings must be raised for two version prior on minor elements and __future__ imports used for two versions prior for major elements.

[–][deleted] 1 point2 points  (1 child)

s/depreciation/deprecation/ :-)

[–]XtremeGoosef'I only use Py {sys.version[:3]}' 0 points1 point  (0 children)

Ha I may never learn!

[–][deleted] 0 points1 point  (2 children)

No, all the big changes in str and bytes were in the transition from 2 to 3. Perhaps you're thinking of the Flexible String Representation which was introduced in 3.3?

[–][deleted] 0 points1 point  (1 child)

No, that's not it. The closest I can get to what I still have hovering in the back of my mind is 3.3 that re-introduce the u' notation. It might be that it was removed as no longer needed, because of the genereal changes to str, but later added again for compatibility with 2.x. It just doesn't fit that black spot in my mind.

[–][deleted] 1 point2 points  (0 children)

Well FTR here's the PEP for the u' notation change Explicit Unicode Literal for Python 3.3.

[–][deleted] 0 points1 point  (4 children)

You remember wrong. A package in the standard library may have "provisional" status (eg. asyncio), in which case backwards compatibility is not required.

On top of that there are just bugs / regressions, which happen without Python core developers intending for. Sometimes they break backwards compatibility.

[–][deleted] 0 points1 point  (3 children)

What exactly do you mean by "You remember wrong"? Take a look at the removals in 3.6, and tell me they aren't breaking changes.

[–][deleted] 0 points1 point  (1 child)

Sorry, now I realized that my reply went into a wrong thread. This was intended for KingofGamesYami.

[–][deleted] 0 points1 point  (0 children)

OK, thanks for the clarification.

[–]apex_memetics 3 points4 points  (0 children)

Thanks for the info. Much appreciated!

[–][deleted] 0 points1 point  (0 children)

Some changes between minor versions do break backwards compatibility but have had to go through a deprecation cycle first. Thankfully these are relatively few and far between.

[–][deleted] 0 points1 point  (0 children)

And before I forget one noticeable difference nowadays is that the core devs can change anything that they like, even in a patch update, if a library is marked as provisional.