Re:Python 3.7.2 and 3.6.8 are now available
by fromthestart on Monday December 24, 2018 @01:32PM
(#18753495)
Something I've been wondering for years: I understand the rift between 2.x and 3.x.. But what is the rationale for maintaining multiple 3.x branches? And how do I choose the right branch for a fresh project? From experience, it seems like it doesn't really matter.
Re:Python 3.7.2 and 3.6.8 are now available
by shepardrtc on Monday December 24, 2018 @01:42PM
(#18753549)
Per the 3.6 release schedule[1], 3.6 was the stable branch until the final release of 3.7.0. After that, it was to receive two more bug fix releases and then switch over to security fixes. 3.7.0 final was released a few months ago, so this is the last bugfix release for 3.6.x. 3.7.0 is now considered "stable". However, 3.6.8 will still receive security fixes for anyone that is depending on it.
This is generally done for those who want "stable" releases with minimal bug fixes. The 3.7 branch has newer features and therefore, potentially more bugs.
If you want the latest stable version, get 3.7.0. If you want the latest version, get 3.7.2.
Re:Python 3.7.2 and 3.6.8 are now available
by fromthestart on Monday December 24, 2018 @01:50PM
(#18753601)
How does that justify 4 different 3.x branches continually updated in the last year, from 3.4 to 3.7?
That still doesn't explain why it makes sense for python devs to be split among what, 4 different 3.x branches in the last year? I can understand keeping one stable LTS branch and one "up to date" branch, but the current system seems like a waste of resources and extra complexity, though I assume there's a good reason I'm not familiar with. For example, 3.4
.9 was released after 3.7.0. [1]
Maybe I'm just missing something about the numbering scheme?
Re:Python 3.7.2 and 3.6.8 are now available
by theptip on Monday December 24, 2018 @02:13PM
(#18753724)
> I can understand keeping one stable LTS branch and one "up to date" branch
If you did that then lots of distro packagers would just stay on the LTS until the next one comes along, and so you'd increase the number of users that are on older versions. With the selected approach, there is more work involved to backport a fix to the 4-5 supported versions, but this gives the benefit that OS distros can bump their Python versions more frequently, and so end users get updated Python3 features more often.
Re:Python 3.7.2 and 3.6.8 are now available
by ProblemFactory on Monday December 24, 2018 @02:12PM
(#18753718)
All Linux distributions and MacOS ship with Python, and many users of Python stick to the OS-provided version without installing the latest and greatest on their own.
For example, they might only upgrade major Python versions (3.x) once they migrate from Ubuntu 16.04 LTS to 18.04 LTS or even directly four years to 20.04 LTS. Whichever Python version is available by default there becomes the next Python LTS for them.
For now, all versions since 3.4 receive occasional security and bug fixes to make all of them are "stable". New features are only adopted with a major version (3.x) bump.
I have not heard of the Python community complaining about this being too much work - after all improvement work is only done in the latest version, old versions just get backported bug fixes.
Re:Python 3.7.2 and 3.6.8 are now available
by _eht on Monday December 24, 2018 @01:54PM
(#18753620)
On the note of stability, it's interesting to see which Linux distributions ship with which versions. Debian Stretch for instance ships with 3.5.3-1 while Ubuntu 18.04 LTS runs 3.6.5-3.
I know some who would argue that Debian is generally the more stable server and Ubuntu more bleeding edge.
Re:Python 3.7.2 and 3.6.8 are now available
by praseodym on Monday December 24, 2018 @02:13PM
(#18753726)
Debian Stretch was released June 2017 and Ubuntu 18.04, well, in April 2018, so its not too surprising that they ship with different Python versions.
I do find it surprising that Linux distributions don’t always choose upstream LTS versions for their releases, it just feels like a big waste of effort to backport fixes across many versions.
Re:Python 3.7.2 and 3.6.8 are now available
by geezerjay on Tuesday December 25, 2018 @04:20AM
(#18756699)
> Debian Stretch was released June 2017
Actually, Debian Stretch was released in April 2015, and their general freeze was set at November 2016.
Debian spends about 4 years producing a stable release, which excels at stability at the expense of using software releases that are far from the bleeding edge.
Re:Python 3.7.2 and 3.6.8 are now available
by sdoering on Monday December 24, 2018 @01:39PM
(#18753536)
Well, as described in the OC 3.6.8 is a bugfix release for the 3.6 branch. Whoever needs to ensure compatibility with the featureset of 3.6 and not risk incompatibilities with 3.7 but wants bugfixes would use the latest 3.6.
Everybody interested in the new features from 3.7 would use the latest version here.
As python can introduce minor "breaking" changes this is quite a good way of ensuring compatibility.
Re:Python 3.7.2 and 3.6.8 are now available
by jasongrout on Monday December 24, 2018 @01:34PM
(#18753508)
From the announcement in the linked page:
>> Python 3.6.8 is planned to be the last bugfix release of Python 3.6. Per our support policy, we plan to provide security fixes for Python 3.6 as needed through 2021, five years following its initial release.
Re:Python 3.7.2 and 3.6.8 are now available
by stadeschuldt on Monday December 24, 2018 @06:06PM
(#18754777)
For a new project you definitely want to use Python 3 as Python will be EOL in 2020.
For new projects I tend to favor Python 3.7 over 3.6. But sometimes I have to fall back to 3.6 because some packages have not been updated yet and I don't want to install them from Git(Hub) (e.g. GeoPandas through pyproj).
Re:Python 3.7.2 and 3.6.8 are now available
by brianwawok on Monday December 24, 2018 @04:06PM
(#18754268)
A major library I use doesn’t work on 3.7 yet, so still stuck on 3.6. It’s sure nice to get bug fixes and security while I wait for the PR of my library to get merged.
Very rare everyone can jump versions especially when there are syntax changes. In my case it’s around imports.
Re:Python 3.7.2 and 3.6.8 are now available
by qwerty456127 on Monday December 24, 2018 @05:27PM
(#18754626)
I think exactly the same. The only reasons I can imagine are that perhaps a feature can happen to be deprecated between these releases and the internals of the implementation of a particular part can change significantly and this can lead to notable change in performance of a particular algorithm some production service may rely on. As for the right choice for a fresh project - IMHO it's always the latest working version available, even a beta as long as everything you need works fine in it.
Re:Python 3.7.2 and 3.6.8 are now available
by quietbritishjim on Monday December 24, 2018 @02:24PM
(#18753786)
This doesn't invalidate your question, but an interesting comparison: Historically the same situation of fairly regular minor releases was the norm, even for Python 2.x. It was only when Python 3 was released that Python 2.x was fixed on Python 2.7 for a while (for a generous definition of "a while"), so that was the anomaly.
Re:Python 3.7.2 and 3.6.8 are now available
by blattimwind on Monday December 24, 2018 @03:55PM
(#18754225)
> But what is the rationale for maintaining multiple 3.x branches?
Introducing new features bears an elevated risk of breaking thingss. Hence stable systems (and in extension, stable distributions like Debian) tend to use stable, bug and security fix only branches. This used to be more common.
Re:Python 3.7.2 and 3.6.8 are now available
by b_tterc_p on Monday December 24, 2018 @02:47PM
(#18753892)
Dicts now retain order now (in other words all dicts are ordered dicts). I support this, but I also guarantee this is going to bite me in the ass at least once sharing notebooks with someone on an older version of python as I expect to use this liberally. Ah well.
Re:Python 3.7.2 and 3.6.8 are now available
by bratao on Monday December 24, 2018 @02:59PM
(#18753956)
Just to clarify. This behavior is expected since 3.6:
As of Python 3.6, for the CPython implementation of Python, dictionaries remember the order of items inserted. This is considered an implementation detail in Python 3.6; you need to use OrderedDict if you want insertion ordering that's guaranteed across other implementations of Python.
As of Python 3.7, this is no longer an implementation detail and instead becomes a language feature.
Re:Python 3.7.2 and 3.6.8 are now available
by setr on Monday December 24, 2018 @04:20PM
(#18754324)
Even if you stick purely to CPython, it still matters in that there's no guarantee that it'll still be ordered when you update (if you were reading 3.6 dicts). It's not just an implementation detail for CPython, but an implementation detail for specifically CPython 3.6 (and any other version maintaining that status).
So now that its upgraded to language feature, you can actually expect backwards compatibility in future updates.
Re:Python 3.7.2 and 3.6.8 are now available
by JeremyBanks on Monday December 24, 2018 @04:40PM
(#18754411)
The documentation sometimes suggests otherwise, but since there is no Python language specification, declaring something "part of the language" seems to have no meaning if it's not "implemented in CPython".
PyPy has had ordered dicts for longer than CPython, and Jython and IronPython don't look like they're ever going to support Python 3, so I'm not sure who this declaration is even even hypothetically relevant to.
Re:Python 3.7.2 and 3.6.8 are now available
by richardwhiuk on Monday December 24, 2018 @06:09PM
(#18754791)
It's relevant in the fact that you shouldn't rely on it as a programmer prior to this release. Changing it would have been considered a none breaking change.
Re:Python 3.7.2 and 3.6.8 are now available
by jsmeaton on Monday December 24, 2018 @06:07PM
(#18754782)
Forms (and models) in Django are one such thing. When you define fields on a form at the class level, Django maintains a global counter so the fields can retain their order with respect to each other.
Now, with ordered dictionaries, that order is maintained for free.
Kwarg order in functions is also maintained as far as I know.
Re:Python 3.7.2 and 3.6.8 are now available
by b_tterc_p on Tuesday December 25, 2018 @12:30AM
(#18756084)
One thing I do frequently is create an ordered dict where the keys are either regex patterns or lambda functions that return true or false; and the values are some sort of label (let’s say some sort of document type). Then I’ll create a function that will take that ordered dict plus some data, and return the first label that the data conforms to (e.g. regex pattern matches some text input)
This is a handy way of making classification rules for a many stepped process, where certain rules have priority over others. The alternative would be a lengthy set of ifs and elifs which is both ugly and not fun to edit on the fly.
Re:Python 3.7.2 and 3.6.8 are now available
by jacob019 on Monday December 24, 2018 @01:52PM
(#18753615)
A hefty list if improvements to asyncio. When I tried working with asyncio in Python 3.4 it seemed half-baked and unpythonic. I look forward to trying out the more mature implementation.
Re:Python 3.7.2 and 3.6.8 are now available
by uranusjr on Tuesday December 25, 2018 @10:53AM
(#18757820)
I am responsible for maitaining a Python 3.4 asyncio app at work, and recently in charge of building a new (not replacing) system in 3.7. The difference is truly enormous in a very pleasant way.
This is generally done for those who want "stable" releases with minimal bug fixes. The 3.7 branch has newer features and therefore, potentially more bugs.
If you want the latest stable version, get 3.7.0. If you want the latest version, get 3.7.2.
[1] https://www.python.org/dev/peps/pep-0494/
3.7.2 is a maintenance release of the 3.7 series...I am not aware of anyone who considers 3.7.0 the version you should stay with.
That still doesn't explain why it makes sense for python devs to be split among what, 4 different 3.x branches in the last year? I can understand keeping one stable LTS branch and one "up to date" branch, but the current system seems like a waste of resources and extra complexity, though I assume there's a good reason I'm not familiar with. For example, 3.4 .9 was released after 3.7.0. [1]
Maybe I'm just missing something about the numbering scheme?
1.https://www.python.org/downloads
If you did that then lots of distro packagers would just stay on the LTS until the next one comes along, and so you'd increase the number of users that are on older versions. With the selected approach, there is more work involved to backport a fix to the 4-5 supported versions, but this gives the benefit that OS distros can bump their Python versions more frequently, and so end users get updated Python3 features more often.
For example, they might only upgrade major Python versions (3.x) once they migrate from Ubuntu 16.04 LTS to 18.04 LTS or even directly four years to 20.04 LTS. Whichever Python version is available by default there becomes the next Python LTS for them.
For now, all versions since 3.4 receive occasional security and bug fixes to make all of them are "stable". New features are only adopted with a major version (3.x) bump.
I have not heard of the Python community complaining about this being too much work - after all improvement work is only done in the latest version, old versions just get backported bug fixes.
https://devguide.python.org/devcycle/#security-branches
Arbitrary, but not senseless or anything.
If you drill into the security releases, they are pretty small patches backported from later releases, not a huge burden.
I know some who would argue that Debian is generally the more stable server and Ubuntu more bleeding edge.
I do find it surprising that Linux distributions don’t always choose upstream LTS versions for their releases, it just feels like a big waste of effort to backport fixes across many versions.
Actually, Debian Stretch was released in April 2015, and their general freeze was set at November 2016.
Debian spends about 4 years producing a stable release, which excels at stability at the expense of using software releases that are far from the bleeding edge.
Everybody interested in the new features from 3.7 would use the latest version here.
As python can introduce minor "breaking" changes this is quite a good way of ensuring compatibility.
>> Python 3.6.8 is planned to be the last bugfix release of Python 3.6. Per our support policy, we plan to provide security fixes for Python 3.6 as needed through 2021, five years following its initial release.
For new projects I tend to favor Python 3.7 over 3.6. But sometimes I have to fall back to 3.6 because some packages have not been updated yet and I don't want to install them from Git(Hub) (e.g. GeoPandas through pyproj).
There are differences between 3.x releases, and things like security issues or bugs need to be fixed. Saying "well duh just upgrade" isn't acceptable.
Very rare everyone can jump versions especially when there are syntax changes. In my case it’s around imports.
Introducing new features bears an elevated risk of breaking thingss. Hence stable systems (and in extension, stable distributions like Debian) tend to use stable, bug and security fix only branches. This used to be more common.
As of Python 3.6, for the CPython implementation of Python, dictionaries remember the order of items inserted. This is considered an implementation detail in Python 3.6; you need to use OrderedDict if you want insertion ordering that's guaranteed across other implementations of Python.
As of Python 3.7, this is no longer an implementation detail and instead becomes a language feature.
[1] https://stackoverflow.com/questions/39980323/are-dictionarie...
So now that its upgraded to language feature, you can actually expect backwards compatibility in future updates.
PyPy has had ordered dicts for longer than CPython, and Jython and IronPython don't look like they're ever going to support Python 3, so I'm not sure who this declaration is even even hypothetically relevant to.
I think you can be more clear here: all dicts are ordered by insertion order (not by key).
Now, with ordered dictionaries, that order is maintained for free.
Kwarg order in functions is also maintained as far as I know.
This is a handy way of making classification rules for a many stepped process, where certain rules have priority over others. The alternative would be a lengthy set of ifs and elifs which is both ugly and not fun to edit on the fly.