Skip to content

About

Alternative Python implementation conformity dashboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Conformity

Public dashboard

This dashboard compares observable behavior of the standard library across Python implementations, one Python version at a time. Python 3.11 is measured against CPython 3.11.17 and shown at the site root; Python 3.12, 3.13 and 3.14 are measured against CPython 3.12.15, 3.13.17 and 3.14.9 and shown under /3.12/, /3.13/ and /3.14/. PyPy has no release for Python 3.13 or 3.14, nor GraalPy for 3.14, so those pages leave them out and say so. Python 3.11 is the default because PyPy for Python 3.12 is still a beta (PyPy 8.0.1), which the 3.12 page says. The former /3.11/ address redirects to the root. A switch at the top of the page moves between them. In each version, CPython, PyPy and GraalPy all implement that version when they are measured, so a difference is never a version difference. The corpus covers 17 modules. It includes SQLite transactions, threads appending to one list, partial zlib streams, asyncio task groups, time zone transitions and atomic regular expressions.

Local measurement

Use a prebuilt CPython of the version to measure (3.11.17, 3.12.15, 3.13.17 or 3.14.9), PyPy 8.0.1 for the same version (3.11 and 3.12 only) and, to include it, GraalPy for the same version: 24.2.2 for Python 3.11, the last release that implements 3.11, 25.2.4 for Python 3.12 or 25.6.5 for Python 3.13. Every interpreter but CPython is optional. There are no Python dependencies to install.

/path/to/python3.12 -B measure.py --reference 3.12 \
  --pypy /path/to/pypy3.12
/path/to/python3.11 -B measure.py --reference 3.11 \
  --pypy /path/to/pypy3.11 --output dist/3.11
open dist/index.html  # macOS

The command downloads the official CPython source archive, checks its SHA-256 and extracts only Lib/test into a temporary directory. --source /path/to/Python-3.12.15.tar.xz reuses an archive you already have. The page opens straight from the files generated in dist/. dist/results.json holds the detailed results.

The dashboard is in English. The former French page, fr/, redirects to it.

Python renders the page and all tables with the standard library. The browser handles the filters. To regenerate the site from an existing report, run python3 -B dashboard.py dist/results.json. The generated page is dist/index.html.

--applications downloads pinned distributions of Django 5.2.19, Bottle 0.13.4 and NumPy 2.4.4 into the temporary directory. It checks their digests and extracts them for import, leaving installed environments alone. The NumPy scenario checks the native extension suffix the interpreter expects on Linux x86-64. Only CPython and CPython 3.14t have a pinned NumPy wheel: PyPI has none for PyPy 3.12, and Oracle's GraalPy wheels do not cover GraalPy 25.2 on Python 3.12. The other interpreters report "No wheel". The scenarios cover Django template rendering, an aggregate with a rolled-back SQLite transaction, a Bottle WSGI route and NumPy operations. Their results appear in the Applications tab.

--packages adds the 50 most downloaded PyPI projects between 26 October and 24 November 2026 UTC, all file types included. The ranking and its ClickPy query also fix the version and the module to import for each project. Each Python version has its own ranking file (3.11, 3.13, 3.14): the projects are the same, the releases are chosen for that version. python3.X update_ranking.py --end 2026-11-25 regenerates the file of version 3.X. The chosen version is the newest stable, non-yanked release whose metadata accepts that Python version at the reference date. On each interpreter, pip installs that version and its dependencies from wheels with --prefix into a temporary directory private to the test. Unlike --target, this option lets pip see the packages bundled with the interpreter, such as cffi on PyPy. The test checks the installed version, imports the named module, then runs the package's functional check from smoke.py when it has one. A check exercises the core feature with fixed inputs and asserts the result: a matrix product and a linear solve for NumPy, an encryption round trip and a SHA-256 digest for cryptography, a PNG written and read back in memory for Pillow, model validation that accepts and rejects input for Pydantic. Checks use no network and no credentials. 32 of the 50 projects have one, including all 9 with native code; the others show "Import only", and the view shows each check's code. A failing check is "Functional check failed", with its traceback. To add a check, add the project to SMOKE and make sure it passes on CPython for every ranked version. When no wheel suits the package itself, the harness queries PyPI. If the release publishes wheels for the same interpreter tag and platform but another ABI, for example pypy312_pp73 when PyPy 8 requires pypy312_pp80, the result is "Other ABI only" rather than "No wheel". When the release has wheels for this interpreter and platform but only for other Python versions, as cryptography 50.0.2 publishes pp311 wheels and none for pp312, the result is "Other Python version only". When pip stops on a dependency rather than on the package, the result is "Blocked by a dependency": the dependency is named, and the newest release of it that satisfies the requirement today is checked the same way (another ABI, another Python version, or no wheel). The package view lists these dependencies with the packages they block.

--rustpython /path/to/rustpython adds a RustPython binary, measured in every view. It provides no C API, so in the package ranking it is tested only on releases that publish a pure-Python wheel (-none-any.whl); the others show "Native code, not tested". It implements Python 3.14, and its columns say so. To build it with the SQLite module the shared cases and the Django scenario use, run cargo build --release --locked --features freeze-stdlib,sqlite --bin rustpython and use target/release/rustpython. --graalpy /path/to/graalpy adds the standalone GraalPy binary. The two options are independent. --freethreaded /path/to/python3.14t adds a free-threaded CPython 3.14. It is measured in every view but the package ranking, which targets Python versions it does not cover. The script rejects a binary that is not a free-threaded build.

Interpreters and threads

Each run measures threads.py on every interpreter: four threads run the same CPU-bound function, and the speedup compares their duration with four sequential calls. About ×1 means the threads take turns (a global lock). A value close to ×4 means they run in parallel. The result depends on the cores of the machine, which are displayed. The Interpreters tab shows this speedup, the targeted Python version, the wheel ABI and the GIL state when the interpreter reports it (sys._is_gil_enabled(), from Python 3.13).

Performance

--benchmarks times eight programs from benchmarks.py, each in its own process: n-body, fannkuch-redux and spectral norm (programs of the Computer Language Benchmarks Game), n-queens, a floating-point computation, then json, re and a word count with collections. Each program makes a cold first call, two warmup rounds for JIT compilers and at least three timed rounds. The tab shows the median and the ratio to CPython. The detail gives the minimum, the standard deviation and the time of the first call. Each program also prints a checksum of its result: an answer that differs from CPython's is a difference, not a timing. The geometric mean of the ratios summarizes each interpreter and feeds a history chart.

The tests in tests/test_performance.py check the kernels against published values. pystone is not part of the set: it is a port of Dhrystone, a synthetic workload from 1984 that CPython no longer ships and that JIT compilers optimize in ways unrelated to real code. GitHub runners share their hardware, so differences of about 10% are not significant.

History

Each run adds a compact snapshot (counts per status, interpreter and view, relative speed) to history.json. GitHub Pages replaces the whole site on every deployment, so the workflow downloads the published history.json of each version, adds its snapshot and publishes it again. --history path/to/history.json does the same locally; it can be repeated, and only snapshots measured against the same Python version are kept. A missing or unreadable file starts a new history. The History tab draws one line per interpreter, with a table view of the same values.

GitHub Actions

The Python Conformity workflow runs on Linux x86-64. It measures every Monday and when run by hand, which also measures a branch before it is merged: gh workflow run conformity.yml --ref <branch>. A push to main or a pull request does not measure: it runs the unit tests and regenerates the pages from the published results.json and history.json, so a change to the page goes live in a few minutes. A change that needs new data, such as a new interpreter or a new measurement, shows up at the next measurement; run the workflow by hand after merging it. A measurement covers each Python version in its own job, in parallel, then assembles the two dashboards into one site. Each job first runs the unit tests with the downloaded CPython. It downloads the prebuilt binaries of CPython, PyPy and GraalPy Community for its version and checks their digests. Both jobs also measure RustPython, which implements Python 3.14. The Python 3.11 job, the default version, adds the free-threaded CPython 3.14. The CPython digests come from the SHA256SUMS file of the release. Each job also checks the digest of the RustPython 0.6.0 source archive, then builds the interpreter with the bundled standard library and the _sqlite3 module.

In the run summary, download dashboard-conformity, unzip the archive and open index.html. The workflow enables the application and package scenarios. An observed incompatibility is a measurement result. A failure of the CPython reference in the standard library corpus turns the job red and stays visible in the report when it could be produced.

On main, a successful measurement is then published to GitHub Pages by the publish job. This deployment assumes the repository's Pages source is set to GitHub Actions (Settings › Pages › Build and deployment).

Tests

python3.12 -B -m unittest discover -s tests  # also runs with python3.11

The tests cover page generation from a fictional report, the classification of missing wheels, and the choice of ranking versions and modules. They do not use the network.

Interpretation

  • Shared cases. The same call runs on every selected interpreter. The type and value are compared or, for invalid input, whether the exception can be caught with its public class. A missing API, a behavior difference, a timeout and a blocked measurement have distinct statuses.
  • Contracts. Each shared case states what guarantees its expected result: the Python language reference, the documented standard library behavior (with a link to the paragraph in the 3.12 documentation), observed CPython behavior that the documentation does not promise, an optional capability, or "not yet classified" when nobody has checked. A difference on a CPython behavior case is not necessarily a bug. The classification lives in CONTRACTS in corpus.py; a case stays unclassified when the documentation is silent or ambiguous. The shared cases view filters by contract (?contract=stdlib_spec).
  • Provenance. Every shared case is written for this dashboard. A case links to an upstream CPython test only when that test checks the same behavior. Links point to the release tag and the line of the test method. An audit against the 3.12.15 sources in November 2026 removed 15 links whose test did not check the case's behavior, for example MmapTests.test_context_manager for the mmap buffer case, and replaced 3 with tests that do.
  • Statuses. "Internal interpreter error" means the interpreter failed below the Python level: a Java exception from GraalPy, a fatal error, an RPython traceback or a Rust panic. "Process interrupted" means a signal ended the process. "Measurement blocked" means the process exited without a result for another reason, which says nothing about conformity.
  • Versions. Each run records, for every interpreter, its own release (implementationVersion, such as PyPy 8.0.1), the Python version it implements (language, such as 3.12.15), its cache tag and its full sys.version. When an interpreter implements another minor version than the reference, as CPython 3.14t does, its column and summary say so, because a difference can come from the version.
  • Links and reproductions. Every case, CPython test, scenario, package and benchmark has its own link, such as #case-mmap-memoryview or #package-cryptography. The link opens the right view, clears the filters that would hide the row and opens its details; switching language or Python version keeps it. Each shared case has a button that copies a standalone script printing what the case observes, and each package a button that copies the install and import commands.
  • Differences first. The shared cases and CPython tests tables initially show only differences and unmeasured cases. Unchecking the filter or adding ?diff=0 to the address shows every case.
  • CPython tests. The bodies of the selected tests run on CPython, PyPy, GraalPy and RustPython with each binary's own standard library. A guard in the JSON harness lets the selected methods load when the CPython _json accelerator is absent. Tests of internal optimizations and of the C API are out of scope. CPython v3.12.15 sources
  • Scope. The shared cases cover public CPython APIs of the measured version and apply to the binaries and platforms shown. GraalPy 24.2.2 and PyPy 8.0.1 implement Python 3.11; GraalPy 25.2.4 and PyPy 8.0.1 implement Python 3.12; GraalPy 25.6.5 implements Python 3.13. The contracts link to the documentation of the measured version. CPython 3.14t is the free-threaded build and targets 3.14. The RustPython 0.6.0 binary announces Python 3.14 alpha; in the package ranking it is tested on pure-Python releases only. Optional modules depend on each binary's configuration. GraalPy · RustPython

License

The dashboard code, the measurement scenarios and the scripts are distributed under the MIT license. The interpreters, the CPython test suite and the packages downloaded during measurements are distributed by their projects under their own licenses.

About

Alternative Python implementation conformity dashboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages