Hacker News new | ask | show | jobs
by fwdpropaganda 2917 days ago
Hey, does anyone know where to find information about how python's releases are structured? For example, 3.6 exists and 3.7 is released. Without looking at the release details, should I be upgrading? Should I assume that it will break stuff, or assume that it won't, or should I make no assumptions? Etc...
2 comments

3.6 to 3.7 is a minor release, only supposed to have new features, and not break existing code. Obviously, the probability of bugs is higher than in a micro release (e.g. 3.6.2 to 3.6.3), which only contains bugfixes. But I can't remember code from 2.6 breaking on 2.7, nor code from 3.5 breaking on 3.6.
Only point releases are support to avoid breaking code (though they sometime do).

Minor release may break code, though it should be rare. Python 3.7 reserves 'async' and 'await' as keywords so assignments like "async = 3", which worked in 3.6, will now fail.

Python has a deprecation warning system which can detect cases like this, but it must be enabled:

  % python -Wall
  Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
  [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> async = 3
  <stdin>:1: DeprecationWarning: 'async' and 'await' will become
  reserved keywords in Python 3.7
I personally never encounter that. However, there is a breaking stuff in this release: await and async are now keywords. This means that although they were part syntax we could make variable variables with these name until 3.6 but now it is not allowed.