CPython reference 3.14.9 · Linux 7.0.0-1020-azure · x86_64 ·

Download results (JSON)

Each version is measured separately: CPython, PyPy and GraalPy all implement the selected Python version.

PyPy and GraalPy have no release for Python 3.14, so they are not measured here.

Top 50 packages by PyPI downloads

UTC downloads from 2026-10-26 through 2026-11-24 · ClickPy

The ranking counts every PyPI download of each project, whatever its version, file type or platform. Each check installs the pinned release and its dependencies from wheels, imports the named module, then runs a short functional check when the package has one, such as a matrix product for NumPy or an encryption round trip for cryptography. A package without a check shows “Import only”. A missing wheel can belong to the package or a dependency. When a distribution publishes no wheel at all, its sdist is built with no compiler: a pure-Python one, or one whose C speedups are optional, such as PyYAML, then installs and passes; one that needs native code stays a missing wheel. “Other ABI only” means the release has wheels for this Python version and platform, built for another ABI of the interpreter, such as PyPy 7.3 (pp73) instead of PyPy 8 (pp80). “Other Python version only” means the release has wheels for this interpreter and platform, but only for other Python versions, such as PyPy for Python 3.11 (pp311) on PyPy for Python 3.12 (pp312).

RustPython provides no C API, so it is tested only on releases that publish a pure-Python wheel. The others show “Native code, not tested”.

CPython 3.14.9

50 / 50

32 with a functional check · 18 import only

RustPython 0.6.0a0

36 / 50

20 with a functional check · 16 import only

5 packages blocked by a dependency · 9 native packages not tested

Dependencies that block other packages (3)

When pip stops on a dependency, the package is attributed to that dependency rather than counted as incompatible itself.

DependencyRustPython
rpds-pyjsonschema, referencing, jsonschema-specifications
MarkupSafejinja2
pydantic-corepydantic
RankPackage and importPyPI downloadsCPythoncp314RustPythonrustpython313_x86_64_linux_gnu
1boto3 1.44.11boto3Import only: no functional check yet2,528,068,267Import onlyImport only
2packaging 26.4packaging
Functional check
from packaging.specifiers import SpecifierSet
from packaging.version import Version
assert Version("1.10") > Version("1.9")
assert "1.4" in SpecifierSet(">=1.2,<2") and "2.0" not in SpecifierSet(">=1.2,<2")
1,938,124,463PassedPassed
3typing-extensions 4.16.0typing_extensionsImport only: no functional check yet1,834,504,593Import onlyImport only
4certifi 2026.11.20certifi
Functional check
import certifi
with open(certifi.where(), encoding="ascii") as bundle:
    assert bundle.read().count("BEGIN CERTIFICATE") > 50
1,759,474,898PassedPassed
5idna 3.20idna
Functional check
import idna
assert idna.encode("bücher.example") == b"xn--bcher-kva.example"
assert idna.decode(b"xn--bcher-kva.example") == "bücher.example"
1,735,381,889PassedPassed
6urllib3 2.8.0urllib3
Functional check
from urllib3.util import parse_url
url = parse_url("https://user@host.test:8443/path?q=1")
assert (url.host, url.port, url.path, url.query) == ("host.test", 8443, "/path", "q=1")
1,635,103,842PassedPassed
7charset-normalizer 3.5.3charset_normalizer
Functional check
from charset_normalizer import from_bytes
text = "Les élèves étaient très contents de déjeuner à côté de la forêt."
best = from_bytes(text.encode("utf_8")).best()
assert best is not None and str(best) == text
1,549,274,253PassedPassed
8requests 2.34.2requests
Functional check
import requests
prepared = requests.Request("GET", "https://example.test/a", params={"q": "x y"}).prepare()
assert prepared.url == "https://example.test/a?q=x+y"
1,523,324,194PassedPassed
9cryptography 50.0.2cryptography.hazmat.bindings._rust
Functional check
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
key = Fernet.generate_key()
assert Fernet(key).decrypt(Fernet(key).encrypt(b"conformity")) == b"conformity"
digest = hashes.Hash(hashes.SHA256())
digest.update(b"abc")
assert digest.finalize().hex() == "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
1,393,642,902Passed
Native code, not tested
The release publishes no pure-Python wheel.
10pluggy 1.7.0pluggyImport only: no functional check yet1,340,941,898Import onlyImport only
11pyyaml 6.0.4yaml
Functional check
import yaml
loader = getattr(yaml, "CSafeLoader", yaml.SafeLoader)
assert yaml.load("a: [1, 2]\nb: {c: true}", Loader=loader) == {"a": [1, 2], "b": {"c": True}}
assert yaml.safe_dump({"x": [1, "y"]}) == "x:\n- 1\n- y\n"
1,315,730,476Passed
Native code, not tested
The release publishes no pure-Python wheel.
12cffi 2.1.1cffi
Functional check
import cffi
ffi = cffi.FFI()
numbers = ffi.new("int[]", [1, 2, 3])
assert sum(numbers) == 6
assert ffi.sizeof("int32_t") == 4
assert ffi.string(ffi.new("char[]", b"conformity")) == b"conformity"
1,303,503,069Passed
Native code, not tested
The release publishes no pure-Python wheel.
13python-dateutil 4.0.0dateutil
Functional check
from datetime import date
from dateutil.relativedelta import relativedelta
assert date(2024, 1, 31) + relativedelta(months=1) == date(2024, 2, 29)
1,262,006,061PassedPassed
14pycparser 3.12pycparser
Functional check
from pycparser import c_parser
tree = c_parser.CParser().parse("int add(int a, int b) { return a + b; }")
assert tree.ext[0].decl.name == "add"
1,236,450,446PassedPassed
15pygments 2.21.0pygments
Functional check
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.lexers import PythonLexer
assert '<span class="k">def</span>' in highlight("def f(): pass", PythonLexer(), HtmlFormatter())
1,213,951,140PassedPassed
16pydantic 2.14.4pydantic
Functional check
from pydantic import BaseModel, ValidationError

class Item(BaseModel):
    name: str
    count: int

assert Item(name="a", count="3").count == 3
try:
    Item(name="a", count="three")
except ValidationError as error:
    assert error.errors()[0]["loc"] == ("count",)
else:
    raise AssertionError("invalid input accepted")
1,206,619,267Passed
Blocked by a dependency
pydantic-core 2.50.5 publishes no wheel for this interpreter.

ERROR: Could not find a version that satisfies the requirement pydantic-core==2.50.5 (from pydantic) (from versions: 0.0.1)
ERROR: No matching distribution found for pydantic-core==2.50.5
Its sdist does not build without a compiler.
via pydantic-core
17pydantic-core 2.50.5pydantic_core
Functional check
from pydantic_core import SchemaValidator, ValidationError, core_schema
validator = SchemaValidator(core_schema.int_schema())
assert validator.validate_python("5") == 5
try:
    validator.validate_python("five")
except ValidationError:
    pass
else:
    raise AssertionError("invalid input accepted")
1,186,040,480Passed
Native code, not tested
The release publishes no pure-Python wheel.
18click 8.5.1click
Functional check
import click
from click.testing import CliRunner

@click.command()
@click.option("--count", type=int)
def double(count):
    click.echo(count * 2)

assert CliRunner().invoke(double, ["--count", "21"]).output == "42\n"
1,157,577,801PassedPassed
19numpy 2.5.5numpy
Functional check
import numpy as np
matrix = np.arange(6, dtype=np.float64).reshape(2, 3)
assert (matrix @ matrix.T).tolist() == [[5.0, 14.0], [14.0, 50.0]]
assert np.linalg.solve([[3.0, 1.0], [1.0, 2.0]], [9.0, 8.0]).round(9).tolist() == [2.0, 3.0]
1,151,605,481Passed
Native code, not tested
The release publishes no pure-Python wheel.
20setuptools 84.2.1setuptoolsImport only: no functional check yet1,138,641,715Import onlyImport only
21anyio 4.16.0anyio
Functional check
import anyio

async def main():
    await anyio.sleep(0)
    return 7

assert anyio.run(main) == 7
1,095,061,600PassedPassed
22annotated-types 0.8.0annotated_typesImport only: no functional check yet1,048,672,747Import onlyImport only
23typing-inspection 0.4.5typing_inspectionImport only: no functional check yet1,047,971,317Import onlyImport only
24botocore 1.44.11botocoreImport only: no functional check yet1,047,131,080Import onlyImport only
25six 1.17.0sixImport only: no functional check yet1,040,276,068Import onlyImport only
26pytest 9.2.0pytestImport only: no functional check yet1,011,058,238Import onlyImport only
27h11 0.16.0h11
Functional check
import h11
connection = h11.Connection(h11.CLIENT)
data = connection.send(h11.Request(method="GET", target="/", headers=[("Host", "example.test")]))
assert data.startswith(b"GET / HTTP/1.1\r\n")
1,006,638,992PassedPassed
28iniconfig 2.3.1iniconfigImport only: no functional check yet986,257,188Import onlyImport only
29attrs 26.1.0attrs
Functional check
import attrs

@attrs.define
class Point:
    x: int
    y: int = 0

assert Point(1) == Point(1, 0) and attrs.asdict(Point(2, 3)) == {"x": 2, "y": 3}
935,156,011PassedPassed
30markupsafe 3.0.4markupsafe
Functional check
from markupsafe import Markup, escape
assert str(escape("<a href='x'>&</a>")) == "&lt;a href=&#39;x&#39;&gt;&amp;&lt;/a&gt;"
assert str(Markup("<b>%s</b>") % "<i>") == "<b>&lt;i&gt;</b>"
875,779,134Passed
Native code, not tested
The release publishes no pure-Python wheel.
31httpx 0.28.1httpx
Functional check
import httpx
transport = httpx.MockTransport(lambda request: httpx.Response(200, json={"path": request.url.path}))
with httpx.Client(transport=transport) as client:
    assert client.get("https://example.test/x").json() == {"path": "/x"}
831,004,792PassedPassed
32httpcore 1.0.9httpcoreImport only: no functional check yet827,634,033Import onlyImport only
33protobuf 7.36.2google.protobuf
Functional check
from google.protobuf import struct_pb2
message = struct_pb2.Struct()
message.update({"name": "conformity", "ratio": 1.5})
again = struct_pb2.Struct.FromString(message.SerializeToString())
assert again["name"] == "conformity" and again["ratio"] == 1.5
801,983,647PassedPassed
34pyjwt 2.15.1jwt
Functional check
import jwt
secret = "a-secret-key-long-enough-for-hs256!!"
token = jwt.encode({"sub": "conformity"}, secret, algorithm="HS256")
assert jwt.decode(token, secret, algorithms=["HS256"]) == {"sub": "conformity"}
776,743,895PassedPassed
35python-dotenv 1.2.4dotenv
Functional check
from io import StringIO
from dotenv import dotenv_values
assert dotenv_values(stream=StringIO("A=1\nB='x y'\n")) == {"A": "1", "B": "x y"}
772,634,784PassedPassed
36tzdata 2026.6tzdata
Functional check
from importlib.resources import files
assert (files("tzdata") / "zoneinfo" / "Europe" / "Paris").read_bytes().startswith(b"TZif")
764,257,164PassedPassed
37s3transfer 0.19.3s3transferImport only: no functional check yet760,523,487Import onlyImport only
38opentelemetry-api 1.45.2opentelemetry.traceImport only: no functional check yet742,195,252Import onlyImport only
39jinja2 3.1.6jinja2
Functional check
from jinja2 import Environment
template = Environment(autoescape=True).from_string("{% for x in items %}{{ x }};{% endfor %}")
assert template.render(items=["<b>", 2]) == "&lt;b&gt;;2;"
730,547,904Passed
Blocked by a dependency
MarkupSafe 3.0.4 publishes no wheel for this interpreter.

ERROR: Could not find a version that satisfies the requirement MarkupSafe>=2.0 (from jinja2) (from versions: none)
ERROR: No matching distribution found for MarkupSafe>=2.0
Its sdist does not build without a compiler.
via MarkupSafe
40starlette 1.10.0starletteImport only: no functional check yet725,066,633Import onlyImport only
41pillow 13.0.0PIL.Image
Functional check
from io import BytesIO
from PIL import Image
image = Image.new("RGB", (4, 3), (255, 0, 0))
buffer = BytesIO()
image.save(buffer, "PNG")
again = Image.open(BytesIO(buffer.getvalue()))
assert again.size == (4, 3)
assert again.convert("RGB").getpixel((1, 1)) == (255, 0, 0)
724,986,905Passed
Native code, not tested
The release publishes no pure-Python wheel.
42pandas 3.1.1pandas
Functional check
import pandas as pd
frame = pd.DataFrame({"team": ["a", "b", "a"], "score": [1, 2, 3]})
assert frame.groupby("team")["score"].sum().to_dict() == {"a": 4, "b": 2}
assert frame.sort_values("score", ascending=False)["team"].tolist() == ["a", "b", "a"]
723,801,756Passed
Native code, not tested
The release publishes no pure-Python wheel.
43uvicorn 0.54.0uvicornImport only: no functional check yet694,809,014Import onlyImport only
44rpds-py 2026.9.1rpds
Functional check
from rpds import HashTrieMap, List
mapping = HashTrieMap({"a": 1}).insert("b", 2)
assert mapping["b"] == 2 and len(mapping) == 2 and "b" not in HashTrieMap({"a": 1})
assert list(List([1, 2]).push_front(0)) == [0, 1, 2]
687,808,420Passed
Native code, not tested
The release publishes no pure-Python wheel.
45jsonschema 4.26.0jsonschema
Functional check
import jsonschema
schema = {"type": "object", "properties": {"count": {"type": "integer"}}, "required": ["count"]}
jsonschema.validate({"count": 1}, schema)
try:
    jsonschema.validate({"count": "one"}, schema)
except jsonschema.ValidationError:
    pass
else:
    raise AssertionError("invalid document accepted")
676,944,993Passed
Blocked by a dependency
rpds-py 2026.9.1 publishes no wheel for this interpreter.

ERROR: Could not find a version that satisfies the requirement rpds-py>=0.25.0 (from jsonschema) (from versions: none)
ERROR: No matching distribution found for rpds-py>=0.25.0
Its sdist does not build without a compiler.
via rpds-py
46platformdirs 4.14.8platformdirsImport only: no functional check yet675,007,506Import onlyImport only
47pathspec 1.1.1pathspec
Functional check
import pathspec
spec = pathspec.PathSpec.from_lines("gitwildmatch", ["*.py", "!keep.py"])
assert spec.match_file("a/b.py") and not spec.match_file("keep.py") and not spec.match_file("a.txt")
652,406,147PassedPassed
48referencing 0.37.0referencingImport only: no functional check yet646,704,055Import only
Blocked by a dependency
rpds-py 2026.9.1 publishes no wheel for this interpreter.

ERROR: Could not find a version that satisfies the requirement rpds-py>=0.7.0 (from referencing) (from versions: none)
ERROR: No matching distribution found for rpds-py>=0.7.0
Its sdist does not build without a compiler.
via rpds-py
49jsonschema-specifications 2025.9.1jsonschema_specificationsImport only: no functional check yet643,129,928Import only
Blocked by a dependency
rpds-py 2026.9.1 publishes no wheel for this interpreter.

ERROR: Cannot install jsonschema-specifications because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
    referencing 0.37.0 depends on rpds-py>=0.7.0
    referencing 0.36.2 depends on rpds-py>=0.7.0
    referencing 0.36.1 depends on rpds-py>=0.7.0
    referencing 0.36.0 depends on rpds-py>=0.7.0
    referencing 0.35.1 depends on rpds-py>=0.7.0
    referencing 0.35.0 depends on rpds-py>=0.7.0
    referencing 0.34.0 depends on rpds-py>=0.7.0
    referencing 0.33.0 depends on rpds-py>=0.7.0
    referencing 0.32.1 depends on rpds-py>=0.7.0
    referencing 0.32.0 depends on rpds-py>=0.7.0
    referencing 0.31.1 depends on rpds-py>=0.7.0
    referencing 0.31.0 depends on rpds-py>=0.7.0
Its sdist does not build without a compiler.
via rpds-py
50filelock 4.3.1filelock
Functional check
import os
import tempfile
from filelock import FileLock
path = os.path.join(tempfile.mkdtemp(), "conformity.lock")
with FileLock(path) as lock:
    assert lock.is_locked
assert not lock.is_locked
635,569,166PassedPassed

Applications

Small scenarios with pinned releases of Django, Bottle and NumPy, run on each interpreter from isolated wheel directories.

CPython 3.14.9

4 / 4

RustPython 0.6.0a0

2 / 4

1 missing wheel · 1 test error

ScenarioCPythonRustPython
Django 5.2.19Render a template with autoescaping
Code
def django_template():
    from django.conf import settings
    from django.template import Context, Engine

    settings.configure(USE_I18N=False)
    template = Engine().from_string("{% for item in items %}{{ item }}{% if not forloop.last %}, {% endif %}{% endfor %}")
    rendered = template.render(Context({"items": ["<draft>", "ready"]}))
    assert rendered == "&lt;draft&gt;, ready", rendered
PassedPassed
Django 5.2.19Aggregate rows after a rolled-back SQLite transaction
Code
def django_sqlite():
    import django
    from django.conf import settings

    settings.configure(
        DATABASES={"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}},
        INSTALLED_APPS=[],
        USE_TZ=True,
    )
    django.setup()
    from django.db import connection, models, transaction

    class Item(models.Model):
        label = models.CharField(max_length=20)
        quantity = models.IntegerField()

        class Meta:
            app_label = "dashboard_checks"

    with connection.schema_editor() as schema:
        schema.create_model(Item)
    Item.objects.bulk_create([Item(label="red", quantity=3), Item(label="blue", quantity=4)])
    with transaction.atomic():
        Item.objects.create(label="draft", quantity=50)
        transaction.set_rollback(True)
    observed = Item.objects.filter(quantity__gte=3).aggregate(total=models.Sum("quantity"))
    assert observed == {"total": 7}, observed
Passed
Test error
    ~~~~~~~~~~~~^^
  File "<wheels>/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "<wheels>/django/db/backends/base/base.py", line 256, in connect
    self.connection = self.get_new_connection(conn_params)
                      ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "<wheels>/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "<wheels>/django/db/backends/sqlite3/base.py", line 207, in get_new_connection
    register_functions(conn)
    ~~~~~~~~~~~~~~~~~~^^^^^^
  File "<wheels>/django/db/backends/sqlite3/_functions.py", line 85, in register
    if not connection.execute(sql).fetchone()[0]:
           ~~~~~~~~~~~~~~~~~~^^^^^
MemoryError: string pointer is null
Bottle 0.13.4Route a WSGI request to a JSON handler
Code
def bottle_route():
    from wsgiref.util import setup_testing_defaults

    from bottle import Bottle, request

    app = Bottle()

    @app.get("/items/<identifier:int>")
    def item(identifier):
        return {"id": identifier, "preview": request.query.preview == "yes"}

    environ = {}
    setup_testing_defaults(environ)
    environ.update(PATH_INFO="/items/42", QUERY_STRING="preview=yes")

    def check_headers(status, headers, exc_info=None):
        assert status.startswith("200 "), status
        assert dict(headers)["Content-Type"].startswith("application/json"), headers

    payload = b"".join(app(environ, check_headers))
    assert json.loads(payload) == {"id": 42, "preview": True}, payload
PassedPassed
NumPy 2.4.4Slice arrays and solve a linear system
Code
def numpy_array():
    import os

    os.environ["OPENBLAS_NUM_THREADS"] = "1"
    import numpy as np

    source = np.arange(12, dtype=np.int64).reshape(3, 4)
    assert (source[:, ::-2] + [1, 2]).sum(axis=0).tolist() == [24, 21]
    coefficients = np.array([[3.0, 1.0], [1.0, 2.0]])
    solution = np.linalg.solve(coefficients, [7.0, 4.0])
    assert np.allclose(solution, [2.0, 1.0], rtol=1e-12, atol=1e-12), solution
PassedNo wheel

Shared cases

Each interpreter runs the same calls. Values and exceptions are compared with the CPython reference.

Each case says what guarantees its expected result. A difference on documented behavior is a conformity gap. A difference on CPython behavior is not necessarily a bug.

CPython 3.14.9

76 / 76

RustPython 0.6.0a0

76 / 76

CaseCPythonRustPython
json.loadsDecode an empty object
import json

json.loads('{}')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns {} (dict)

RustPython

Returns {} (dict)
PassedPassed
json.loadsAllow whitespace around separators
import json

json.loads('{  "reponse"  :  42  }')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns {'reponse': 42} (dict)

RustPython

Returns {'reponse': 42} (dict)
PassedPassed
json.loadsReject extra data after a value
import json

json.loads('[1, 2]3')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Raises json.JSONDecodeError

RustPython

Raises json.JSONDecodeError
PassedPassed
json.loadsDecode a character outside the Basic Multilingual Plane
import json

ord(json.loads('\"\\ud83d\\ude80\"'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 128640 (int)

RustPython

Returns 128640 (int)
PassedPassed
json.loadsConvert integers with parse_int
import json

json.loads('7', parse_int=float)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 7.0 (float)

RustPython

Returns 7.0 (float)
PassedPassed
json.dumpsCustomize output separators
import json

json.dumps({'a': [1, 2]}, separators=(',', ':'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns '{"a":[1,2]}' (str)

RustPython

Returns '{"a":[1,2]}' (str)
PassedPassed
struct.packPack a big-endian integer
import struct

struct.pack('>H', 0x1234)

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns b'\x124' (bytes)

RustPython

Returns b'\x124' (bytes)
PassedPassed
struct.unpackUnpack a signed little-endian integer
import struct

struct.unpack('<h', b'\xfe\xff')

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns (-2,) (tuple)

RustPython

Returns (-2,) (tuple)
PassedPassed
struct.calcsizeCount padding bytes
import struct

struct.calcsize('>B3xH')

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns 6 (int)

RustPython

Returns 6 (int)
PassedPassed
struct.unpack_fromRead from an offset
import struct

struct.unpack_from('>H', b'x\x01\x02', 1)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (258,) (tuple)

RustPython

Returns (258,) (tuple)
PassedPassed
struct.calcsizeReject an unknown format
import struct

struct.calcsize('Z')

Contract: Not yet classified

Upstream CPython test that checks the same behavior

CPython

Raises struct.error

RustPython

Raises struct.error
PassedPassed
struct.iter_unpackUnpack multiple records
import struct

list(struct.iter_unpack('>H', b'\x00\x01\x00\x02'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [(1,), (2,)] (list)

RustPython

Returns [(1,), (2,)] (list)
PassedPassed
binascii.hexlifyEncode bytes as hexadecimal
import binascii

binascii.hexlify(b'\x00\xff')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns b'00ff' (bytes)

RustPython

Returns b'00ff' (bytes)
PassedPassed
binascii.unhexlifyDecode mixed-case hexadecimal
import binascii

binascii.unhexlify('00Ff')

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns b'\x00\xff' (bytes)

RustPython

Returns b'\x00\xff' (bytes)
PassedPassed
binascii.unhexlifyReject a single hex digit
import binascii

binascii.unhexlify('a')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Raises binascii.Error

RustPython

Raises binascii.Error
PassedPassed
binascii.a2b_base64Decode padded Base64
import binascii

binascii.a2b_base64(b'YWI=')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns b'ab' (bytes)

RustPython

Returns b'ab' (bytes)
PassedPassed
binascii.b2a_base64Omit the Base64 trailing newline
import binascii

binascii.b2a_base64(b'ab', newline=False)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns b'YWI=' (bytes)

RustPython

Returns b'YWI=' (bytes)
PassedPassed
binascii.crc32Compute an unsigned CRC-32
import binascii

binascii.crc32(b'123456789')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 3421780262 (int)

RustPython

Returns 3421780262 (int)
PassedPassed
binascii.crc_hqxCompute CRC-16 with an initial value
import binascii

binascii.crc_hqx(b'123456789', 0xffff)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 10673 (int)

RustPython

Returns 10673 (int)
PassedPassed
math.sqrtCompute an exact square root
import math

math.sqrt(81)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 9.0 (float)

RustPython

Returns 9.0 (float)
PassedPassed
math.sqrtReject a negative argument to square root
import math

math.sqrt(-1)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Raises ValueError

RustPython

Raises ValueError
PassedPassed
math.floorRound a negative number down
import math

math.floor(-1.25)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns -2 (int)

RustPython

Returns -2 (int)
PassedPassed
math.isnanIdentify a NaN
import math

math.isnan(float('nan'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
math.iscloseUse absolute tolerance near zero
import math

math.isclose(0.0, 1e-10, abs_tol=1e-9)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
math.gcdCompute the GCD with a negative argument
import math

math.gcd(-18, 24)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 6 (int)

RustPython

Returns 6 (int)
PassedPassed
re.fullmatchDo not backtrack into an atomic group
import re

re.fullmatch('(?>ab|a)b', 'ab') is None

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
re.fullmatchDo not give characters back after a possessive quantifier
import re

re.fullmatch('a*+a', 'aaa') is None

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
re.fullmatchApply Unicode case folding to character ranges
import re

re.fullmatch('[A-Z]', 'K', re.IGNORECASE) is not None

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
re.fullmatchRestrict case folding with the ASCII flag
import re

re.fullmatch('[A-Z]', 'K', re.IGNORECASE | re.ASCII) is None

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns True (bool)

RustPython

Returns True (bool)
PassedPassed
re.fullmatchUse a named group in a conditional branch
import re

re.fullmatch('(?P<quote><)?x(?(quote)>|!)', '<x>').groupdict()

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns {'quote': '<'} (dict)

RustPython

Returns {'quote': '<'} (dict)
PassedPassed
re.compileReject a variable-width lookbehind
import re

re.compile('(?<=a+)b')

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Raises re.error

RustPython

Raises re.error
PassedPassed
decimal.Decimal.quantizeRound ties to even digits
import decimal

(str(decimal.Decimal.quantize(decimal.Decimal('2.5'), decimal.Decimal('1'), rounding=decimal.ROUND_HALF_EVEN)), str(decimal.Decimal.quantize(decimal.Decimal('3.5'), decimal.Decimal('1'), rounding=decimal.ROUND_HALF_EVEN)))

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns ('2', '4') (tuple)

RustPython

Returns ('2', '4') (tuple)
PassedPassed
decimal.localcontextRestore precision after leaving a local context
import decimal

original = decimal.getcontext().prec
with decimal.localcontext(prec=3):
    inside = str(decimal.Decimal(1) / decimal.Decimal(3))
(inside, decimal.getcontext().prec == original)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('0.333', True) (tuple)

RustPython

Returns ('0.333', True) (tuple)
PassedPassed
decimal.Context.divideRaise an exception for a trapped inexact result
import decimal

context = decimal.Context(prec=3)
context.traps[decimal.Inexact] = True
decimal.Context.divide(context, decimal.Decimal(1), decimal.Decimal(3))

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Raises decimal.Inexact

RustPython

Raises decimal.Inexact
PassedPassed
decimal.Context.divideSet flags when division rounds the result
import decimal

context = decimal.Context(prec=3)
quotient = decimal.Context.divide(context, decimal.Decimal(1), decimal.Decimal(3))
(str(quotient), bool(context.flags[decimal.Inexact]), bool(context.flags[decimal.Rounded]))

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns ('0.333', True, True) (tuple)

RustPython

Returns ('0.333', True, True) (tuple)
PassedPassed
zlib.decompressobjDetect an incomplete stream until the trailer arrives
import zlib

original = b'python' * 16
encoded = zlib.compress(original)
decoder = zlib.decompressobj()
decoded = decoder.decompress(encoded[:-2])
before = decoder.eof
decoded += decoder.decompress(encoded[-2:])
(before, decoder.eof, decoded == original)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (False, True, True) (tuple)

RustPython

Returns (False, True, True) (tuple)
PassedPassed
zlib.decompressobjPreserve bytes after a compressed stream
import zlib

decoder = zlib.decompressobj()
(decoder.decompress(zlib.compress(b'payload') + b'next'), decoder.unused_data)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (b'payload', b'next') (tuple)

RustPython

Returns (b'payload', b'next') (tuple)
PassedPassed
zlib.decompressobjResume decoding after an output limit
import zlib

decoder = zlib.decompressobj()
first = decoder.decompress(zlib.compress(b'ab' * 100), max_length=5)
tail = decoder.unconsumed_tail
had_tail = bool(tail)
rest = decoder.decompress(tail)
(first, had_tail, len(rest), decoder.eof)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (b'ababa', True, 195, True) (tuple)

RustPython

Returns (b'ababa', True, 195, True) (tuple)
PassedPassed
zlib.compressobjDecode a stream made with a preset dictionary
import zlib

dictionary = b'common prefix: red and blue and green'
encoder = zlib.compressobj(zdict=dictionary)
encoded = encoder.compress(b'common prefix: blue') + encoder.flush()
decoder = zlib.decompressobj(zdict=dictionary)
(decoder.decompress(encoded), decoder.eof)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (b'common prefix: blue', True) (tuple)

RustPython

Returns (b'common prefix: blue', True) (tuple)
PassedPassed
zlib.compressSelect a gzip wrapper using the window parameter
import zlib

encoded = zlib.compress(b'output', wbits=31)
(encoded[:2], zlib.decompress(encoded, wbits=31))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (b'\x1f\x8b', b'output') (tuple)

RustPython

Returns (b'\x1f\x8b', b'output') (tuple)
PassedPassed
sqlite3.connectRoll back an insert after a commit
import sqlite3

connection = sqlite3.connect(':memory:')
connection.execute('create table example (value integer)')
connection.execute('insert into example values (?)', (1,))
connection.commit()
connection.execute('insert into example values (?)', (2,))
inside = connection.in_transaction
connection.rollback()
rows = connection.execute('select value from example').fetchall()
(inside, connection.in_transaction, rows)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (True, False, [(1,)]) (tuple)

RustPython

Returns (True, False, [(1,)]) (tuple)
PassedPassed
sqlite3.Connection.executeBind named parameters with SQL punctuation in the value
import sqlite3

connection = sqlite3.connect(':memory:')
sqlite3.Connection.execute(connection, 'select :item, :count', {'item': "it's here", 'count': 7}).fetchone()

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ("it's here", 7) (tuple)

RustPython

Returns ("it's here", 7) (tuple)
PassedPassed
sqlite3.RowLook up result column names without matching case
import sqlite3

connection = sqlite3.connect(':memory:')
connection.row_factory = sqlite3.Row
row = connection.execute("select 'value' as Label, 4 as count").fetchone()
(row['label'], row['LABEL'], row[-1], row.keys())

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('value', 'value', 4, ['Label', 'count']) (tuple)

RustPython

Returns ('value', 'value', 4, ['Label', 'count']) (tuple)
PassedPassed
sqlite3.Connection.executeRaise IntegrityError on a duplicate key
import sqlite3

connection = sqlite3.connect(':memory:')
connection.execute('create table example (value integer unique)')
connection.execute('insert into example values (1)')
sqlite3.Connection.execute(connection, 'insert into example values (1)')

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Raises sqlite3.IntegrityError

RustPython

Raises sqlite3.IntegrityError
PassedPassed
sqlite3.Connection.blobopenWrite and read bytes at an offset in a blob
import sqlite3

connection = sqlite3.connect(':memory:')
connection.execute('create table example (data blob)')
connection.execute('insert into example values (zeroblob(4))')
with sqlite3.Connection.blobopen(connection, 'example', 'data', 1) as blob:
    blob.seek(1)
    blob.write(b'xy')
    blob.seek(0)
    raw = blob.read()
raw

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns b'\x00xy\x00' (bytes)

RustPython

Returns b'\x00xy\x00' (bytes)
PassedPassed
sqlite3.Connection.create_functionRegister a deterministic SQL function
import sqlite3

connection = sqlite3.connect(':memory:')
sqlite3.Connection.create_function(connection, 'triple', 1, lambda n: n * 3, deterministic=True)
connection.execute('select triple(4)').fetchone()

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (12,) (tuple)

RustPython

Returns (12,) (tuple)
PassedPassed
ssl.MemoryBIOTrack pending bytes after a partial read
import ssl

bio = ssl.MemoryBIO()
bio.write(b'abcd')
(bio.pending, bio.read(2), bio.pending, bio.read())

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (4, b'ab', 2, b'cd') (tuple)

RustPython

Returns (4, b'ab', 2, b'cd') (tuple)
PassedPassed
ssl.MemoryBIOReport EOF once read buffers are empty
import ssl

bio = ssl.MemoryBIO()
bio.write(b'ab')
bio.write_eof()
(bio.eof, bio.read(), bio.eof)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (False, b'ab', True) (tuple)

RustPython

Returns (False, b'ab', True) (tuple)
PassedPassed
ssl.SSLContextEnable peer verification and hostname checks for TLS clients
import ssl

context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
(context.verify_mode == ssl.CERT_REQUIRED, context.check_hostname)

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (True, True) (tuple)

RustPython

Returns (True, True) (tuple)
PassedPassed
ssl.SSLContext.wrap_bioExpose the configured hostname on an SSL object
import ssl

context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
ssl.SSLContext.wrap_bio(context, ssl.MemoryBIO(), ssl.MemoryBIO(), server_hostname='example.test').server_hostname

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns 'example.test' (str)

RustPython

Returns 'example.test' (str)
PassedPassed
mmap.mmapMove overlapping ranges within a memory map
import mmap

region = mmap.mmap(-1, 6)
region[:] = b'abcdef'
region.move(1, 0, 4)
region[:6]

Contract: CPython behavior, not documented

Upstream CPython test that checks the same behavior

CPython

Returns b'aabcdf' (bytes)

RustPython

Returns b'aabcdf' (bytes)
PassedPassed
mmap.mmapReject closing a map with an active memory view
import mmap

region = mmap.mmap(-1, 4)
view = memoryview(region)
region.close()

Contract: CPython behavior, not documented

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Raises BufferError

RustPython

Raises BufferError
PassedPassed
mmap.mmapAssign to a strided memory map slice
import mmap

region = mmap.mmap(-1, 6)
region[:] = b'abcdef'
region[::2] = b'xyz'
region[:]

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns b'xbydzf' (bytes)

RustPython

Returns b'xbydzf' (bytes)
PassedPassed
mmap.mmapSeek backwards from the end before reading
import mmap

region = mmap.mmap(-1, 6)
region[:] = b'abcdef'
region.seek(-2, 2)
(region.tell(), region.read(2))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (4, b'ef') (tuple)

RustPython

Returns (4, b'ef') (tuple)
PassedPassed
codecs.getincrementaldecoderDecode a Unicode character split across chunks
import codecs

decoder = codecs.getincrementaldecoder('utf-8')()
(decoder.decode(b'\xe2\x82'), decoder.decode(b'\xac', final=True))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('', '€') (tuple)

RustPython

Returns ('', '€') (tuple)
PassedPassed
codecs.getincrementaldecoderReject a truncated UTF-8 sequence at EOF
import codecs

decoder = codecs.getincrementaldecoder('utf-8')()
decoder.decode(b'\xe2\x82')
decoder.decode(b'', final=True)

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Raises UnicodeDecodeError

RustPython

Raises UnicodeDecodeError
PassedPassed
codecs.decodePreserve invalid UTF-8 bytes with surrogateescape
import codecs

ord(codecs.decode(b'\xff', 'utf-8', 'surrogateescape'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns 56575 (int)

RustPython

Returns 56575 (int)
PassedPassed
codecs.getincrementaldecoderConsume a UTF-8 BOM split across chunks
import codecs

decoder = codecs.getincrementaldecoder('utf-8-sig')()
(decoder.decode(b'\xef'), decoder.decode(b'\xbb\xbfA', final=True))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('', 'A') (tuple)

RustPython

Returns ('', 'A') (tuple)
PassedPassed
datetime.datetime.fromisoformatPreserve a non-hour UTC offset
import datetime

datetime.datetime.fromisoformat('2024-02-29T12:30:15+05:45').isoformat()

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns '2024-02-29T12:30:15+05:45' (str)

RustPython

Returns '2024-02-29T12:30:15+05:45' (str)
PassedPassed
datetime.datetime.fromisoformatParse the ISO 8601 UTC suffix
import datetime

datetime.datetime.fromisoformat('2024-02-29T12:30:15Z').isoformat()

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns '2024-02-29T12:30:15+00:00' (str)

RustPython

Returns '2024-02-29T12:30:15+00:00' (str)
PassedPassed
datetime.date.fromisoformatReject an impossible leap-day date
import datetime

datetime.date.fromisoformat('2023-02-29')

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Raises ValueError

RustPython

Raises ValueError
PassedPassed
zoneinfo.ZoneInfo.from_fileDisambiguate the repeated hour at a DST transition
import zoneinfo

from datetime import datetime
from io import BytesIO
from struct import pack

header = b'TZif' + bytes(16) + pack('>6I', 0, 0, 0, 2, 2, 8)
transitions = pack('>2i2B', 1615705200, 1636264800, 0, 1)
offsets = pack('>iBBiBB', -14400, 1, 0, -18000, 0, 4)
zone = zoneinfo.ZoneInfo.from_file(BytesIO(header + transitions + offsets + b'EDT\0EST\0'), key='Example/Fold')
earlier = datetime(2021, 11, 7, 1, 30, tzinfo=zone, fold=0)
later = earlier.replace(fold=1)
(earlier.isoformat(), later.isoformat(), int(later.timestamp() - earlier.timestamp()))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('2021-11-07T01:30:00-04:00', '2021-11-07T01:30:00-05:00', 3600) (tuple)

RustPython

Returns ('2021-11-07T01:30:00-04:00', '2021-11-07T01:30:00-05:00', 3600) (tuple)
PassedPassed
csv.readerRead a quoted field across physical lines
import csv

list(csv.reader(['"a\n', 'b",c\n']))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [['a\nb', 'c']] (list)

RustPython

Returns [['a\nb', 'c']] (list)
PassedPassed
csv.readerPreserve an embedded null in a CSV field
import csv

list(csv.reader(['data\0field,2']))

Contract: Not yet classified

Upstream CPython test that checks the same behavior

CPython

Returns [['data\x00field', '2']] (list)

RustPython

Returns [['data\x00field', '2']] (list)
PassedPassed
csv.readerReject an unterminated quoted field in strict mode
import csv

list(csv.reader(['"unclosed'], strict=True))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Raises csv.Error

RustPython

Raises csv.Error
PassedPassed
csv.DictReaderCollect extra columns under the configured key
import csv

list(csv.DictReader(['name', 'item,extra,more'], restkey='rest'))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [{'name': 'item', 'rest': ['extra', 'more']}] (list)

RustPython

Returns [{'name': 'item', 'rest': ['extra', 'more']}] (list)
PassedPassed
itertools.pairwiseReturn overlapping pairs from a one-shot iterator
import itertools

list(itertools.pairwise(iter([1, 2, 4, 8])))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [(1, 2), (2, 4), (4, 8)] (list)

RustPython

Returns [(1, 2), (2, 4), (4, 8)] (list)
PassedPassed
itertools.isliceAdvance the original iterator to the slice stop
import itertools

items = iter(range(10))
(list(itertools.islice(items, 2, 7, 3)), next(items))

Contract: Not yet classified

Upstream CPython test that checks the same behavior

CPython

Returns ([2, 5], 7) (tuple)

RustPython

Returns ([2, 5], 7) (tuple)
PassedPassed
itertools.accumulateInclude the initial value in an empty accumulation
import itertools

list(itertools.accumulate([], initial=9))

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [9] (list)

RustPython

Returns [9] (list)
PassedPassed
itertools.groupbyKeep separate runs of the same group key
import itertools

[(key, ''.join(values)) for key, values in itertools.groupby('aabba')]

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns [('a', 'aa'), ('b', 'bb'), ('a', 'a')] (list)

RustPython

Returns [('a', 'aa'), ('b', 'bb'), ('a', 'a')] (list)
PassedPassed
threading.ThreadAppend from several threads without losing items
import threading

items = []

def work():
    for number in range(10000):
        items.append(number)

threads = [threading.Thread(target=work) for _ in range(4)]
for thread in threads:
    thread.start()
for thread in threads:
    thread.join()
(len(items), sum(items))

Contract: CPython behavior, not documented

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns (40000, 199980000) (tuple)

RustPython

Returns (40000, 199980000) (tuple)
PassedPassed
threading.LockProtect a shared counter with a lock
import threading

lock = threading.Lock()
counter = [0]

def work():
    for _ in range(5000):
        with lock:
            counter[0] += 1

threads = [threading.Thread(target=work) for _ in range(4)]
for thread in threads:
    thread.start()
for thread in threads:
    thread.join()
counter[0]

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns 20000 (int)

RustPython

Returns 20000 (int)
PassedPassed
threading.localKeep thread-local values separate
import threading

state = threading.local()
state.value = 'main'
seen = []

def work():
    state.value = 'worker'
    seen.append(state.value)

thread = threading.Thread(target=work)
thread.start()
thread.join()
(state.value, seen)

Contract: Documented standard library behavior

Written for this dashboard. No upstream CPython test checks this behavior.

CPython

Returns ('main', ['worker']) (tuple)

RustPython

Returns ('main', ['worker']) (tuple)
PassedPassed
asyncio.TaskGroupWait for every child before leaving a task group
import asyncio

async def double(n):
    await asyncio.sleep(0)
    return n * 2

async def main():
    async with asyncio.TaskGroup() as tasks:
        first = tasks.create_task(double(1))
        second = tasks.create_task(double(4))
    return first.result(), second.result()
asyncio.run(main())

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (2, 8) (tuple)

RustPython

Returns (2, 8) (tuple)
PassedPassed
asyncio.TaskGroupCancel a sibling when another child raises
import asyncio

async def main():
    ready = asyncio.Event()
    cancelled = False
    failed = False

    async def sibling():
        nonlocal cancelled
        try:
            ready.set()
            await asyncio.Event().wait()
        finally:
            cancelled = True

    async def fail():
        await ready.wait()
        raise LookupError('child failed')

    try:
        async with asyncio.TaskGroup() as tasks:
            tasks.create_task(sibling())
            tasks.create_task(fail())
    except* LookupError:
        failed = True
    return failed, cancelled
asyncio.run(main())

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns (True, True) (tuple)

RustPython

Returns (True, True) (tuple)
PassedPassed
asyncio.TaskGroupPass an explicit context to a child task
import asyncio

from contextvars import Context, ContextVar
label = ContextVar('label', default='parent')

async def read():
    return label.get()

async def main():
    context = Context()
    context.run(label.set, 'child')
    async with asyncio.TaskGroup() as tasks:
        child = tasks.create_task(read(), context=context)
    return child.result(), label.get()
asyncio.run(main())

Contract: Documented standard library behavior

Upstream CPython test that checks the same behavior

CPython

Returns ('child', 'parent') (tuple)

RustPython

Returns ('child', 'parent') (tuple)
PassedPassed

CPython tests

Selected test methods from the CPython source tree, run on CPython, PyPy, GraalPy and RustPython.

CPython 3.14.9

64 / 64

RustPython 0.6.0a0

55 / 64

9 blocked measurements

CaseCPythonRustPython
test_empty_objectsjson

View source test

RustPython

Failed to import test module: test_json
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_json", line 13, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'json'
PassedMeasurement blocked
test_floatjson

View source test

RustPython

Failed to import test module: test_json
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_json", line 13, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'json'
PassedMeasurement blocked
test_object_pairs_hookjson

View source test

RustPython

Failed to import test module: test_json
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_json", line 13, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'json'
PassedMeasurement blocked
test_big_unicode_decodejson

View source test

RustPython

Failed to import test module: test_json
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_json", line 13, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'json'
PassedMeasurement blocked
test_separatorsjson

View source test

RustPython

Failed to import test module: test_json
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_json", line 13, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'json'
PassedMeasurement blocked
test_calcsizestruct
PassedPassed
test_transitivenessstruct
PassedPassed
test_unpack_fromstruct
PassedPassed
test_pack_intostruct
PassedPassed
test_module_funcstruct
PassedPassed
test_base64validbinascii
PassedPassed
test_hexbinascii
PassedPassed
test_crc32binascii
PassedPassed
test_crc_hqxbinascii
PassedPassed
test_b2a_base64_newlinebinascii
PassedPassed
testSqrtmath
PassedPassed
testFloormath
PassedPassed
testIsnanmath
PassedPassed
testGcdmath
PassedPassed
test_near_zeromath
PassedPassed
test_fullmatch_atomic_groupingre
PassedPassed
test_fullmatch_possessive_quantifiersre
PassedPassed
test_ignore_case_rangere
PassedPassed
test_re_groupref_existsre
PassedPassed
test_lookbehindre
PassedPassed
test_quantizedecimal

View source test

RustPython

Failed to import test module: test_decimal
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_decimal", line 56, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'decimal'
PassedMeasurement blocked
test_nested_with_statementsdecimal

View source test

RustPython

Failed to import test module: test_decimal
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_decimal", line 56, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'decimal'
PassedMeasurement blocked
test_local_context_kwargs_does_not_overwrite_existing_argumentdecimal

View source test

RustPython

Failed to import test module: test_decimal
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_decimal", line 56, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'decimal'
PassedMeasurement blocked
test_explicit_from_floatdecimal

View source test

RustPython

Failed to import test module: test_decimal
Traceback (most recent call last):
  File "unittest.loader", line 137, in loadTestsFromName
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1179, in exec_module
  File "test.test_decimal", line 56, in <module>
  File "test.support.import_helper", line 182, in import_fresh_module
  File "importlib", line 88, in import_module
  File "<frozen importlib._bootstrap>", line 1406, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'decimal'
PassedMeasurement blocked
test_decompress_eof_incomplete_streamzlib
PassedPassed
test_decompress_unused_datazlib
PassedPassed
test_decompressmaxlenzlib
PassedPassed
test_dictionary_streamingzlib
PassedPassed
test_sqlite_row_as_dictsqlite3
PassedPassed
test_sqlite_row_index_unicodesqlite3
PassedPassed
test_sqlite_row_slicesqlite3
PassedPassed
test_simplesqlite3
PassedPassed
test_progresssqlite3
PassedPassed
test_pendingssl

View source test

CPython

test_ssl: testing with 'OpenSSL 3.5.9 29 Sep 2026' (3, 5, 0, 9, 0)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.39'
          HAS_SNI = True
          OP_ALL = 0x80000050
          OP_NO_TLSv1_1 = 0x10000000

RustPython

test_ssl: testing with 'OpenSSL 3.3.0-compatible (AWS-LC/rustls 0.23)' (3, 3, 0, 0, 15)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.38'
          HAS_SNI = True
          OP_ALL = 0x     bfb
          OP_NO_TLSv1_1 = 0x10000000
PassedPassed
test_eofssl

View source test

CPython

test_ssl: testing with 'OpenSSL 3.5.9 29 Sep 2026' (3, 5, 0, 9, 0)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.39'
          HAS_SNI = True
          OP_ALL = 0x80000050
          OP_NO_TLSv1_1 = 0x10000000

RustPython

test_ssl: testing with 'OpenSSL 3.3.0-compatible (AWS-LC/rustls 0.23)' (3, 3, 0, 0, 15)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.38'
          HAS_SNI = True
          OP_ALL = 0x     bfb
          OP_NO_TLSv1_1 = 0x10000000
PassedPassed
test_context_client_serverssl

View source test

CPython

test_ssl: testing with 'OpenSSL 3.5.9 29 Sep 2026' (3, 5, 0, 9, 0)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.39'
          HAS_SNI = True
          OP_ALL = 0x80000050
          OP_NO_TLSv1_1 = 0x10000000

RustPython

test_ssl: testing with 'OpenSSL 3.3.0-compatible (AWS-LC/rustls 0.23)' (3, 3, 0, 0, 15)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.38'
          HAS_SNI = True
          OP_ALL = 0x     bfb
          OP_NO_TLSv1_1 = 0x10000000
PassedPassed
test_buffer_typesssl

View source test

CPython

test_ssl: testing with 'OpenSSL 3.5.9 29 Sep 2026' (3, 5, 0, 9, 0)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.39'
          HAS_SNI = True
          OP_ALL = 0x80000050
          OP_NO_TLSv1_1 = 0x10000000

RustPython

test_ssl: testing with 'OpenSSL 3.3.0-compatible (AWS-LC/rustls 0.23)' (3, 3, 0, 0, 15)
          under 'Linux-7.0.0-1020-azure-x86_64-with-glibc2.38'
          HAS_SNI = True
          OP_ALL = 0x     bfb
          OP_NO_TLSv1_1 = 0x10000000
PassedPassed
test_movemmap
PassedPassed
test_extended_getslicemmap
PassedPassed
test_extended_set_del_slicemmap
PassedPassed
test_context_managermmap
PassedPassed
test_partialcodecs
PassedPassed
test_decode_errorcodecs
PassedPassed
test_utf8codecs
PassedPassed
test_partialcodecs
PassedPassed
test_fromisoformat_timezonedatetime
PassedPassed
test_fromisoformat_utcdatetime
PassedPassed
test_fromisoformat_failsdatetime
PassedPassed
test_roundtrip_quoteed_newlinescsv
PassedPassed
test_read_nulcsv
PassedPassed
test_read_eofcsv
PassedPassed
test_read_long_with_restcsv
PassedPassed
test_pairwiseitertools
PassedPassed
test_isliceitertools
PassedPassed
test_accumulateitertools
PassedPassed
test_groupbyitertools
PassedPassed
test_taskgroup_01asyncio
PassedPassed
test_cancel_children_on_child_errorasyncio
PassedPassed
test_taskgroup_task_contextasyncio
PassedPassed

Interpreters

Four threads run the same CPU-bound function. The speedup compares them with four sequential calls. About ×1 means the threads take turns, as under a global interpreter lock. A value close to the number of workers means they run in parallel. The measurement is limited by the cores of the machine that ran it.

InterpreterReleasePythonWheel ABIGILThread speedup
CPython3.14.93.14.9cp314Enabled×1.08 · 4 threads · 4 cores
RustPython0.6.0a03.14.0a0rustpython313_x86_64_linux_gnuDisabled×2.14 · 4 threads · 4 cores

Performance

Each benchmark runs in its own process on each interpreter: one cold call, warm-up rounds for JIT compilers, then timed rounds for a few seconds, at least three. The table shows the median. An answer that differs from CPython's is reported as a difference instead of a time. These are classic kernels (n-body, fannkuch-redux, spectral norm, n-queens, floating point) and standard library workloads (json, re, collections), run on shared GitHub-hosted machines, so differences under about 10% mean little.

Geometric mean speed

CPython 3.14.9

×1

reference

RustPython 3.14.0.alpha

×0.31

across every benchmark

BenchmarkCPythonRustPython
nbodyN-body simulation
0.214 sreference
Median 0.214 s · minimum 0.206 s · deviation 0.00244 s
12 timed rounds · first call 0.202 s
0.962 s4.5× slower
Median 0.962 s · minimum 0.957 s · deviation 0.00369 s
3 timed rounds · first call 0.953 s
fannkuchFannkuch-redux permutations
0.144 sreference
Median 0.144 s · minimum 0.141 s · deviation 0.002 s
15 timed rounds · first call 0.145 s
0.669 s4.6× slower
Median 0.669 s · minimum 0.659 s · deviation 0.01 s
4 timed rounds · first call 0.659 s
spectral-normSpectral norm
0.193 sreference
Median 0.193 s · minimum 0.193 s · deviation 0.00306 s
13 timed rounds · first call 0.193 s
1.27 s6.6× slower
Median 1.27 s · minimum 1.27 s · deviation 0.00416 s
3 timed rounds · first call 0.996 s
nqueensN-queens with permutations
0.128 sreference
Median 0.128 s · minimum 0.128 s · deviation 0.0002 s
15 timed rounds · first call 0.128 s
0.473 s3.7× slower
Median 0.473 s · minimum 0.471 s · deviation 0.00061 s
6 timed rounds · first call 0.473 s
floatFloating-point objects
0.257 sreference
Median 0.257 s · minimum 0.246 s · deviation 0.0103 s
10 timed rounds · first call 0.265 s
0.886 s3.4× slower
Median 0.886 s · minimum 0.886 s · deviation 0.00108 s
3 timed rounds · first call 0.894 s
jsonJSON encode and decode
0.119 sreference
Median 0.119 s · minimum 0.118 s · deviation 0.00086 s
15 timed rounds · first call 0.122 s
0.184 s1.5× slower
Median 0.184 s · minimum 0.182 s · deviation 0.00272 s
14 timed rounds · first call 0.181 s
regexRegular expression search
0.116 sreference
Median 0.116 s · minimum 0.115 s · deviation 0.00087 s
15 timed rounds · first call 0.122 s
0.226 s1.9× slower
Median 0.226 s · minimum 0.224 s · deviation 0.00198 s
12 timed rounds · first call 0.228 s
word-countWord frequency count
0.16 sreference
Median 0.16 s · minimum 0.159 s · deviation 0.00468 s
15 timed rounds · first call 0.163 s
0.36 s2.2× slower
Median 0.36 s · minimum 0.359 s · deviation 0.00345 s
7 timed rounds · first call 0.361 s

History

Each measurement run adds one point. The same projects and releases are tested every time, so a change reflects the interpreters and the ecosystem.

Top 50 packages imported
  • CPython
  • RustPython
025502026-11-262026-11-262026-11-30
Table view
RunCPythonRustPython
2026-11-2650 / 5036 / 50
2026-11-2650 / 5036 / 50
2026-11-3050 / 5036 / 50
Application scenarios passed
  • CPython
  • RustPython
0242026-11-262026-11-262026-11-30
Table view
RunCPythonRustPython
2026-11-264 / 42 / 4
2026-11-264 / 42 / 4
2026-11-304 / 42 / 4
Shared cases passed
  • CPython
  • RustPython
038762026-11-262026-11-262026-11-30
Table view
RunCPythonRustPython
2026-11-2676 / 7676 / 76
2026-11-2676 / 7676 / 76
2026-11-3076 / 7676 / 76
Speed relative to CPython (geometric mean)
  • CPython
  • RustPython
×0.1×12026-11-262026-11-262026-11-30
Table view
RunCPythonRustPython
2026-11-26×1×0.25
2026-11-26×1×0.25
2026-11-30×1×0.31
Thread speedup (4 CPU-bound threads)
  • CPython
  • RustPython
×0×1×2×3×42026-11-262026-11-262026-11-30
Table view
RunCPythonRustPython
2026-11-26×1×1.59
2026-11-26×0.98×1.61
2026-11-30×1.08×2.14
Methodology and scope

Shared cases compare observed types and values with CPython. For invalid inputs, they check whether callers can catch the exception using the expected public class.

The CPython tests view runs selected upstream test methods on CPython, PyPy, GraalPy and RustPython. The JSON test harness enables the CPython accelerator when available. Shared cases import the module as usual.

These results apply to the cases, versions and platform shown. The shared cases cover APIs available in the reference CPython version. A module can be unavailable in a specific build. Each row links to the source test.