gh-76961: Fix the PEP3118 format string for ctypes.Structure by eric-wieser · Pull Request #5561 · python/cpython · GitHub

github.com

Tin mới

eric-wieser:ctypes-padding

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs #76961

BUG: Cannot convert ctypes struct into numpy array numpy/numpy#10528

Numpy does not recognize ctypes arrays with c_wchar field numpy/numpy#10100

bpo-32780: Fix the PEP3118 format string for ctypes.Structure

BUG: np.dtype(ctype) does not respect endianness numpy/numpy#10533

WIP: Remove fragile use of __array_interface__ in ctypeslib.as_array numpy/numpy#10970

bpo-32782: PEP3118 itemsize of an empty ctypes array should not be 0 #5576

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

awaiting core review

BUG: np.dtype(ctypes.Structure) does not respect _pack_ field numpy/numpy#10532

View reviewed changes

fix incorrect name and documentation

remove the heap allocation as requested

Merge branch 'main' into ctypes-padding

memoryview & ctypes: incorrect itemsize for empty array #76963

View reviewed changes

Update Misc/NEWS.d/next/Core and Builtins/2018-02-05-21-54-46.bpo-327…

Apply suggestions from code review

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Gentoo Installed with X 3.x has failed when building commit 90d85a9.

gh-76961: Possible fix for buildbot failures in test_pep3118 #101587

: Fix buildbot failures in test_pep3118 (