On 24. 06. 21 0:35, Barry Warsaw wrote:
Miro, what tests (outside of Python itself) do you think may break, and do you
have a way to check that?
Any tests that import from asynchat, asyncore or smtpd (in the tests or in the
tested code, even transitively trough other projects) if DeprecationWarnings
are treated as errors by default -- many projects do this in tests (which is a
very good way to get alerted of such deprecations when they happen) or even in
setup.py (which I found rather weird).
Some examples of such failures with different new DeprecationWarnings from the
recent Python 3.10 pre-releases testing (mostly fixed now):
- jinja2, subprocess-tee, sqlalchemy and more failed to build with Python 3.10:
DeprecationWarning: There is no current event loop (treated as error)
- colcon-ros, ruamel-yaml, flake8 and more failed to build with Python 3.10:
DeprecationWarning: The distutils package deprecated and slated for removal
in Python 3.12 (got it via setuptools usage, treated as error)
- cherrypy failed to build with Python 3.10: pytest exited with no clear error
message [1]
Yes, we have a way to check all Fedora's Python packages by reusing our Python
3.10 pre-releases test-rebuild-everything mechanism, but it takes a few days to
finish the builds and analyze the failures. Test failures caused by
DeprecationWarnings are sometimes not obvious, e.g. not recognizable directly
from the logs -- especially if they obscure some output that's checked for
equality or line count (and all you get in the log is AssertionError: 20 !=
21), or when they exit entire pytest session without any error message
(arguably, that does not happen that often [1]).
When such problems are found, it takes some time to report the problem to
upstreams, fix the problem or workaround it (e.g. by filtering or ignoring the
warning, which is not always trivial, especially when it propagates trough
subprocess [2]).
At this point of the release cycle, I'd rather recognize, triage and report
regressions.
[1] https://github.com/cherrypy/cherrypy/issues/1914#issuecomment-848780246
[2] https://github.com/pytest-dev/pytest/pull/8664
-Barry
On Wed, Jun 23, 2021, at 17:15, Miro Hrončok wrote:
On 23. 06. 21 23:49, Irit Katriel via Python-Dev wrote:
>
> Barry and I are working on a patch to add deprecation warnings in 3.10 when
one
> of these are imported [6]. Let us know if you have any comments on this plan.
With my Fedora Python maintainer hat on, I am not particularly happy about this.
DeprecationWarnings have a tendency to break tests. I assumed Python 3.10.0b1
to be the last release that intentionally breaks things that worked with Python
3.9.
It's not a strong opinion and if there is a consensus that adding new
DeprecationWarnings is not considered "new feature" or "breaking change", I
won't fight it, but it feels wrong.
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
Python-Dev mailing list -- python-dev@python.org <mailto:python-dev@python.org>
To unsubscribe send an email to python-dev-le...@python.org
<mailto:python-dev-le...@python.org>
https://mail.python.org/mailman3/lists/python-dev.python.org/
<https://mail.python.org/mailman3/lists/python-dev.python.org/>
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/PIXK73MXIO7X6P7MDFBSTKTRDR2BWBMH/
<https://mail.python.org/archives/list/python-dev@python.org/message/PIXK73MXIO7X6P7MDFBSTKTRDR2BWBMH/>
Code of Conduct: http://python.org/psf/codeofconduct/
<http://python.org/psf/codeofconduct/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/SI4Z777QAUYQF3P7TOZBBUGQNGZUXBAT/
Code of Conduct: http://python.org/psf/codeofconduct/
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/FWWULFEN2HMDFTHIU2X7ORZNRCXHOGRR/
Code of Conduct: http://python.org/psf/codeofconduct/