Add new dictionary functions and extern declarations#5947
Merged
Conversation
Added new functions for dictionary operations and updated extern declarations.
Conditionally include c_char and c_int based on Python version.
Tpt
reviewed
Apr 4, 2026
Contributor
Author
|
@Tpt and @davidhewitt, mind reviewing this and #5949 again? |
davidhewitt
requested changes
Apr 11, 2026
Removed PyObject_GenericGetDict function declaration for non-limited API.
Removed unused import of c_void for non-limited API.
Comment out the PyDict_SetDefaultRef function definition for specific Python versions.
Tpt
reviewed
Apr 17, 2026
Co-authored-by: Thomas Tanon <thomas@pellissier-tanon.fr>
Co-authored-by: Thomas Tanon <thomas@pellissier-tanon.fr>
Tpt
approved these changes
Apr 17, 2026
auto-merge was automatically disabled
April 17, 2026 17:09
Head branch was pushed to by a user without write access
davidhewitt
pushed a commit
to davidhewitt/pyo3
that referenced
this pull request
May 1, 2026
* Add new dictionary functions and extern declarations Added new functions for dictionary operations and updated extern declarations. * Add PyDict_SetDefaultRef function declaration * Create 5947.added.md * Fix syntax errors in dictobject.rs configuration flags * Reorder imports in dictobject.rs * Update PyDict_SetDefaultRef and PyDict_Pop signatures * Fix pointer type in PyDict_SetDefaultRef function * Fmt * Fix conditional compilation directive for PyDict_SetDefaultRef * Update conditional compilation for PyDict_SetDefaultRef * Change key parameter type from char to c_char * Update imports for Python version compatibility Conditionally include c_char and c_int based on Python version. * Fix typo in import statement for c_int * Reintroduce PyDict_SetDefaultRef for Python 3.15 * Fix cfg attribute syntax in dictobject.rs * Reorganize use statements in dictobject.rs * Remove PyObject_GenericGetDict declaration Removed PyObject_GenericGetDict function declaration for non-limited API. * Remove unused c_void import in dictobject.rs Removed unused import of c_void for non-limited API. * Update PyDict_SetDefaultRef for Python 3.13 compatibility * Comment out PyDict_SetDefaultRef function Comment out the PyDict_SetDefaultRef function definition for specific Python versions. * Member naming Co-authored-by: Thomas Tanon <thomas@pellissier-tanon.fr> * Mark function as part of Stable API as of 3.15 Co-authored-by: Thomas Tanon <thomas@pellissier-tanon.fr> * Reorder dictobject.rs to mirror upstream C header * Space * Add GraalPy conditional compilation for dict functions --------- Co-authored-by: Thomas Tanon <thomas@pellissier-tanon.fr>
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.
Added new functions for dictionary operations and updated extern declarations.