-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Docs Examples Focus on Outdated Single-Phase Init Modules and Static Types #134160
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cpython/Doc/extending/extending.rst Lines 446 to 451 in 9983c7d
Should alternatives be explained according to |
Good point. I'm not quite sure. Keeping the old tutorials around makes sense in some ways, but perhaps not in a different file somehow or maybe just not listed in the index? As to the |
Ideally we would update the docs back to 3.12 at least. |
Thank you for doing this! Sorry that I can't give this my full attention right now.
|
Co-authored-by: Adam Turner <[email protected]>
…onGH-134296) (cherry picked from commit 96905bd) Co-authored-by: neonene <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…onGH-134296) (cherry picked from commit 96905bd) Co-authored-by: neonene <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…134296) (#134753) gh-134160: Use multi-phase init in documentation examples (GH-134296) (cherry picked from commit 96905bd) Co-authored-by: neonene <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…134296) (#134754) gh-134160: Use multi-phase init in documentation examples (GH-134296) (cherry picked from commit 96905bd) Co-authored-by: neonene <[email protected]> Co-authored-by: Adam Turner <[email protected]>
The docs are now incorrect :( |
Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 469a564) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
(cherry picked from commit 469a564) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…134827) gh-134160: Block multiple module initialization (GH-134773) (cherry picked from commit 469a564) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…134828) gh-134160: Block multiple module initialization (GH-134773) (cherry picked from commit 469a564) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…rs (GH-134775) Co-authored-by: Adam Turner <[email protected]>
…rpreters (pythonGH-134775) (cherry picked from commit eb145fa) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…erpreters (GH-134775) (#134932) gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775) (cherry picked from commit eb145fa) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…rpreters (pythonGH-134775) (cherry picked from commit eb145fa) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
@encukou Could Lines 436 to 437 in ac75110
For me, |
…asize multi-phase init Document behaviour of single-phase init. Call it "legacy". Reorganize PyModule docs. Move PyInit_modulename docs from the tutorial to reference documentation. Move PyMODINIT_FUNC docs from generic macros to the new page. Add doc stubs for `PYTHON_API_VERSION` & `PYTHON_ABI_VERSION` Remove incorrect refcounts.dat entry for `PyModuleDef_Init`. This removes the "Return value: Borrowed reference." note. Instead, note that the function sometimes returns a borrowed reference, sometimes as strong one. (IMO, it's best to not think of `PyModuleDef` as a `PyObject` at all, and act like it can't be reference-counted.) Co-authored-by: Adam Turner <[email protected]>
…erpreters (GH-134775) (GH-134983) (cherry picked from commit eb145fa) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…-135174) Co-authored-by: neonene <[email protected]>
…ed (pythonGH-135174) (cherry picked from commit 1adca08) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: neonene <[email protected]>
…ed (pythonGH-135174) (cherry picked from commit 1adca08) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: neonene <[email protected]>
…ted (GH-135174) (GH-135213) gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (cherry picked from commit 1adca08) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: neonene <[email protected]>
…ted (GH-135174) (GH-135214) gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (cherry picked from commit 1adca08) Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: neonene <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
A variety of pages show examples (or provide explanations) around single-phase init modules and static types, but should focus on the newer, recommended alternatives. For example:
https://github.com/python/cpython/blob/main/Doc/extending/extending.rst?plain=1#L206-L265
https://github.com/python/cpython/blob/main/Doc/extending/extending.rst?plain=1#L355-L379
https://github.com/python/cpython/blob/main/Doc/extending/newtypes_tutorial.rst
https://github.com/python/cpython/blob/main/Doc/extending/newtypes.rst
https://github.com/python/cpython/blob/main/Doc/extending/embedding.rst?plain=1#L225
For reference:
Linked PRs
The text was updated successfully, but these errors were encountered: