Skip to content

Commit d3c407d

Browse files
authored
Merge branch 'main' into fix-typos
2 parents 1268e49 + ec0447a commit d3c407d

File tree

10 files changed

+16
-117
lines changed

10 files changed

+16
-117
lines changed

conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,14 @@
149149
"pullrequest.rst": "getting-started/pull-request-lifecycle.rst",
150150
"setup.rst": "getting-started/setup-building.rst",
151151
# CPython Internals
152-
"compiler.rst": "internals/compiler.rst",
153-
"exploring.rst": "internals/exploring.rst",
154-
"garbage_collector.rst": "internals/garbage-collector.rst",
155-
"parser.rst": "internals/parser.rst",
152+
"compiler.rst": "internals.rst",
153+
"exploring.rst": "internals.rst",
154+
"garbage_collector.rst": "internals.rst",
155+
"parser.rst": "internals.rst",
156+
"internals/compiler.rst": "internals.rst",
157+
"internals/exploring.rst": "internals.rst",
158+
"internals/garbage_collector.rst": "internals.rst",
159+
"internals/parser.rst": "internals.rst",
156160
# Testing and Buildbots
157161
"buildbots.rst": "testing/buildbots.rst",
158162
"coverage.rst": "testing/coverage.rst",

developer-workflow/c-api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ Guidelines for adding to the Limited API
387387
details involve:
388388

389389
- The GIL
390-
- :ref:`Garbage collection <gc>`
390+
- Garbage collection
391391
- Memory layout of PyObject, lists/tuples and other structures
392392

393393
If following these guidelines would hurt performance, add a fast function

index.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,8 @@ Additional resources
267267
* Anyone can clone the sources for this guide. See :ref:`devguide`.
268268
* Help with ...
269269

270-
* :ref:`exploring`
270+
* :ref:`internals`
271271
* :ref:`grammar`
272-
* :ref:`parser`
273-
* :ref:`compiler`
274-
* :ref:`garbage_collector`
275272

276273
* Tool support
277274

@@ -317,7 +314,7 @@ Full table of contents
317314
testing/index
318315
development-tools/index
319316
core-team/index
320-
internals/index
317+
internals
321318
versions
322319
contrib/index
323320

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,9 @@
1-
.. _exploring:
1+
.. _internals:
22

33
===================
4-
CPython source code
4+
CPython's internals
55
===================
66

7-
This section gives an overview of CPython's code structure and provides
8-
a summary of file locations for modules and built-ins.
9-
10-
11-
Source code layout
12-
==================
13-
14-
For a Python :term:`module`, the typical layout is:
15-
16-
* :file:`Lib/{<module>}.py`
17-
* :file:`Modules/_{<module>}.c` (if there's also a C accelerator module)
18-
* :file:`Lib/test/test_{<module>}.py`
19-
* :file:`Doc/library/{<module>}.rst`
20-
21-
For an :term:`extension module`, the typical layout is:
22-
23-
* :file:`Modules/{<module>}module.c`
24-
* :file:`Lib/test/test_{<module>}.py`
25-
* :file:`Doc/library/{<module>}.rst`
26-
27-
For :ref:`bltin-types`, the typical layout is:
28-
29-
* :file:`Objects/{<builtin>}object.c`
30-
* :file:`Lib/test/test_{<builtin>}.py`
31-
* :cpy-file:`Doc/library/stdtypes.rst`
32-
33-
For :ref:`built-in-funcs`, the typical layout is:
34-
35-
* :cpy-file:`Python/bltinmodule.c`
36-
* :cpy-file:`Lib/test/test_builtin.py`
37-
* :cpy-file:`Doc/library/functions.rst`
38-
39-
Some exceptions to these layouts are:
40-
41-
* built-in type ``int`` is at :cpy-file:`Objects/longobject.c`
42-
* built-in type ``str`` is at :cpy-file:`Objects/unicodeobject.c`
43-
* built-in module ``sys`` is at :cpy-file:`Python/sysmodule.c`
44-
* built-in module ``marshal`` is at :cpy-file:`Python/marshal.c`
45-
* Windows-only module ``winreg`` is at :cpy-file:`PC/winreg.c`
46-
47-
48-
Additional references
49-
=====================
50-
517
The CPython code base is constantly changing and evolving.
528
Here's a sample of references about CPython's architecture aimed at
539
building your understanding of CPython internals and its evolution:
@@ -56,6 +12,7 @@ building your understanding of CPython internals and its evolution:
5612
:header: "Title", "Brief", "Author", "Version"
5713
:widths: 50, 50, 20, 5
5814

15+
"`CPython's InternalDocs`_", "Docs on CPython internals maintained in the source tree", "", ""
5916
"`A guide from parser to objects, observed using GDB`_", "Code walk from Parser, AST, Sym Table and Objects", Louie Lu, 3.7.a0
6017
"`Green Tree Snakes`_", "The missing Python AST docs", Thomas Kluyver, 3.6
6118
"`Yet another guided tour of CPython`_", "A guide for how CPython REPL works", Guido van Rossum, 3.5
@@ -72,6 +29,7 @@ building your understanding of CPython internals and its evolution:
7229
"`A guide from parser to objects, observed using Eclipse`_", "Code walk from Parser, AST, Sym Table and Objects", Prashanth Raghu, 2.7.12
7330
"`CPython internals: A ten-hour codewalk through the Python interpreter source code`_", "Code walk from source code to generators", Philip Guo, 2.7.8
7431

32+
.. _CPython's InternalDocs: https://github.com/python/cpython/blob/main/InternalDocs/README.md
7533

7634
.. _A guide from parser to objects, observed using GDB: https://hackmd.io/s/ByMHBMjFe
7735

internals/compiler.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

internals/garbage-collector.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

internals/index.rst

Lines changed: 0 additions & 20 deletions
This file was deleted.

internals/interpreter.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

internals/parser.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ sphinx-notfound-page>=1.0.0
77
sphinx_copybutton>=0.3.3
88
sphinxext-opengraph>=0.13.0
99
sphinxext-rediraffe
10-
Sphinx>=8.2.3
10+
Sphinx~=8.2.3

0 commit comments

Comments
 (0)