gh-112026: Deprecate _PyDict_GetItemStringWithError() function#119855
Merged
vstinner merged 1 commit intopython:mainfrom Jun 3, 2024
Merged
gh-112026: Deprecate _PyDict_GetItemStringWithError() function#119855vstinner merged 1 commit intopython:mainfrom
vstinner merged 1 commit intopython:mainfrom
Conversation
Member
Author
|
The function was removed in Python 3.13 alpha1 and added back to Python 3.13 alpha2 by #112119. |
Member
Author
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I do not think we should bother with deprecating the internal C API. It can be removed or changed in incompatible way at any time.
| Py_hash_t hash); | ||
| PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *); | ||
| // PyDict_GetItemStringRef() can be used instead | ||
| Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *); |
Member
Author
There was a problem hiding this comment.
I don't like adding new compiler warnings after beta1. There is no urgency to remove it.
serhiy-storchaka
approved these changes
Jun 1, 2024
Member
|
|
Member
Author
|
numpy and other projects used it. numpy was updated to use PyDict_GetItemStringRef() using pythoncapi-compat. |
mliezun
pushed a commit
to mliezun/cpython
that referenced
this pull request
Jun 3, 2024
barneygale
pushed a commit
to barneygale/cpython
that referenced
this pull request
Jun 5, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this pull request
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
JukkaL
pushed a commit
to python/mypy
that referenced
this pull request
Oct 16, 2024
`_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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.