# Bug report ### Checklist - [X] I am confident this is a bug in CPython, not a bug in a third-party project - [X] I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc), and am confident this bug has not been reported before ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux ### Output from running 'python -VV' on the command line: _No response_ ### A clear and concise description of the bug: Calls to PyDict_GetItem() should be replaced with PyDict_GetItemRef(). PyDict_GetItemWithError() may also be replaced with PyDict_GetItemRef(). <!-- gh-linked-prs --> ### Linked PRs * gh-108309 * gh-108371 * gh-108372 * gh-108381 * gh-108426 <!-- /gh-linked-prs -->
Activity
pythongh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef()
pythongh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef()
gh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef() (#108309)
pythongh-108308: config_dict_get() uses PyDict_GetItemRef()
pythongh-108308: config_dict_get() uses PyDict_GetItemRef()
pythongh-108308: Replace _PyDict_GetItemStringWithError()
pythongh-108308: Replace _PyDict_GetItemStringWithError()
pythongh-108308: Replace _PyDict_GetItemStringWithError()
pythongh-108308: Replace _PyDict_GetItemStringWithError()
pythongh-108308: Replace _PyDict_GetItemStringWithError()
gh-108308: Replace _PyDict_GetItemStringWithError() (#108372)
gh-108308: config_dict_get() uses PyDict_GetItemRef() (#108371)
pythongh-108308: Use PyDict_GetItemRef() in moduleobject.c
pythongh-108308: Use PyDict_GetItemRef() in moduleobject.c
gh-108308: Use PyDict_GetItemRef() in moduleobject.c (#108381)
pythongh-108308: Remove _PyDict_GetItemStringWithError() function
gh-108308: Remove _PyDict_GetItemStringWithError() function (#108426)
vstinner commentedon Aug 24, 2023
PyDict_GetItem() and PyDict_GetItemString() are no longer used in Python code base.
I added PyDict_ContainsString() and removed the _PyDict_GetItemStringWithError() function.
I consider that the work is now done here, I close the issue. Thanks to everyone who helped with reviews :-)