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

Antoine Pitrou solipsis at pitrou.net
Mon Nov 6 06:58:56 EST 2017


On Mon, 6 Nov 2017 12:45:27 +0100
Antoine Pitrou <solipsis at pitrou.net> wrote:
> 
> I'm on the fence on this.
> 
> I was part of the minority who opposed the original decision.  So I
> really appreciate your sentiment.  Since then, I had to deal with a lot
> of very diverse third-party libraries, and I learned that:
> 
> - most third-party libraries don't ever emit PendingDeprecationWarning;
>   they only emit DeprecationWarning. So all their warnings would now be
>   visible by default. (1)
> 
> - release cycles are much shorter on third-party libraries, so it's
>   easier not to notice that one of your dependencies has started
>   changing some of its APIs - maybe you'll notice in 3 months.  Also,
>   perhaps you need a compatibility fallback anyway instead of
>   unconditionally switching to the new version of the API, which adds
>   to the maintenance cost.

Of course, there's also the case where it's own of your dependency's
dependencies, or your dependency's dependency's dependencies, or your
dependency's dependency's dependency's dependencies, that has started
to emit such warning because of how your depencency, or your
dependency's dependency, or your dependency's dependency's dependency,
calls into that library.

Now if you have several such dependencies (or dependencies'
dependencies, etc.), it becomes both likely and annoying to solve /
workaround.


I guess my takeaway point is that many situations are complicated, and
many third-party library developers are much less disciplined than what
some of us would idealistically expect them to be (those developers
probably often have good reasons for that).  For someone who takes care
to only use selected third-party libraries of high maintenance quality,
I'm very +1 on your proposal.  For the more murky (but rather common)
cases of relying on average quality third-party libraries, I'm +0.

Regards

Antoine.




More information about the Python-Dev mailing list