Sebastian Rittau <srit...@rittau.biz> added the comment:
We could easily do what Ken did in PR-26811, and add "warnings.filterwarnings("default", category=DeprecationWarning)" to the test, but I would like to understand what is going on first. It seems the warnings are generated by test_builtin_with_more_than_four_children, which doesn't operate on typing directly. Here is a repro, without tests: srittau@blitz:~/Projekte/cpython (typing-io *)$ ./python -Wall Python 3.11.0a0 (heads/main:17f94e2888, Jul 5 2021, 19:19:04) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pydoc >>> import typing >>> doc = pydoc.TextDoc() >>> x = doc.docclass(object) /home/srittau/Projekte/cpython/Lib/pydoc.py:1344: DeprecationWarning: typing.io is deprecated, import directly from typing instead. typing.io will be removed in Python 3.12. if not cls.__name__.startswith("_") and cls.__module__ == "builtins"), /home/srittau/Projekte/cpython/Lib/pydoc.py:1344: DeprecationWarning: typing.re is deprecated, import directly from typing instead. typing.re will be removed in Python 3.12. if not cls.__name__.startswith("_") and cls.__module__ == "builtins"), >>> Same warning when calling "help(object)". This is not great. I assume that it is somehow related to pydoc.docclass() iterating over the the items of typing, but only if typing was imported. Please not that "io" and "re" are not part of typing.__all__. I will investigate more. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38291> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com