Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-100926: Move ctype's pointers cache to StgInfo#131282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
encukou merged 77 commits intopython:mainfromsergey-miryanov:gh-100926-ctypes-pointers-cacheMay 2, 2025
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
77 commits Select commitHold shift + click to select a range
87a974b
Move ctype's pointers cache to StgInfo
sergey-miryanov12600a6
Fix PyCStgInfo_clone for pointer_type
sergey-miryanov2b0d69f
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanovdf2167a
No need to use _ctypes_ptrtype_cache for create_pointer_inst
sergey-miryanovf96ae59
Remove unused st from create_pointer_inst
sergey-miryanov481cf59
It is better to check local cache first
sergey-miryanov96b4dd1
Update Modules/_ctypes/callproc.c
sergey-miryanov4fb5baa
Update Modules/_ctypes/callproc.c
sergey-miryanov758045f
Add news and whatsnew entries
sergey-miryanov2f9285f
Update Modules/_ctypes/_ctypes.c
sergey-miryanovb070ad5
Arrange pointer_type declaration
sergey-miryanovef1e633
Use assertIs to check pointer types in tests
sergey-miryanov6ea410d
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanov3754d3d
Implement pointer-type creation via __pointer_type__
sergey-miryanov10e36e4
Fix _CType_Type
sergey-miryanov29bfe9c
Update Lib/test/test_ctypes/test_c_simple_type_meta.py
sergey-miryanovf8139ff
Fix POINTER and test_creating_pointer_in_dunder_new_1
sergey-miryanove1aaf45
Do not share pointer_type via StgInfo clone
sergey-miryanov82f74ec
Test if PyCStgInfo_clone not share pointer_type cache
sergey-miryanoveacc724
Simplify POINTER
sergey-miryanov0b373d5
Add some extra checks and tests
sergey-miryanov9c49abd
Fix tests for ct_meta with init
sergey-miryanov3c38aa5
Do not use Py_XSETREF if dst already NULL
sergey-miryanovefd4961
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanove251a7d
Add docstrings for POINTER and pointer
sergey-miryanovcdba1f6
Remove import of c-versions of POINTER and pointer
sergey-miryanova241cd9
Remove c-versions of POINTER and pointer
sergey-miryanov8d85624
Remove c-versions of _pointer_type_cache/_ctypes_ptrtype_cache
sergey-miryanovaedc4b2
Add extra test for set_type/PyCPointerType_SetProto
sergey-miryanov6ac84c7
Add test for creating types with factory
sergey-miryanov2373c63
Fix docstrings
sergey-miryanovfc93bc8
Add some tests for pointer
sergey-miryanov5768347
Update news and whatsnew
sergey-miryanova2cff24
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanov87f8cf3
Fix tests
sergey-miryanov5b9891f
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanov85ff1a0
Add few more tests
sergey-miryanovd11af80
Add some more tests
sergey-miryanov6dd1e1a
Update docs
sergey-miryanov33ae038
Update news
sergey-miryanov08bdada
Fix news
sergey-miryanov8505d4b
Add some more tests
sergey-miryanovc1bf7cc
Add more tests for metabases pointers
sergey-miryanovea0bf20
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanovfc3bc33
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanov62d2deb
Try to add thread safety to pointer_type
sergey-miryanov360303f
Revert "Try to add thread safety to pointer_type"
sergey-miryanova2cc961
Add set_non_ctypes_pointer_type
sergey-miryanovdf56541
Add some new test and docstrings for tests
sergey-miryanov283bf96
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanov7d42666
Address some neonene comments
sergey-miryanov0bb389e
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanove31c7e9
Move __pointer_type__ docs to common class variables section
sergey-miryanov56d41e2
Apply suggestions from code review
sergey-miryanov4316ad9
Remove Pointers for ctypes-like types section
sergey-miryanov9c99f9c
Update news entry
sergey-miryanov5753fc9
Update docstring for POINTER and add comments
sergey-miryanov58a1507
Implement _pointer_type_cache as PointerTypeCache proxy
sergey-miryanov7082009
Raise AttributeError if __pointer_type__ is not set
sergey-miryanovf89da96
Fixed POINTER if __pointer_type__ already initialized
sergey-miryanov1afa7b3
Fixed default value for PointerTypeCache.get
sergey-miryanove99277c
Remove setting item in _pointer_type_cache from SetPointerType
sergey-miryanovebed23e
tests: Remove teardown code that now does nothing
encukouc4ee75a
Remove _pointer_type_cache setting
encukou66c68b0
Handle old-style incomplete types
encukou0d2c75b
Document deprecations
encukou8597f6b
Allow setting/deleting __pointer_type__
encukou0b5de27
Allow arbitrary set_type as before
encukou78b6c15
Apply suggestions from code review
sergey-miryanovdfd529c
Merge encukou seggestions from PR
sergey-miryanov2fc600b
Fix typos in test_pointer_set_wrong_type test
sergey-miryanovcb78a03
set_pointer for type should reset type cache
sergey-miryanov4ef57e9
Merge branch 'main' into gh-100926-ctypes-pointers-cache
sergey-miryanovb33890d
get and getitem should consistent
sergey-miryanov0acc2b2
Merge branch 'main' into gh-100926-ctypes-pointers-cache
encukou3129ef5
Wording tweak
encukou8efa28a
Apply suggestions from code review
encukouFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
get and getitem should consistent
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitb33890d368841605e6c1fa607f8c43f0d9f80f51
There are no files selected for viewing
2 changes: 1 addition & 1 deletionLib/ctypes/__init__.py
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.