Message397018
typing.io is not referenced in either the tests or the implementation for pydoc. What happens is basically: typing.io is a class, so its derived from object. When formatting the docstring for object, the formatter queries the __module__ attribute of all sub-classes of object, including typing.io, so that it can include the sub-classes in its output:
--------------
Help on class object in module builtins:
class object
| The base class of the class hierarchy.
|
| When called, it accepts no arguments and returns a new featureless
| instance that has no instance attributes and cannot be given any.
|
| Built-in subclasses:
| anext_awaitable
| async_generator
| async_generator_asend
| async_generator_athrow
| ... and 88 other subclasses
|
[...]
--------------
Before the PR this failed, as accessing any typing.io.__module__ printed the warning. |
|
Date |
User |
Action |
Args |
2021-07-05 19:40:12 | srittau | set | recipients:
+ srittau, gvanrossum, docs@python, levkivskyi, JelleZijlstra, miss-islington, xtreak, dgelessus, kj |
2021-07-05 19:40:12 | srittau | set | messageid: <1625514012.14.0.138892136543.issue38291@roundup.psfhosted.org> |
2021-07-05 19:40:12 | srittau | link | issue38291 messages |
2021-07-05 19:40:12 | srittau | create | |
|