Skip to content

Fix typo in Py_mod_state_traverse docs#152145

Closed
hydrogen-mvm wants to merge 1 commit into
python:3.15from
hydrogen-mvm:patch-1
Closed

Fix typo in Py_mod_state_traverse docs#152145
hydrogen-mvm wants to merge 1 commit into
python:3.15from
hydrogen-mvm:patch-1

Conversation

@hydrogen-mvm

Copy link
Copy Markdown
Contributor

(Reopening #152144 this time linking to 3.15 branch instead of 3.16.)

I was reading the documentation here for Py_mod_state_traverse:

https://docs.python.org/3.15/c-api/module.html#c.Py_mod_state_traverse

It says at the bottom:

Added in version 3.15: Use [PyModuleDef.m_size] instead to support previous versions.

That confused me, since Py_mod_state_clear said to use m_clear, and Py_mod_state_free said to use m_free. I think the m_size for Py_mod_state_traverse is a copypaste error from the Py_mod_state_size docs (which also says to use m_size).

That said, this API is still very new to me, so please double-check the docs yourselves. This change might also need to be ported to 3.16 docs.

Thanks.

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Jun 25, 2026
@python-cla-bot

python-cla-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

@hugovk

hugovk commented Jun 25, 2026

Copy link
Copy Markdown
Member

Please open this against main, and then we'll backport to 3.15.

See https://devguide.python.org/getting-started/pull-request-lifecycle/#good-prs

And make sure your feature branch is created from main and not 3.15, to avoid pinging dozens of code owners.

https://devguide.python.org/getting-started/pull-request-lifecycle/#step-by-step-guide

@hugovk hugovk closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants