[lug] Running a mixed Python environment

Rob Nagler nagler at bivio.biz
Tue Sep 15 20:24:49 MDT 2020


On Tue, Sep 15, 2020 at 11:34 AM Steve Litt wrote:
> I'm not privy to Dropbox' code, so I can't answer the preceding
> question.

You said people have known the timeline of py2 since 2008 so they had
plenty of time, but Guido had EIGHT YEARS to move Dropbox off py2, and
retired last year before the job was done. That's why it isn't easy for
other folks to not be "surprised" by the 2020 deadline.

BTW, RHEL8 has py2 and therefore py2 will be with us until 2029, at least.

> 2) Be very, very stringent about modularity, encapsulation, and thin
>    interfaces.

Agreed.

> Breaking API interfaces is a crime against the entire software sphere.

Glad we agree.

> I completely understand why once every five years or so, a new version
> of a library or dependency needs to wholesale dispense with the old and
> bring in the new (after a suitable deprecation period).

This is known as second system disease
<https://en.wikipedia.org/wiki/Second-system_effect>, or Steve Yegge's
version:

*If you keep twiddling with something N times, then it implies that not
only did you fuck it up N-1 times, but after a while it’s pretty clear
you’ve probably fucked it up on the Nth try as well.*


> I personally have never been bitten by my Python code breaking with
> minor version Python upgrades.

Here is some of what's breaking in 3.8:

* f((keyword)=arg) is no longer allowed
* Arithmetic operations between subclasses of datetime.date or
datetime.datetime and datetime.timedelta objects now return an instance of
the subclass, rather than the base class
* Dict comprehensions have been synced-up with dict literals so that the
key is computed first and the value second
* The exception asyncio.CancelledError now inherits from BaseException
rather than Exception and no longer inherits from
concurrent.futures.CancelledError
* The _asdict() method for collections.namedtuple() now returns a dict
instead of acollections.OrderedDict
* The csv.DictReader now returns instances of dict instead of a
collections.OrderedDict.

> Another reason is probably because I move
> heaven and earth not to use anything not in the Python standard
> library.

The standard library almost always contains breaking changes (see above).

> I'm a big believer in minimal dependencies.

This avoids the dependency problem, but there's no way we could do what we
do without a lot of dependencies.

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20200915/bf43e69d/attachment.html>


More information about the LUG mailing list