This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author srittau
Recipients JelleZijlstra, dgelessus, docs@python, gvanrossum, kj, levkivskyi, miss-islington, srittau, xtreak
Date 2021-07-05.17:38:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625506696.57.0.539745958279.issue38291@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-07-05 17:38:16srittausetrecipients: + srittau, gvanrossum, docs@python, levkivskyi, JelleZijlstra, miss-islington, xtreak, dgelessus, kj
2021-07-05 17:38:16srittausetmessageid: <1625506696.57.0.539745958279.issue38291@roundup.psfhosted.org>
2021-07-05 17:38:16srittaulinkissue38291 messages
2021-07-05 17:38:15srittaucreate