Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-141004: documentpyexpat C API#141259

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

Open
picnixz wants to merge5 commits intopython:main
base:main
Choose a base branch
Loading
frompicnixz:docs/capi/expat-141004

Conversation

@picnixz
Copy link
Member

@picnixzpicnixz commentedNov 8, 2025
edited by github-actionsbot
Loading

The Expat C API does not store a global variable as other C APIs and instead prefer consumers to add both the capsule and the C API pointer in the consumer's state. I don't really llike this but it's probably the best


📚 Documentation preview 📚:https://cpython-previews--141259.org.readthedocs.build/

Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

Thanks for working on these!

Comment on lines +67 to +68
staticinlineint
PyExpat_CheckCompatibility(structPyExpat_CAPI*api)
Copy link
Member

Choose a reason for hiding this comment

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

Eek, this looks like a new feature. We can add this for 3.15, but we should instead document the recipe for older versions.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yes. I will probably split the PR tomorrow but I wanted to have it here to understand why it exists :)

Comment on lines +227 to +247
nitpick_ignore+= [
("c:identifier","XML_Bool"),
("c:identifier","XML_Char"),
("c:identifier","XML_CharacterDataHandler"),
("c:identifier","XML_CommentHandler"),
("c:identifier","XML_DefaultHandler"),
("c:identifier","XML_Encoding"),
("c:identifier","XML_EndElementHandler"),
("c:identifier","XML_EndNamespaceDeclHandler"),
("c:identifier","XML_Error"),
("c:identifier","XML_LChar"),
("c:identifier","XML_Memory_Handling_Suite"),
("c:identifier","XML_Parser"),
("c:identifier","XML_ProcessingInstructionHandler"),
("c:identifier","XML_Size"),
("c:identifier","XML_StartDoctypeDeclHandler"),
("c:identifier","XML_StartElementHandler"),
("c:identifier","XML_StartNamespaceDeclHandler"),
("c:identifier","XML_Status"),
("c:identifier","XML_UnknownEncodingHandler"),
]
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, why isn't Sphinx happy with these?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Because they are in the signature of the functions:

..c:function:: some_rtypesomething(some_type some_param)

It tries to make a cross-reference tosome_type. The C domain is not really friendly when it comes to document interfaces with types that are outside the project and when the external project does not have an intersphinx inventory (we don't use intersphinx either)

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok. If only there were Sphinx maintainers on the core team that could make this easier! :)

XML_Parser parser,\
unsignedlong hash_salt)
Might be NULL for Expat versions prior to 2.1.0.
Copy link
Member

Choose a reason for hiding this comment

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

Up to you, but I'd prefer that we use inline code blocks forNULL.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good catch!

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

Reviewers

@ZeroIntensityZeroIntensityZeroIntensity left review comments

@AA-TurnerAA-TurnerAwaiting requested review from AA-TurnerAA-Turner is a code owner

@hugovkhugovkAwaiting requested review from hugovkhugovk is a code owner

Assignees

No one assigned

Labels

awaiting core reviewdocsDocumentation in the Doc dirskip news

Projects

Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@picnixz@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp