mrkeyoor.comAsk

python/cpythontested 19 Nov 2026commit 865d8d8

cpython review

Our CPython documentation-path install took 11 seconds and its build took 1 second, with tests skipped, so the useful result is a successful documentation workflow rather than a validated interpreter build.

  • Safety failed
  • Build 1 s
11 sto install
  • 56 packages
Dev Toolsevaluationupdated 19 Nov 2026
+22stars / 7d

CPython is the canonical implementation of the Python programming language, distributed through python.org. Its repository contains the interpreter, library modules and documentation, so it is where you work on Python itself rather than just write an application in Python.

Verdict

Our CPython documentation-path install took 11 seconds and its build took 1 second, with tests skipped, so the useful result is a successful documentation workflow rather than a validated interpreter build. Use the repository if you want to contribute to Python itself or study its implementation. Skip the alpha development checkout if you only need a settled runtime for an application; choose an appropriate released distribution.

CPython infographic: executes Python source code, plus its uses, our test result, pitfalls and who it suits
Tested 19 November 2026: the source install took 11 s and the build 1 s.

We ran it

Lab card: what happened when we ran cpython
Lab card from our sandbox run
Screenshot of cpython (www.python.org)
www.python.org
Install✓ · 11s56 packages · 99 MB
Build✓ · 1s
Testsn/ano test script
Known vulns0(pip-audit)
Repo5671 files~2,274,974 lines of source · 130.4 MB · 23 CI workflows

Answers from our run

Does cpython build from source?

Dependencies installed in 11 seconds (56 packages), and the build succeeded in 1 seconds. We cloned commit 865d8d8 into a clean Debian container with 3 CPUs and no project-specific setup.

Does cpython have tests you can run?

Not through a standard command: the project exposes no test script or target that our harness could run.

Does cpython have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use cpython?

Application developers seeking a settled production interpreter from the development branch: the current README labels main an alpha development version.

What are the alternatives to cpython?

PyPy, Cython. Our CPython documentation-path install took 11 seconds and its build took 1 second, with tests skipped, so the useful result is a successful documentation workflow rather than a validated interpreter build.

Setup4/5Our source checkout installed in 11 s and built in 1 s with 56 dependencies, but we did not run a README task.Editor’s note: The measured Doc/ workflow succeeded, but interpreter compilation and interpreter regression testing were outside that run.
Docs3/5The 8,050-character README has no usage instructions or examples of its own and points to separate documentation, which we did not assess.Editor’s note: The README separates platform builds, documentation and testing instructions; their full accuracy across supported platforms was not assessed.
Community5/5Last push on 2026-11-19, 78,406 stars, maintainers answered or closed 10 of the 10 most-discussed issues we sampled and 9,350 open issues and pull requests is a heavy backlog for its size.Editor’s note: Historical issue discussions show technical responses, but this sample cannot establish current response times or support capacity.
Maturity2/5No tagged GitHub release and repository created 2017-02-10.Editor’s note: The development branch identifies itself as an alpha; the documentation run does not assess a released interpreter in production.

How we score

Discussed on

  1. hnPython moved to GitHub820 points
  2. hngh-116167: Allow disabling the GIL470 points
  3. hnA copy-and-patch JIT compiler for CPython270 points
  4. hnPython rounds float values by converting them to string and then back268 points
  5. hnRustPython – A Python-3 (CPython >= 3.11.0) Interpreter written in Rust229 points

Who it’s for

Contributors changing Python's interpreter, standard library or documentation.
Developers studying how Python code reaches the interpreter and its C API.
Application developers comparing runtime choices using their own dependencies and workloads.

Who it’s NOT for

Application developers seeking a settled production interpreter from the development branch: the current README labels main an alpha development version.
Operators treating Python execution as an isolation boundary for hostile code: the security discussion disputes that assumption and offers no reproduced isolation result.
Teams using our short documentation build as approval for an interpreter migration: the harness selected Doc/ and skipped tests.

Setup reality

Our November 19, 2026 run at 865d8d8 completed install in 11 seconds and build in 1 second under ./Doc/, recording 56 dependencies and 99 MB on disk. Tests were skipped because the harness found no test script or target. pip-audit reported 0 known vulnerabilities. These are documentation-path results, not interpreter compilation timings.

For interpreter work, the README documents configure and make on Unix and separate Windows instructions, plus platform-specific libraries for optional modules. It directs application users to installable Python kits. The documented local source workflow does not ask for a hosted service or API credential.

The configured sandbox had 3 CPUs, 8 GB RAM and image label ghcr.io/astral-sh/uv:python3.12-bookworm; actual runtime versions require raw logs. A separate Compose-based attempt stopped because the runner required a Compose file. The README also warns that make install creates the primary python3 executable under the chosen prefix and recommends altinstall for other versions sharing it.

CPython is the canonical implementation of Python, the language you write; it is the runtime distributed through python.org, according to the Python glossary. Our documentation-path install succeeded in 11 seconds and its build in 1 second, with interpreter tests skipped. Use this repository if you want to contribute to that runtime or its documentation. Skip the development checkout if you just need a settled interpreter for an application: the current README labels main an alpha development version.

CPython includes the runtime and its documentation

The CPython repository contains the interpreter's C source, Python library modules and Sphinx documentation, as the official source-distribution description explains. That makes it a useful destination when your change belongs in Python itself: an interpreter behavior, a library module or the documentation that explains either. If your goal is simply to write a Python application, the README points you to installable kits on python.org.

The current README identifies main as Python 3.16.0 alpha 2+dev. You should choose your entry point before following a build command. A documentation contribution belongs under Doc/; changing the interpreter takes you through a separate compiler and platform-dependency workflow. The README links separate Windows and macOS instructions and warns that some standard-library modules cannot be built or used on every platform. That warning can affect an application even when the executable itself compiles successfully.

In James Bennett's internals talk, he describes CPython as a parser, compiler, virtual machine, standard-library implementation and C-programmable API. He then uses inspect.getsource to inspect a function. It is a useful introduction for a newcomer: the interpreter is a collection of parts you can investigate, rather than a single execution loop you must understand all at once.

What people use cpython for

Contributors have used CPython to investigate interpreter cleanup, support development environments and bring Python to unusual hardware, with concrete outcomes in the issue tracker.

Who used it What they did What happened
Cyd, the contributor addressed by that name in issue #67684 Built Python 3.4.2 natively on an Android tablet Reported a completed build inside KBOX on Android 4.4.2, requiring source patches and a modified fakechroot environment.
The original #44470 reporter and Victor Stinner Repeatedly initialized and finalized an embedded interpreter Observed accumulating references in historical debug builds; the discussion records work on multiphase extension initialization.
A Flit contributor and Nick Coghlan in #78125 Used .pth files to extend Python's module search path Described development installs on Windows and chaining virtual environments, two reasons deleting path-extension support would disrupt existing workflows.
Healthy_Ship4930 on r/Compilers Used CPython as a baseline for Edge Python Reported faster loops and float math in their runtime, but slower dictionaries and strings.

Cyd's account is particularly useful if you are considering a port. The build finished, but the work included changing the environment beneath Python as well as Python's source. Contributors then discussed splitting patches and updating them against development sources. This is a historical account of porting work, not a recipe for today's Android installations.

The embedding example answers a different practical question. An embedded interpreter runs inside another application, which controls when Python starts and stops. The original reporter repeatedly called Py_Initialize() and Py_Finalize() and watched references accumulate. If that is your architecture, shutdown behavior deserves a place in your acceptance workload alongside successful execution of the first script.

What happened when we ran it

Our November 19 sandbox run at commit 865d8d8 completed the install step in 11 seconds and the build step in 1 second under Doc/; it skipped tests because the harness found no test script or target.

Recorded check Result What you can conclude
Install Succeeded in 11 seconds The selected documentation-path dependency step completed.
Dependencies and footprint 56 dependencies, 99 MB on disk This describes the measured environment, not an interpreter distribution's minimum size.
Build Succeeded in 1 second The selected documentation-path build step completed.
Tests No tests script/target, skipped There is no passing interpreter-suite result here.
pip-audit 0 known vulnerabilities This is a dependency-audit observation, not an interpreter security assessment.

Our harness selected ./Doc/, installed its dependencies and completed its build step. Then it found no test script or target and skipped testing. That sequence matters more than the short duration: you cannot turn this documentation workflow into a claim that CPython itself compiled in a second. The README separately documents the interpreter's top-level make test command, so the skipped step also cannot support a claim that CPython has no tests.

The sandbox configuration recorded 3 CPUs, 8 GB RAM and image label ghcr.io/astral-sh/uv:python3.12-bookworm. The checkout scan counted 5,671 files, approximately 2,274,974 source lines and 130.4 MB, plus 23 CI workflow files. Its “no tests directory” and “no Dockerfile” signals describe what that scan recognized. They are not substitutes for reading the project's build and testing instructions. Actual runtime and operating-system versions require the raw toolchain logs.

A separate hands-on attempt on November 19 stopped at the safety step because none of the runner's accepted Compose filenames existed. The error was unsafe repo: none of compose.yaml, compose.yml, docker-compose.yaml, docker-compose.yml exists (rule: a compose file is required). This runner required a container deployment shape that CPython's source instructions do not promise. The attempt ended with teardown reported as ok. Its run summary's claim of a deployment through the project's own Compose file conflicts with that failed safety step; it is not a completed deployment result.

Where people get stuck: startup and shutdown have their own failure modes

Historical reports connect CPython problems to interpreter lifecycle and startup configuration, rather than just to the Python statements an application executes.

Report What the contributor observed Response or resolution visible in the discussion
#44470, interpreter finalization The original reporter accumulated references across repeated interpreter start/stop cycles. Stinner identified multiphase extension initialization as part of the work; a changeset ports _json. The thread is marked closed.
#71026, startup randomness A reporter traced Python 3.5 startup delays in a VM to the kernel random-number generator's initialization. Stinner suggested virt-rng; another contributor reported a local nonblocking-call patch worked. The thread is marked closed.
#78125, .pth execution Barry Warsaw described early execution, swallowed exceptions and difficult debugging. Contributors distinguished path extension from execution and explained packaging dependencies. The migrated status fields conflict.
#54390, buffer management A reporter identified unchecked get_shape0 failures and unclear memory ownership. Nick Coghlan called for documented ownership, paired buffer acquisition/release and return-value checks. The thread is marked closed.

The startup thread is worth reading before changing security settings to cure a delay. Stinner explained why randomness was needed and suggested supplying entropy to a virtual machine. The discussion also proposed a fixed PYTHONHASHSEED, including disabling hash randomization, and another participant objected to that workaround. Copying the shortest command from an old comment can discard the property the startup code was trying to protect.

For packaging problems, distinguish code execution from adding directories to sys.path, the locations Python searches for modules. The Flit contributor explicitly wanted path extension without arbitrary startup execution. Coghlan's pew add example used it to share a common dependency environment while adding application-specific packages. If you remove startup hooks to debug an environment, record which behavior you removed; breaking an editable install is a different result from stopping unexpected code.

Performance claims change with the operation you measure

Edge Python's author reported winning on loops and float math while losing to CPython on dictionaries and strings in their r/Compilers post. Those are author-reported comparisons of a subset implementation. They give you a reason to ask which operations dominate your application, not a reason to replace its runtime immediately.

A second author, LegitimateDonut9059, expected a C++ runtime with a custom memory pool to beat Python but reported slower basic benchmarks than CPython. Commenters recommended profiling and investigating allocation, pointer access and branching. Their suggestions are hypotheses about that author's implementation, not diagnoses of CPython. The practical lesson is narrower: the implementation language alone doesn't settle a runtime comparison.

Before spending time on a migration, identify the slow request, batch job or processing stage you want to improve. Include the dictionaries, strings and library calls it actually uses. Keep the input and required output constant across candidates, and include startup when your application launches short-lived processes. An interpreter change is useful only if the resulting application still does its job and improves the constraint you care about.

Security claims need an attacker and a boundary

The November AI supply-chain discussion contains disputed allegations: BananasAndBrains on r/cybersecurity rejects treating CPython as a sandbox boundary for untrusted Python. That comment is a participant's security argument. It is not a maintainer advisory or a reproduction of the linked allegations.

For your decision, write down what an attacker can supply. An application accepting data has a different trust arrangement from a service executing arbitrary Python chosen by someone else. Calling the latter input “bytecode” doesn't answer who controls file access, networking or the containing process. Our Compose runner's refusal also belongs to the runner's deployment policy, not to an assessment of Python's ability to isolate hostile programs.

In a November X thread, broyojo42 says a Lean formalization was checked against the real interpreter and led to crash reports. Lean is a system for expressing and checking formal proofs. That is an interesting report about finding bugs; neither its social attention nor its claim of formal checking settles the impact on your application. The dependency audit result above answers a separate question from those crash and isolation claims.

CPython vs PyPy, Cython and other searched alternatives

PyPy is an alternative Python implementation; Cython is a compiler for Python and its extended language, according to their official descriptions. CPython vs PyPy is a runtime choice, while CPython vs Cython can be a choice about compiling selected code within a Python application.

Comparison What the evidence says How it should affect your decision
CPython vs Edge Python Healthy_Ship4930 reports faster loops but slower dictionaries and strings in Edge Python. Match the operations and required language coverage before comparing your application.
CPython vs a custom C++ dynamic runtime LegitimateDonut9059 reports their early runtime was slower despite a custom memory pool. Profile your implementation before assuming a rewrite will improve speed.
CPython vs PyPy PyPy documents a just-in-time compiler and compatibility information. Consider it when you can evaluate your application's dependency compatibility and actual workload on another interpreter.
CPython vs Cython Cython generates C code and supports calls to C and C++. Consider it when you can change or compile selected modules rather than migrate the whole interpreter.

CPython vs Jython and CPython vs IronPython begin with distinct implementations of the language; the Python glossary names both as alternatives. CPython vs PyPy vs GraalPy, and CPython vs RustPython, need application compatibility and workload results before a performance recommendation. CPython vs Rust also changes the question to a language and implementation decision: a Python runtime comparison alone cannot price the work of rewriting your program.

Outdated claims, corrected

Simplyland's introductory video calls bytecode portable and secure compared with machine code, but its explanation supplies no isolation mechanism for hostile Python programs. Its bytecode description should not be read as permission to execute strangers' code inside your application. The security disagreement above concerns that precise boundary.

The older buffer documentation needs a historical label too. In #54390, a contributor says the documented ownership behavior of PyMemoryView_FromBuffer did not match its implementation. The contributor described the absence of an allocation standard as an obstacle to safely freeing memory. That is a documented dispute about the old API description, rather than a finding from our documentation build.

Finally, Thomas Wouters acknowledged that the unpacking proposal's displayed flatten(L) result was a typo: it should have called list(flatten(L)). Guido van Rossum had questioned why a generator appeared as a list. Use that correction when reading the proposal's example; don't turn the mistaken display into an interpreter feature or defect.

Questions people ask

CPython is the canonical Python implementation distributed on python.org; Python is the language, as the official glossary explains.

What is CPython, and how is it different from the Python language?

CPython means the C implementation of Python, a name that distinguishes the runtime from the language. James Bennett explains that the C implementation gives CPython its name in his internals talk. You write Python source code; choosing an implementation determines which program executes it. A comparison of Python with CPython therefore isn't a comparison of competing languages.

Where is the CPython GitHub repository, and how do I understand and compile its source?

