You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and because these methods don't have a __module__ available (maybe they should?), we end up with the above exception.
Should we special case deprecated classes and other objects using the warnings.deprecated decorator in pydoc to display specific information? I don't think it's relevant to show the __new__ and __init_subclass__ overridden methods in the documentation output.
Bug report
Bug description:
Steps to reproduce:
testmodule.py
):This will raise a
TypeError
:warnings.deprecated
is defining custom__new__
and__init_subclass__
methods:cpython/Lib/warnings.py
Lines 588 to 615 in 6e1e780
and because these methods don't have a
__module__
available (maybe they should?), we end up with the above exception.Should we special case deprecated classes and other objects using the
warnings.deprecated
decorator in pydoc to display specific information? I don't think it's relevant to show the__new__
and__init_subclass__
overridden methods in the documentation output.CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: