[Python-Dev] Proposal: go back to enabling DeprecationWarning by default

Jakub Wilk jwilk at jwilk.net
Tue Nov 7 16:34:45 EST 2017

* Barry Warsaw <barry at python.org>, 2017-11-06, 15:56:
>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 
>Python 3.6.

"import async" would indeed cause deprecation warning, but that's not 
what ldap3 does. The only uses of the now-keyword "async" in their 
codebase are like this:

   from ..strategy.async import AsyncStrategy
   from .async import AsyncStrategy

These do not provoke deprecation warnings from Python 3.6. (They 
probably should!)

I'm afraid that showing deprecation warnings by default wouldn't have 
helped in this particular case.

Jakub Wilk

More information about the Python-Dev mailing list