Skip to content

Convert TIMESTAMPTZ to Python through zoneinfo instead of pytz - #710

Merged
evertlammerts merged 7 commits into
duckdb:v2.0-cyanopterafrom
evertlammerts:zoneinfo-timestamptz
Oct 28, 2026
Merged

evertlammerts merged 7 commits into
duckdb:v2.0-cyanopterafrom
evertlammerts:zoneinfo-timestamptz

Conversation

@evertlammerts

Copy link
Copy Markdown
Member

Fetching a TIMESTAMPTZ as a Python value needed pytz, which no dependency group declares, so a clean install failed with "Required module 'pytz' failed to import" (#406). pytz's tables end at 2037, so every DST instant from 2038 on came back one hour off (#579).

Change: PythonObject::FromValue builds the value from datetime.timezone.utc and zoneinfo.ZoneInfo(TimeZone). The pytz import cache item and every pytz pin in pyproject, the benchmarks and the tests are gone.

We throw an error instead of relying on a pytz dependency when zoneinfo has no database (Windows without the tzdata package, or an ICU name IANA lacks such as ACT). Only this fetch path needs it, and a dependency would reach every install.

@evertlammerts
evertlammerts added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 23, 2026
@evertlammerts
evertlammerts added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 28, 2026
evertlammerts added a commit that referenced this pull request Oct 28, 2026
Every CI test job exported the test group to a pylock.toml and installed
it. uv.lock is untracked, so each job resolves afresh, and the pylock
exporter downloads every wheel the index lists without a hash to compute
one, for every platform of the universal resolution. The pytorch-cpu
index lists torch 2.15.0's 36 wheels without hashes since this week; on
2026-10-28 four macOS Test abi3 jobs on #710, #711 and #723 died at the
export, timing out on a Linux cp315 torch wheel, while every Linux and
Windows job passed.
@evertlammerts
evertlammerts added this pull request to the merge queue Oct 28, 2026
Merged via the queue into duckdb:v2.0-cyanoptera with commit e1aeac3 Oct 28, 2026
30 checks passed
@evertlammerts
evertlammerts deleted the zoneinfo-timestamptz branch October 28, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant