-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warnings.deprecated
doesn't work well with pydoc
#128772
Comments
1 task
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jan 22, 2025
serhiy-storchaka
added a commit
that referenced
this issue
Feb 4, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 4, 2025
…nGH-129177) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 4, 2025
…nGH-129177) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Feb 4, 2025
…nGH-129177) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Feb 4, 2025
…pythonGH-129177) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Feb 4, 2025
…29177) (GH-129654) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Feb 5, 2025
…29177) (GH-129653) (cherry picked from commit 979d766) Co-authored-by: Serhiy Storchaka <[email protected]>
srinivasreddy
pushed a commit
to srinivasreddy/cpython
that referenced
this issue
Feb 7, 2025
cmaloney
pushed a commit
to cmaloney/cpython
that referenced
this issue
Feb 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: