cpython/InternalDocs
Sam Gross f2b5131d1a
[3.14] gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072) (#146390)
Fix free-threading scaling bottleneck in sys.intern and `PyObject_SetAttr` by
avoiding the interpreter-wide lock when the string is already interned and
immortalized.

(cherry picked from commit 60093096ba)
2026-03-24 21:42:19 -04:00
..
images gh-119786: Move garbage collection doc from devguide to InternalDocs (#125282) 2024-10-11 21:18:37 +01:00
changing_grammar.md gh-119786: cleanup internal docs and fix internal links (#127485) 2024-12-01 17:12:22 +00:00
code_objects.md gh-119786: Add jit.md. Move adaptive.md to a section of interpreter.md. (#127175) 2024-12-06 16:36:06 +00:00
compiler.md [3.14] gh-138081: fix some dead links in InternalDocs (GH-138082) (#138781) 2025-09-11 12:38:14 +03:00
exception_handling.md [3.14] Improve format of InternalDocs/exception_handling.md (GH-134969) (#134975) 2025-05-31 12:02:20 +00:00
frames.md InternalDocs: Fix outdated struct references in frames.md (#132613) 2025-04-20 23:24:21 +01:00
garbage_collector.md [3.14] Doc: fix duplicated words (GH-136086) (#136108) 2025-06-29 18:45:26 -04:00
generators.md [3.14] gh-138081: fix some dead links in InternalDocs (GH-138082) (#138781) 2025-09-11 12:38:14 +03:00
interpreter.md [3.14] gh-119786: Remove mention of _PyThreadState_BumpFramePointer from InternalDocs/interpreter.md (GH-141816) (#142812) 2025-12-16 11:54:44 +00:00
jit.md [3.14] gh-138081: fix some dead links in InternalDocs (GH-138082) (#138781) 2025-09-11 12:38:14 +03:00
parser.md Fix some typos in various doc files (GH-132589) 2025-04-16 18:11:47 +00:00
README.md gh-119786: added InternalDocs/generators.md (#128524) 2025-01-16 13:15:52 +00:00
stack_protection.md [3.14] GH-139653: Only raise an exception (or fatal error) when the stack pointer is about to overflow the stack. (GH-141711) (GH-141944) 2025-11-26 12:54:56 +01:00
string_interning.md [3.14] gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072) (#146390) 2026-03-24 21:42:19 -04:00

CPython Internals Documentation

The documentation in this folder is intended for CPython maintainers. It describes implementation details of CPython, which should not be assumed to be part of the Python language specification. These details can change between any two CPython versions and should not be assumed to hold for other implementations of the Python language.

The core dev team attempts to keep this documentation up to date. If it is not, please report that through the issue tracker.

Compiling Python Source Code

Runtime Objects

Program Execution