Skip to content

gh-127750: Restore inspect and pydoc support of singledispatchmethod #130309

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Feb 19, 2025

The code is still flawed, because it does not recognize class and static methods, and the first argument is not removed from the signature of bound methods, but at least it does not worse than in 3.13 and older.

…ethod

The code is still flawed, because it does not recognize class and static
methods, and the first argument is not removed from the signature of
bound methods, but at least it does not worse than in 3.13 and older.
@serhiy-storchaka
Copy link
Member Author

This is a follow up of #130008.

@AA-Turner, I do not know whether this is enough for Sphinx. If not, we will find other solution. Sphinx itself can use a workaround (in can_document_member()) similar to the code used for property, and it may even be more reliable, but we will try to not break old Sphinx.

@serhiy-storchaka serhiy-storchaka merged commit 10b3205 into python:main Feb 20, 2025
42 checks passed
@serhiy-storchaka serhiy-storchaka deleted the pydoc-singledispatchmethod branch February 20, 2025 09:08
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 20, 2025
…spatchmethod (pythonGH-130309)

The code is still flawed, because it does not recognize class and static
methods, and the first argument is not removed from the signature of
bound methods, but at least it does not worse than in 3.13 and older.
(cherry picked from commit 10b3205)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 20, 2025
@bedevere-app
Copy link

bedevere-app bot commented Feb 20, 2025

GH-130340 is a backport of this pull request to the 3.13 branch.

serhiy-storchaka added a commit that referenced this pull request Feb 20, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 20, 2025
…ythonGH-130309) (pythonGH-130340)

(cherry picked from commit 68c57d6)

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit 395335d)
(cherry picked from commit 10b3205)
serhiy-storchaka added a commit that referenced this pull request Feb 20, 2025
…0309) (GH-130340) (GH-130341)

(cherry picked from commit 68c57d6)

(cherry picked from commit 395335d)
(cherry picked from commit 10b3205)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant