Skip to content

Fix typo in Py_mod_state_traverse docs#152144

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

Fix typo in Py_mod_state_traverse docs#152144
hydrogen-mvm wants to merge 647 commits into
python:3.15from
hydrogen-mvm:patch-1

Conversation

@hydrogen-mvm

Copy link
Copy Markdown
Contributor

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.

kyo5uke and others added 30 commits June 7, 2026 19:25
…ntation (python#150901)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Remove references to server.handler_instance. This attribute has been
removed in 2022 by commit 3ae975f.
…lying stream access (python#145957)

TextIOWrapper keeps its underlying stream in a member called
`self->buffer`. That stream can be detached by user code, such as custom
`.flush` implementations resulting in `self->buffer` being set to NULL.
The implementation often checked at the start of functions if
`self->buffer` is in a good state, but did not always recheck after
other Python code was called which could modify `self->buffer`.

The cases which need to be re-checked are hard to spot so rather than
rely on reviewer effort create better safety by making all self->buffer
access go through helper functions.

Thank you yihong0618 for the test, NEWS and initial implementation in
pythongh-143041.

Co-authored-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Since version 3.10, CPython requires OpenSSL 1.1.1 or higher.
Therefore, support for keylogging can be assumed.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
@python-cla-bot

python-cla-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@hydrogen-mvm

Copy link
Copy Markdown
Contributor Author

Closing since I forked the wrong Python version. Will reopen again.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.