[Python-Dev] Proposal: go back to enabling DeprecationWarning by default
barry at python.org
Mon Nov 6 18:56:24 EST 2017
Nick Coghlan wrote:
> On the 12-weeks-to-3.7-feature-freeze thread, Jose Bueno & I both
> mistakenly though the async/await deprecation warnings were missing
> from 3.6.
Sometimes the universe just throws synchronicity right in your face.
I'm working on building an internal tool against Python 3.7 to take
advantage of the very cool -X importtime feature. It's been a fun
challenge, but mostly because of our external dependencies. For
example, PyThreadState renamed its structure members, so both Cython and
lxml needed new releases to adjust for this. That's the "easy" part;
they've done it and those fixes work great.
We also depend on ldap3 <https://pypi.org/project/ldap3/>. Suddenly we
get a SyntaxError because ldap3 has a module ldap3/strategy/async.py. I
say "suddenly" because of course *if* DeprecationWarnings had been
enabled by default, I'm sure someone would have noticed that those
imports were telling the developers about the impending problem in
This just reinforces my opinion that even though printing
DeprecationWarning by default *can* be a hardship in some environments,
it is on the whole a positive beneficial indicator that gives developers
some runway to fix such problems. These types of apparently sudden
breakages are the worse of all worlds.
More information about the Python-Dev