Skip to content

[_cffi_backend] Improve CField, CType, _CDataBase, buffer#15530

Draft
mildsunrise wants to merge 4 commits intopython:mainfrom
mildsunrise:patch-1
Draft

[_cffi_backend] Improve CField, CType, _CDataBase, buffer#15530
mildsunrise wants to merge 4 commits intopython:mainfrom
mildsunrise:patch-1

Conversation

@mildsunrise
Copy link

these were verified against implementation code. the docs are not very precise on some of these things, but I think it's clear all this is intended to be public facing API. CType in particular will be documented better as part of python-cffi/cffi#231.

draft because I still need to resolve the style issues (so far I can only see (1) replacing Optional with | None, and (2) importing Self from _typing_extensions).

I also need to see if Python/typeshed allows structural typing (because available CType fields vary depending on the value of kind)

mildsunrise and others added 4 commits March 20, 2026 06:35
the implementation really doesn't allow other objects being passed, and I see other stubs doing this, so I presume it's okay?
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator

srittau commented Mar 20, 2026

LGTM, I'll merge this when you undraft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants