Skip to content

gh-94808: Cover PyEval_GetFuncDesc function - #98300

Merged
iritkatriel merged 3 commits into
python:mainfrom
sobolevn:cover-pyeval-get-function-desc
Nov 5, 2022
Merged

iritkatriel merged 3 commits into
python:mainfrom
sobolevn:cover-pyeval-get-function-desc

Conversation

@sobolevn

@sobolevn sobolevn commented Oct 15, 2022 •

Copy link
Copy Markdown
Member

Снимок экрана 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
Copy Markdown
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
Copy Markdown
Member Author

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

But, we can at least deprecate it :)

@encukou

encukou commented Oct 17, 2022 •

Copy link
Copy Markdown
Member

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 merged commit b5f7111 into python:main Nov 5, 2022
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
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
…honGH-98300)

(cherry picked from commit b5f7111)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot

Copy link
Copy Markdown

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 <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

7 participants