GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — incompatible behaviour between 3.12.0rc1 and previous versions in ctypes · Issue #107940 · python/cpython Closed Labels 3.12only security fixesonly security fixes3.13only security fixesonly security fixesrelease-blockertopic-ctypestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportTesting out 3.12.0rc1 on NumPy, we came across numpy/numpy#24399. I have distilled this down to a reproducer that fails on 3.12.0rc1, but passes on previous versions. Checklist
A clear and concise description of the bugfrom ctypes import Structure, pointer, c_int16, cast, POINTER class Struct(Structure): _fields_ = [('a', c_int16)] Struct3 = 3 * Struct c_array = (2 * Struct3)( Struct3(Struct(a=1), Struct(a=2), Struct(a=3)), Struct3(Struct(a=4), Struct(a=5), Struct(a=6)) ) assert c_array[0][0].a == 1 p_obj = cast(pointer(c_array), POINTER(pointer(c_array)._type_)) obj = p_obj.contents # Works on 3.12, obj is 2d assert obj[0][0].a == 1 p_obj = cast(pointer(c_array[0]), POINTER(pointer(c_array)._type_)) obj = p_obj.contents # Fails on 3.12.0rc1, but works on 3.11 and earlier: obj is not 2d assert obj[0][0].a == 1 Your environment
Edit: 3.12rc1 -> 3.12.0rc1 Linked PRsActivity
MetadataMetadataAssigneesLabels3.12only security fixesonly security fixes3.13only security fixesonly security fixesrelease-blockertopic-ctypestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |