Beispiel
tzdata 2026.3: IANA_VERSION
Verifiziertes Beispiel für pypi tzdata 2026.3: IANA_VERSION. Der Vertrag lief auf python 3.12 · linux alpine/x64 · docker und bestand.
sha256:274c3c38fb247527a558c577893b2f7e04d129f7e4cc31958b39510c28c7da79
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
python linux 24 · ubuntu · glibc 2.39 x64 python python pip
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962… |
2026-08-27 |
Fall
HOW- Ziel
- verify pkg:pypi/tzdata@2026.3
- Pakete
- Symbole
-
- tzdata.IANA_VERSION
- Umgebung
- python
- Erstellt
- 2026-08-27T22:28:50Z
Contract
- tzdata.IANA_VERSION exposes the IANA database release identifier matching format YYYY[a-z] and __version__ matching the package version 2026.3.
- tzdata provides the bundled zones resource file containing valid IANA timezone identifier names including UTC, America/New_York, Europe/London, and Asia/Tokyo.
- tzdata.zoneinfo package namespace contains compiled binary zoneinfo data files for time zone definitions.
- zoneinfo.ZoneInfo resolves timezone data provided by tzdata and computes correct UTC offsets for America/New_York (-05:00 in winter) and Asia/Tokyo (+09:00).
- zoneinfo.ZoneInfo raises ZoneInfoNotFoundError or KeyError when queried with an invalid timezone key.
Dateien
- NOTES.md
- PROMPT.md
- csx.json
- requirements.txt
- spec.json
- test/contract.py
Quelltext
# tzdata IANA Time Zone Database for Python
This sample pins `tzdata` 2026.3 and verifies `tzdata.IANA_VERSION` and time zone data resources for Python's standard `zoneinfo` module.
The contract verifies:
- `tzdata.IANA_VERSION` exposes the IANA database release string (e.g. `'2026c'`) and `tzdata.__version__` matches `'2026.3'`.
- `tzdata` provides the `zones` resource file listing all valid IANA time zone identifiers.
- `tzdata.zoneinfo` package namespace contains compiled binary zoneinfo data files for major time zones.
- `zoneinfo.ZoneInfo` resolves timezone names and computes accurate UTC offsets.
- Invalid timezone names raise `ZoneInfoNotFoundError` or `KeyError`.
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:pypi/tzdata@2026.3
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:pypi/tzdata@2026.3
Demonstrate these symbols/APIs:
- tzdata.IANA_VERSION
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:645fed2b7f68fefc993be54776a3ffe4743e67b1f0515b8bca6735af5757e9cc","contract":["tzdata.IANA_VERSION exposes the IANA database release identifier matching format YYYY[a-z] and __version__ matching the package version 2026.3.","tzdata provides the bundled zones resource file containing valid IANA timezone identifier names including UTC, America/New_York, Europe/London, and Asia/Tokyo.","tzdata.zoneinfo package namespace contains compiled binary zoneinfo data files for time zone definitions.","zoneinfo.ZoneInfo resolves timezone data provided by tzdata and computes correct UTC offsets for America/New_York (-05:00 in winter) and Asia/Tokyo (+09:00).","zoneinfo.ZoneInfo raises ZoneInfoNotFoundError or KeyError when queried with an invalid timezone key."],"goal":"verify pkg:pypi/tzdata@2026.3","kind":"HOW","packages":["pkg:pypi/tzdata@2026.3"],"schemaVersion":1,"symbols":["tzdata.IANA_VERSION"]},"contractCommand":["python","test/contract.py"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"pypi","executionContext":"python","language":"python","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"pip","runtime":"python","schemaVersion":1},"license":"MIT-0","packages":["pkg:pypi/tzdata@2026.3"],"schemaVersion":1,"subject":"pkg:pypi/tzdata@2026.3","symbols":["tzdata.IANA_VERSION"],"verifierAdapter":"python@1"}
tzdata==2026.3
{
"schemaVersion": 1,
"goal": "verify pkg:pypi/tzdata@2026.3",
"kind": "HOW",
"packages": [
"pkg:pypi/tzdata@2026.3"
],
"symbols": [
"tzdata.IANA_VERSION"
]
}
import datetime
import importlib.resources
import re
import zoneinfo
import tzdata
# 1. Verify IANA_VERSION and __version__ attributes
assert hasattr(tzdata, "IANA_VERSION"), "tzdata must define IANA_VERSION"
assert isinstance(tzdata.IANA_VERSION, str), f"Expected str for IANA_VERSION, got {type(tzdata.IANA_VERSION)}"
assert re.match(r"^\d{4}[a-z]$", tzdata.IANA_VERSION), f"Unexpected IANA_VERSION format: {tzdata.IANA_VERSION}"
assert hasattr(tzdata, "__version__"), "tzdata must define __version__"
assert tzdata.__version__ == "2026.3", f"Expected __version__ 2026.3, got {tzdata.__version__}"
# 2. Verify tzdata package resource: zones listing file
zones_resource = importlib.resources.files("tzdata").joinpath("zones")
assert zones_resource.is_file(), "tzdata/zones resource file must exist and be a file"
zones_content = zones_resource.read_text(encoding="utf-8")
zones_list = [line.strip() for line in zones_content.splitlines() if line.strip()]
assert len(zones_list) >= 500, f"Expected at least 500 timezone entries, got {len(zones_list)}"
assert "UTC" in zones_list, "UTC must be listed in zones"
assert "America/New_York" in zones_list, "America/New_York must be listed in zones"
assert "Europe/London" in zones_list, "Europe/London must be listed in zones"
assert "Asia/Tokyo" in zones_list, "Asia/Tokyo must be listed in zones"
# 3. Verify tzdata.zoneinfo binary timezone data files exist
zi_resource = importlib.resources.files("tzdata.zoneinfo")
assert zi_resource.joinpath("UTC").is_file(), "tzdata.zoneinfo UTC file must exist"
assert zi_resource.joinpath("America", "New_York").is_file(), "tzdata.zoneinfo America/New_York file must exist"
assert zi_resource.joinpath("Europe", "London").is_file(), "tzdata.zoneinfo Europe/London file must exist"
assert zi_resource.joinpath("Asia", "Tokyo").is_file(), "tzdata.zoneinfo Asia/Tokyo file must exist"
# 4. Verify standard library zoneinfo.ZoneInfo resolution using tzdata
zi_ny = zoneinfo.ZoneInfo("America/New_York")
assert zi_ny.key == "America/New_York"
dt_utc_jan = datetime.datetime(2026, 1, 15, 12, 0, 0, tzinfo=datetime.timezone.utc)
dt_ny_jan = dt_utc_jan.astimezone(zi_ny)
assert dt_ny_jan.utcoffset() == datetime.timedelta(hours=-5), f"Expected -05:00 UTC offset, got {dt_ny_jan.utcoffset()}"
zi_tokyo = zoneinfo.ZoneInfo("Asia/Tokyo")
dt_tokyo = dt_utc_jan.astimezone(zi_tokyo)
assert dt_tokyo.utcoffset() == datetime.timedelta(hours=9), f"Expected +09:00 UTC offset, got {dt_tokyo.utcoffset()}"
# 5. Verify non-existent timezone key raises ZoneInfoNotFoundError
try:
zoneinfo.ZoneInfo("Invalid/NonExistent_Zone_12345")
raise AssertionError("Expected ZoneInfoNotFoundError for non-existent timezone key")
except (zoneinfo.ZoneInfoNotFoundError, KeyError):
pass
print("CONTRACT PASS: pkg:pypi/tzdata@2026.3 verified offline")
Ursprungs-Seeder
anonym