Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data descriptor#115540

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 ourterms of service andprivacy 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-storchakaserhiy-storchaka commentedFeb 15, 2024
edited by bedevere-appbot
Loading

This also fixes inspect.Signature.from_callable() for builtins classmethod() and staticmethod().

…data descriptorThis also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().
@AlexWaygoodAlexWaygood changed the titlegh-112006: Fix inspect.unwrap() for types with the __wrapper__ data descriptorgh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data descriptorFeb 15, 2024
@serhiy-storchaka
Copy link
MemberAuthor

@larryhastings,@1st1, please take a look. It breaks the test added in7c7cbfc (bpo-15008/gh-59213), but I think that it was incorrect.

@serhiy-storchakaserhiy-storchaka merged commit68c79d2 intopython:mainFeb 26, 2024
@serhiy-storchakaserhiy-storchaka deleted the inspect-unwrap branchFebruary 26, 2024 18:07
@serhiy-storchakaserhiy-storchaka added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsFeb 26, 2024
@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestFeb 26, 2024
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().(cherry picked from commit68c79d2)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-115965 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelFeb 26, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestFeb 26, 2024
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().(cherry picked from commit68c79d2)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-115966 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelFeb 26, 2024
serhiy-storchaka added a commit that referenced this pull requestFeb 27, 2024
… a data descriptor (GH-115540) (GH-115966)(cherry picked from commit68c79d2)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull requestFeb 27, 2024
… a data descriptor (GH-115540) (GH-115965)(cherry picked from commit68c79d2)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 Debian PGO 3.11 has failed when building commit4007086.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1024/builds/1553) and take a look at the build logs.
  4. Check if the failure is related to this commit (4007086) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1024/builds/1553

Summary of the results of the build (if available):

==

Click to see traceback logs
remote:Enumerating objects: 12, done.remote:Counting objects:   8% (1/12)remote:Counting objects:  16% (2/12)remote:Counting objects:  25% (3/12)remote:Counting objects:  33% (4/12)remote:Counting objects:  41% (5/12)remote:Counting objects:  50% (6/12)remote:Counting objects:  58% (7/12)remote:Counting objects:  66% (8/12)remote:Counting objects:  75% (9/12)remote:Counting objects:  83% (10/12)remote:Counting objects:  91% (11/12)remote:Counting objects: 100% (12/12)remote:Counting objects: 100% (12/12), done.remote:Compressing objects:   8% (1/12)remote:Compressing objects:  16% (2/12)remote:Compressing objects:  25% (3/12)remote:Compressing objects:  33% (4/12)remote:Compressing objects:  41% (5/12)remote:Compressing objects:  50% (6/12)remote:Compressing objects:  58% (7/12)remote:Compressing objects:  66% (8/12)remote:Compressing objects:  75% (9/12)remote:Compressing objects:  83% (10/12)remote:Compressing objects:  91% (11/12)remote:Compressing objects: 100% (12/12)remote:Compressing objects: 100% (12/12), done.remote:Total 12 (delta 0), reused 0 (delta 0), pack-reused 0From https://github.com/python/cpython * branch                  3.11       -> FETCH_HEADNote:switching to '40070860192a26a46adf59ba2d5d97ba7fea6b2b'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example:  git switch -c <new-branch-name>Or undo this operation with:  git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 4007086019 [3.11] gh-112006: Fix inspect.unwrap() for types where __wrapped__ is a data descriptor (GH-115540) (GH-115965)Switched to and reset branch '3.11'find:‘build’: No such file or directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directorymake[2]:[Makefile:2607: clean-retain-profile] Error 1 (ignored)renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘doParseXmlDecl’ at ./Modules/expat/xmltok.c:1192:13:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘doParseXmlDecl’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1070:9:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1110:7:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~In function ‘utf8_toUtf8’,    inlinedfrom ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,    inlinedfrom ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]  392 |     memcpy(*toP, *fromP, bytesToCopy);|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c:In function ‘parsePseudoAttribute’:./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1 1036 |   char buf[1];|^~~renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11make:*** [Makefile:1852: buildbottest] Error 3

woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull requestMar 4, 2024
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().
adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 25, 2024
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull requestJan 22, 2025
…a data descriptor (pythonGH-115540)This also fixes inspect.Signature.from_callable() for builtins classmethod()and staticmethod().
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@larryhastingslarryhastingsAwaiting requested review from larryhastings

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp