diff --git a/conf.py b/conf.py index 0f6a820d8..02f9c7477 100644 --- a/conf.py +++ b/conf.py @@ -149,10 +149,14 @@ "pullrequest.rst": "getting-started/pull-request-lifecycle.rst", "setup.rst": "getting-started/setup-building.rst", # CPython Internals - "compiler.rst": "internals/compiler.rst", - "exploring.rst": "internals/exploring.rst", - "garbage_collector.rst": "internals/garbage-collector.rst", - "parser.rst": "internals/parser.rst", + "compiler.rst": "internals.rst", + "exploring.rst": "internals.rst", + "garbage_collector.rst": "internals.rst", + "parser.rst": "internals.rst", + "internals/compiler.rst": "internals.rst", + "internals/exploring.rst": "internals.rst", + "internals/garbage_collector.rst": "internals.rst", + "internals/parser.rst": "internals.rst", # Testing and Buildbots "buildbots.rst": "testing/buildbots.rst", "coverage.rst": "testing/coverage.rst", diff --git a/developer-workflow/c-api.rst b/developer-workflow/c-api.rst index c65e88ce1..a6523a909 100644 --- a/developer-workflow/c-api.rst +++ b/developer-workflow/c-api.rst @@ -387,7 +387,7 @@ Guidelines for adding to the Limited API details involve: - The GIL - - :ref:`Garbage collection ` + - Garbage collection - Memory layout of PyObject, lists/tuples and other structures If following these guidelines would hurt performance, add a fast function diff --git a/index.rst b/index.rst index 0af90e295..997f59932 100644 --- a/index.rst +++ b/index.rst @@ -267,11 +267,8 @@ Additional resources * Anyone can clone the sources for this guide. See :ref:`devguide`. * Help with ... - * :ref:`exploring` + * :ref:`internals` * :ref:`grammar` - * :ref:`parser` - * :ref:`compiler` - * :ref:`garbage_collector` * Tool support @@ -317,7 +314,7 @@ Full table of contents testing/index development-tools/index core-team/index - internals/index + internals versions contrib/index diff --git a/internals/exploring.rst b/internals.rst similarity index 89% rename from internals/exploring.rst rename to internals.rst index 0ae8337e8..42c5533e3 100644 --- a/internals/exploring.rst +++ b/internals.rst @@ -1,6 +1,14 @@ -.. _exploring: +.. _internals: =================== +CPython's internals +=================== + +This guide describes the basics of CPython’s internals. +It explains the layout of CPython’s source code. + +.. _exploring: + CPython source code =================== @@ -9,7 +17,7 @@ a summary of file locations for modules and built-ins. Source code layout -================== +------------------ For a Python :term:`module`, the typical layout is: @@ -46,7 +54,7 @@ Some exceptions to these layouts are: Additional references -===================== +--------------------- The CPython code base is constantly changing and evolving. Here's a sample of references about CPython's architecture aimed at @@ -92,3 +100,11 @@ building your understanding of CPython internals and its evolution: .. _A guide from parser to objects, observed using Eclipse: https://docs.google.com/document/d/1nzNN1jeNCC_bg1LADCvtTuGKvcyMskV1w8Ad2iLlwoI/ .. _CPython internals\: A ten-hour codewalk through the Python interpreter source code: https://www.youtube.com/playlist?list=PLzV58Zm8FuBL6OAv1Yu6AwXZrnsFbbR0S + + +CPython InternalDocs +==================== + +For more detailed and up-to-date documentation on CPython's internals, +please refer to the `InternalDocs folder `_ +in the CPython repository. diff --git a/internals/compiler.rst b/internals/compiler.rst deleted file mode 100644 index f22039c64..000000000 --- a/internals/compiler.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _compiler: - -=============== -Compiler design -=============== - -.. highlight:: none - -This document is now part of the -`CPython Internals Docs `__. diff --git a/internals/garbage-collector.rst b/internals/garbage-collector.rst deleted file mode 100644 index d86bbf8a1..000000000 --- a/internals/garbage-collector.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _garbage-collector: -.. _gc: -.. _garbage_collector: - -======================== -Garbage collector design -======================== - -.. highlight:: none - -This document is now part of the -`CPython Internals Docs `__. diff --git a/internals/index.rst b/internals/index.rst deleted file mode 100644 index 05723f482..000000000 --- a/internals/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _internals: - -=================== -CPython's internals -=================== - -This guide describes the basics of CPython's internals. -It explains the layout of CPython's source code. -It also explains how the parser, compiler, and interpreter -work together to run your Python code. -Finally, it covers the garbage collector and how it manages memory. - -.. toctree:: - :maxdepth: 3 - - exploring - parser - compiler - interpreter - garbage-collector diff --git a/internals/interpreter.rst b/internals/interpreter.rst deleted file mode 100644 index 52c150944..000000000 --- a/internals/interpreter.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _interpreter: - -======================== -The bytecode interpreter -======================== - -This document is now part of the -`CPython Internals Docs `__. diff --git a/internals/parser.rst b/internals/parser.rst deleted file mode 100644 index 9700c25b0..000000000 --- a/internals/parser.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _parser: - -=================== -Guide to the parser -=================== - -.. highlight:: none - -This document is now part of the -`CPython Internals Docs `__.