[Python-ideas] Code version evolver

Chris Angelico rosuav at gmail.com
Fri Mar 15 15:56:22 EDT 2019

On Sat, Mar 16, 2019 at 5:43 AM francismb <francismb at email.de> wrote:
> On 3/14/19 9:47 PM, Chris Angelico wrote:
> > What happens when someone wants to support multiple Python versions?
> > "Requires Python 3.5 or newer" is easy. Forcing people to install the
> > correct one for each version isn't.
> What are the reasons why people want to support multiple Python
> versions, on the 3 series? do they really want? or they need to (may
> be)? and for how many versions, "from 3.5 or newer" ... forever? will be
> reasonable possible? IMHO more versions to support, the harder to support.

People who care about backward compatibility will usually have some
definition of what they support, such as "this app will run on any
Python version shipped by a currently-supported Debian release" (which
at the moment means supporting Python 3.4, shipped by Debian Jessie),
or "we support back as far as isn't too much of a pain" (which usually
means committing to support everything starting from the version that
introduced some crucial feature). Either way, there's not usually a
"forever", but potentially quite a few versions' worth of support.

The same is true of books that discuss the language, blog posts giving
tips and tricks, Stack Overflow answers, and everything else that
incorporates code that people might want to copy and paste. What
version of Python do you need? What's the oldest that it still works
on, and what's the newest before something breaks it?
Backward-incompatible changes make that EXTREMELY hard.
Backward-compatible changes make it only a little bit harder, as they
set a minimum but not a maximum.

You want to see how bad it can be? Go try to find out how to do
something slightly unusual with React.js. Stack Overflow answers
sometimes have three, four, or even more different code blocks, saying
"this if you're on this version, that for some other version".


More information about the Python-ideas mailing list