Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Dec 3, 2025

Rationale for this change

pandas 3.0 changes the default datetime/timedelta resolution from nanoseconds to microseconds. We already had mostly accounted for that in previous PRs, but pandas made this change the last days in a few additional places (eg pd.date_range), uncovering some more issues

What changes are included in this PR?

  • Don't hardcode the nanosecond unit in the metadata and when recreating a datetime-tz column's Index
  • Update a few tests to account for those changes

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

⚠️ GitHub issue #48314 has been automatically assigned in GitHub to PR creator.

@jorisvandenbossche
Copy link
Member Author

@github-actions crossbow submit test-conda-python-3.13-pandas-nightly-numpy-nightly test-conda-python-3.13-pandas-upstream_devel-numpy-nightly

[(1, 'a', 2.0), (2, 'b', 3.0), (3, 'c', 4.0)],
columns=pd.date_range(
start='2017-01-01', periods=3, tz='America/New_York'
start='2017-01-01', periods=3, tz='America/New_York', unit='us'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to parametrize this test on datetime unit or is it superfluous?

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Revision: f0afc77

Submitted crossbow builds: ursacomputing/crossbow @ actions-bfea497ea7

Task Status
test-conda-python-3.13-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightly GitHub Actions

@pitrou
Copy link
Member

pitrou commented Dec 3, 2025

Unrelated, but do we want to remove compatibility with very old Pandas versions at some point? Pandas 1.3.4 was released in 2021 and only provides wheels for Python 3.10 and earlier.

@raulcd
Copy link
Member

raulcd commented Jan 8, 2026

@AlenkaF @pitrou @jorisvandenbossche do we want to fix this for the release? I am happy to follow this up if @jorisvandenbossche does not have the time. We have several jobs failing on CI due to this issue even though none of them seem release blocking as jobs required to release (wheels, etc) are successful.

@pitrou
Copy link
Member

pitrou commented Jan 8, 2026

@AlenkaF @pitrou @jorisvandenbossche do we want to fix this for the release? I am happy to follow this up if @jorisvandenbossche does not have the time.

Yes, this sounds desirable.

@raulcd
Copy link
Member

raulcd commented Jan 8, 2026

This seems to be a blocker now as it is failing on the free-threaded Windows wheels:

I'll try to fix it.

@raulcd raulcd force-pushed the pyarrow-compat-pandas-3-unit branch from f0afc77 to af64016 Compare January 9, 2026 11:39
@raulcd
Copy link
Member

raulcd commented Jan 9, 2026

@github-actions crossbow submit -g python -g wheel

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Revision: 868e6af

Submitted crossbow builds: ursacomputing/crossbow @ actions-c5e90a9ecd

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
python-sdist GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2 GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.13 GitHub Actions
test-conda-python-3.13-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.14 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-24.04-cuda-13.0.2 GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-42-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions
wheel-macos-monterey-cp310-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64 GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314-arm64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-amd64 GitHub Actions
wheel-macos-monterey-cp314-cp314t-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314-arm64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-amd64 GitHub Actions
wheel-manylinux-2-28-cp314-cp314t-arm64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-amd64 GitHub Actions
wheel-musllinux-1-2-cp310-cp310-arm64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64 GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64 GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64 GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314-arm64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-amd64 GitHub Actions
wheel-musllinux-1-2-cp314-cp314t-arm64 GitHub Actions
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp314-cp314-amd64 GitHub Actions
wheel-windows-cp314-cp314t-amd64 GitHub Actions

@raulcd
Copy link
Member

raulcd commented Jan 9, 2026

Pandas 1.3.4 was released in 2021 and only provides wheels for Python 3.10 and earlier.

I've created the following issue to discuss bumping pandas support here:

@raulcd
Copy link
Member

raulcd commented Jan 9, 2026

I've fixed the tests so they are compatible with Pandas 1.3.4 and have added the fixture for time unit as requested on the review. Current CI failures have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants