Skip to content

[mypyc] Replace deprecated _PyDict_GetItemStringWithError - #17930

Merged
JukkaL merged 2 commits into
python:masterfrom
cdce8p:replace-deprecated-cpython-function-2
Oct 16, 2024
Merged

[mypyc] Replace deprecated _PyDict_GetItemStringWithError#17930
JukkaL merged 2 commits into
python:masterfrom
cdce8p:replace-deprecated-cpython-function-2

Conversation

@cdce8p

@cdce8pcdce8p commented Oct 13, 2024

Copy link
Copy Markdown
Collaborator

_PyDict_GetItemStringWithError was deprecated for Python 3.14 in python/cpython#119855.
Use PyDict_GetItemStringRef instead. It was added in 3.13 but is available via pythoncapi_compat.h.

https://docs.python.org/3/c-api/dict.html#c.PyDict_GetItemStringRef

@cdce8pcdce8p added the topic-mypyc mypyc bugs label Oct 13, 2024

@hauntsaninjahauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this return a strong reference when the old one returned a borrowed reference?

@JukkaLJukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me.

@JukkaL
JukkaL merged commit f63fdb3 into python:masterOct 16, 2024
@cdce8p
cdce8p deleted the replace-deprecated-cpython-function-2 branch October 16, 2024 14:53
hauntsaninja added a commit to hauntsaninja/mypy that referenced this pull request Dec 28, 2024
hauntsaninja added a commit that referenced this pull request Dec 28, 2024
Fixesmypyc/mypyc#1078
Introduced in #17930
See the first commit to see the bug (wrong condition)
---------
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
svalentin pushed a commit that referenced this pull request Dec 30, 2024
Fixesmypyc/mypyc#1078
Introduced in #17930
See the first commit to see the bug (wrong condition)
---------
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-mypycmypyc bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@cdce8p@JukkaL@hauntsaninja