Skip to content
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

gh-94808: Cover PyEval_GetFuncDesc function #98300

Merged
merged 3 commits into from
Nov 5, 2022

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 15, 2022

Снимок экрана 2022-10-15 в 23 54 22

This function is very stange. I don't understand:

  • Why it is needed
  • Why it is " object" and not "object"

Related #81826

CC @encukou
Can we deprecate it?

@JelleZijlstra
Copy link
Member

Looks like it's part of the stable ABI, so for the moment we can't get rid of it. It was used in 2.7:

PyEval_GetFuncDesc(func),

@sobolevn
Copy link
Member Author

so for the moment we can't get rid of it.

But, we can at least deprecate it :)

@encukou
Copy link
Member

encukou commented Oct 17, 2022

It's intended to be used with PyEval_GetFuncName, so it appends () in foo() but [space]object in SomeType object. As external API, it's definitely weird.
See #81826 for deprecating them both.

@iritkatriel iritkatriel self-assigned this Nov 5, 2022
@iritkatriel iritkatriel added the needs backport to 3.10 only security fixes label Nov 5, 2022
@iritkatriel iritkatriel merged commit b5f7111 into python:main Nov 5, 2022
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @sobolevn and @iritkatriel, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b5f711185bd11819566068ddf2a74a1402340e2d 3.10

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 5, 2022
@bedevere-bot
Copy link

GH-99126 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Nov 5, 2022
miss-islington added a commit that referenced this pull request Nov 5, 2022
(cherry picked from commit b5f7111)

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

Successfully merging this pull request may close these issues.

6 participants