
On 21.04.2021 13:14, Paul Moore wrote:
On Wed, 21 Apr 2021 at 12:05, M.-A. Lemburg <mal@egenix.com> wrote:
Perhaps we should reconsider making deprecation warnings only visible by explicitly enabling them and instead make them visible by default.
This would create more noise for users, but for the better, since planned changes then become more visible and can be addressed either by silencing the warning (and opening a ticket to get the change addressed) or by fixing the code in a new release.
We've tried this in the past, and the problem is that it hits the wrong people. Users typically can't do anything directly about the warnings, other than report them to the offending packages. So the person hit by the warning then has an indefinite wait while the upstream package fixes the issue (either fully, or just by temporarily suppressing the warning) and releases a new version (which depending on the project release cycles and processes, may not be a straightforward replacement for the previous version).
Isn't that an educational problem ? Adjusting reporting of warnings isn't all that hard:
https://docs.python.org/3/library/warnings.html#the-warnings-filter
Perhaps it's just a usability issue. We could have venvs help us a bit with this by e.g. making such settings "global" per venv, without the user having to configure PYTHONWARNINGS or writing a sitecustomize.py for this purpose.
If package authors were to get into the habit of doing the silencing for their users after opening a ticket, that would probably make the whole process more streamlined and effective.
If that was what actually happened, then maybe this would work. But unfortunately this is open source, and many projects haven't got the resources to make emergency releases to silence a warning for their users.
True, but at the same time, we often find that deprecations are not visible enough by these projects, which then causes a problem further down the road when the deprecation then gets turned into a breaking change.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Experts (#1, Apr 21 2021)
Python Projects, Coaching and Support ... https://www.egenix.com/ Python Product Development ... https://consulting.egenix.com/
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/