The CPython GitHub repository is python/cpython. Its README gives a Unix sequence beginning with ./configure and make, followed by testing and installation, and links Windows instructions separately. Start with those platform instructions and the dependency guidance they reference. Documentation work has its own Doc/README.rst; our measured workflow selected that directory.

How does CPython execute Python code from source through bytecode?

CPython compiles Python source into bytecode, an intermediate program representation executed by its virtual machine, according to the glossary's bytecode entry. That explains the source-to-execution distinction without promising that a compiled Python file is a standalone native executable. CPython internals includes more than bytecode: the parser and C API are separate parts of Bennett's explanation.

Is Python interpreted or compiled?

Python source is compiled to bytecode in CPython, and that bytecode is executed by the interpreter. The official glossary calls Python interpreted while acknowledging its bytecode compiler. “Compiled” and “interpreted” describe stages here; either label alone loses part of the execution path.

Why is CPython written in C rather than Python?

CPython is written in C, which Bennett identifies as the reason for its name. His talk also describes its C-programmable API. That explains the implementation you are examining, without turning C into a requirement for implementing the Python language. Neither his introduction nor our documentation run is a controlled comparison of implementation languages.

Where can I find a PDF about CPython internals?

The CPython README directs you to online documentation and downloadable HTML, EPUB and reStructuredText, with documentation-building instructions under Doc/. It does not name a CPython internals PDF there. Choose material matching the interpreter revision you are studying; an older talk or proposal needs its date and implementation context attached.

How does CPython compare with PyPy?

PyPy offers a different Python implementation with a just-in-time compiler, meaning it compiles during execution, as PyPy's website describes. Evaluate your dependencies and workload before moving an application. PyPy's project-level performance claims are not measurements of your service, and the Edge Python comparison above cannot answer a PyPy question.

How does CPython differ from Cython?

Cython compiles Python and its extended language into C code and supports integration with C or C++, according to Cython's project description. It is relevant when selected modules need compilation or native-library integration. It doesn't require you to treat the rest of your application as a competing Python implementation.

What we have not tested yet

Our run covers the documentation path at 865d8d8, not a compiled interpreter, its regression suite or a deployed application. The Compose attempt stopped before deployment, so its successful-deployment summary cannot serve as functional evidence. We have no screenshots or known-answer application questions from that attempt. Runtime and operating-system versions await the raw toolchain logs; the image label alone cannot settle them.

We have not tested current embedding cleanup, VM entropy behavior, console Unicode handling or buffer lifetime behavior. The historical issue excerpts document reports, proposals and some specific changes, rather than complete affected-release and fixed-release boundaries. Their closure labels cannot establish that every behavior discussed was corrected. The Windows console workaround in #45943 and the hash-collision discussion in #57912 need release-specific follow-up before they become current deployment advice.

We have no controlled current comparison against PyPy, Cython, Jython, GraalPy, IronPython, RustPython or Rust, and no long-running application memory profile. The Edge Python and C++ comparisons are their authors' reports. The Reddit security allegations and broyojo42's crash claims lack independent reproduction here; the X thread and linked card also give different bug-report totals. We have not audited sandbox isolation or the entire dependency supply chain. Issue #47020 is a tracker-testing thread and contributes no product finding to this review.

For a documentation contribution, the successful Doc/ steps are relevant evidence. For an interpreter change or a runtime migration, the missing result is the application and interpreter checks on your chosen platform and revision.

Alternatives

ProjectWhat it isPick it when
PyPyAn alternative Python implementation with a just-in-time compiler.Evaluate PyPy when you can check dependency compatibility and measure your application on another interpreter; its general speed claims do not predict your workload.
CythonA compiler for Python and the extended Cython language that generates C code.Evaluate Cython when selected modules need compilation or C/C++ integration while the application continues to use Python.

What people are saying

  1. [hackernews] Formalizing CPython

Sources

  1. CPython README and source
  2. Python glossary
  3. General Python FAQ
  4. PyPy official project
  5. Cython official project
  6. Interpreter finalization discussion
  7. Startup entropy discussion
  8. Packaging startup hooks discussion

More dev tools reviews