News for hackers. Stuff that matters.
Re:Code that will break in Python 4 by ctz on Tuesday January 12, 2016 @11:20AM (#10888234)
Has there actually been a statement that python 4 will be backwards compatible to python 3?
Re:Code that will break in Python 4 by gh02t on Tuesday January 12, 2016 @11:24AM (#10888271)
I believe they said they were going to try very hard to not do major backwards compatible breaking changes again.

> My current expectation is that Python 4.0 will merely be "the release that comes after Python 3.9". That's it. No profound changes to the language, no major backwards compatibility breaks - going from Python 3.9 to 4.0 should be as uneventful as going from Python 3.3 to 3.4 (or from 2.6 to 2.7). I even expect the stable Application Binary Interface (as first defined in PEP 384) to be preserved across the boundary.

http://www.curiousefficiency.org/posts/2014/08/python-4000.h... (which was linked by Guido from his Twitter).

Re:Code that will break in Python 4 by kazagistar on Tuesday January 12, 2016 @11:26AM (#10888287)
... thats stupid. Semver isn't that complicated, and everyone understands what 3.10 means.
Re:Code that will break in Python 4 by cwyers on Tuesday January 12, 2016 @11:44AM (#10888424)
Semver isn't all that OLD; it came out in 2009, I think? (The SemVer site very helpfully doesn't have any dates on it.) Python, meanwhile, came out in 1991. Not having precognition made it difficult for Python to adopt SemVer, and now that they have versioning practices in place there needs to be more than "I like SemVer" as a compelling argument for them to change. Especially since there are reasonable people who have reasonable disagreements with how SemVer works.
Re:Code that will break in Python 4 by mikestew on Tuesday January 12, 2016 @12:12PM (#10888649)
I have nothing to back this up other than my increasingly unreliable memory, but the semantics of SemVer goes back further than 2009. Maybe it wasn't formally written out, but as far back as the 90s that XX.YY.zz could be translated as XX == major changes, breaking changes for APIs, reworked UI for end-user apps. YY == some new functionality, no breaking/major changes. zz == bug fixes.

It probably goes back further than that, and it was probably one of those "everybody knows..." kind of things, but it definitely didn't start to be a widely-known definition a measly seven years ago.

Re:Code that will break in Python 4 by plorkyeran on Tuesday January 12, 2016 @12:42PM (#10888889)
There were a lot of projects informally using what semver defined, but there were also a lot of other popular versioning schemes. Odd minor = unstable version, even minor = stable version used to be pretty popular and is still used by a few projects.

The main thing that helped make SemVer the default assumption was package managers that baked it into the dependency resolution, as until then a project's versioning scheme really didn't matter very much to the users of the project as long as it wasn't completely incomprehensible.

Re:Code that will break in Python 4 by jrochkind1 on Tuesday January 12, 2016 @12:59PM (#10889040)
Well, baking it into dependency resolution is a response to the fact that figuring out if there were breaking changes in any given update becomes intractable as your dependency tree/graph gets large (and multi-levelled), when each dependency uses it's own versioning scheme, no matter how comprehensible they are individually.
Re:Code that will break in Python 4 by jrochkind1 on Tuesday January 12, 2016 @12:57PM (#10889015)
The argument for semver is obviously "you should be able to tell if there are breaking changes between two versions from the version numbers", not "I like semver". You may or may not be persuaded by it, but that's the point of it.
Re:Code that will break in Python 4 by takluyver on Tuesday January 12, 2016 @11:46AM (#10888429)
There's code even in the stdlib which gets the major version by doing strversion[:3] , so it would see 3.10 as 3.1. That could be fixed, but who knows where else that assumption has been made.
Re:Code that will break in Python 4 by theptip on Tuesday January 12, 2016 @12:27PM (#10888783)
There's also code that's going to break `if sys.version_info[0] is not in (2, 3)`, as the article points out -- so bugs are going to need to be fixed either way.
Re:Code that will break in Python 4 by dang on Tuesday January 12, 2016 @03:42PM (#10890214)
> thats stupid

Please don't do this here. From the site guidelines: When disagreeing, please reply to the argument instead of calling names. E.g. "That is idiotic; 1 + 1 is 2, not 3" can be shortened to "1 + 1 is 2, not 3."

https://news.ycombinator.com/newsguidelines.html

Re:Code that will break in Python 4 by gh02t on Tuesday January 12, 2016 @12:40PM (#10888877)
He might have been just using that as a rough number for example purposes. Python does use semver loosely (effbot.org/pyfaq/how-does-the-python-version-numbering-schemae-work.htm).

I expect there probably will be at least some breaking changes in 4.0 or at least major new additions to warrant the major version bump, but I think they want to avoid anything that makes migrating code/libraries anything more than trivial for the majority of users. For 2->3 stuff like print as a function was straightforward, but other stuff like lazy range() or the Unicode strings would actually require people to make significant changes, which stagnated migration.

Re:Code that will break in Python 4 by theptip on Tuesday January 12, 2016 @12:25PM (#10888764)
This. Why would you gratuitously change the major version of a language, if there are no back-incompatible changes?

Everyone understands what 3.100 means, too.

Re:Code that will break in Python 4 by mrmb on Tuesday January 12, 2016 @11:25AM (#10888278)
From Guido: he expects "Python 4.0 will merely be "the release that comes after Python 3.9". That's it. No profound changes to the language, no major backwards compatibility breaks"

http://www.curiousefficiency.org/posts/2014/08/python-4000.h...

Would be nice if it was simply 3.10 not 4.0, as there's much discussion on that too.

Re:Code that will break in Python 4 by rudolf0 on Tuesday January 12, 2016 @11:22AM (#10888250)
Formally, no, but Guido expressed regret that Python 3 broke backwards compatibility, and made intentions of trying to minimize backwards incompatibility for Python 4.
Re:Code that will break in Python 4 by untothebreach on Tuesday January 12, 2016 @11:24AM (#10888265)
I don't have any links but I know there have been statements by core devs that, when/if there is another major version of python being developed, there will be an upgrade path to make the 3->4 transition much better than the 2->3 transition.
Re:Code that will break in Python 4 by daveguy on Tuesday January 12, 2016 @12:47PM (#10888934)
Yeah, they pretty much botched the 2->3 transition. I would love to see a 4 that included a viable 2->4 transition with semantic versioning until then. But Guido&Co are going to do whatever the hell they feel like doing, community be damned. Py2.7 will be forked and going strong long after 2020. Actually 2020 will probably be a Python renaissance when the cruft, incompatibilities, gil, no jit, etc can finally be addressed without the Guido mafia. 2.8 will be what 3 should have been, using deprecation for dated syntax and gradual introduction of new features. Python is open source. There will be a 2.8 regardless of whether Guido is involved.
Re:Code that will break in Python 4 by vegabook on Tuesday January 12, 2016 @02:57PM (#10889901)
> community be damned

couldn't agree more. Yet all the evidence is that they're still using 3.x as their personal little hobby playground. Exhibit A: type annotations. Just because others are doing it. Nobody is asking for this. Even the PEP took ages to approve because even the yes-men had their doubts. Exhibit B: re-invent green threads. There are 15 solutions already.

Where is GPU? Where is multicore? Where is speed?

Where is the leadership?