Skip to content

infra: bump minimum supported Python version to Python 3.11 - #4170

Merged
kevinjqliu merged 2 commits into
apache:mainfrom
oresttokovenko:drop-python-3.10
Oct 28, 2026
Merged

kevinjqliu merged 2 commits into
apache:mainfrom
oresttokovenko:drop-python-3.10

Conversation

@oresttokovenko

@oresttokovenko oresttokovenko commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

Python 3.10 reached end of life on 2026-10-01, and the Python devguide now lists it as unsupported. This pull request drops Python 3.10.

Note: ruff forces 3.11 changes such as datetime.UTC in place of timezone.utc and typing.Self in place of typing_extensions.Self, because it reads requires-python. They cannot be left out, since make lint fails when the rewrites are missing, and both are the same objects at runtime

Are these changes tested?

  • uv lock --check passes.
  • uv run prek run -a passes, including ruff, ruff format and mypy.
  • The unit tests for the changed areas pass

@kevinjqliu

Copy link
Copy Markdown
Contributor

raises the pyarrow floor to 23

could we just focus on just deprecating python 3.10 in this pr? It's easier to review 1 change instead of 2

Comment thread pyiceberg/io/pyarrow.py
@@ -562,15 +550,6 @@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is related to Arrow. Do we know what the lower bound is of Arrow supporting Python 3.11?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll open another PR for pyarrow changes to keep this PR strictly related to the Python version bump, we can discuss there, does that work?

@oresttokovenko

oresttokovenko commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

could we just focus on just deprecating python 3.10 in this pr? It's easier to review 1 change instead of 2

@kevinjqliu fair take, I reverted the other changes, will introduce them in a follow up PR

@oresttokovenko oresttokovenko changed the title infra: require Python 3.11 and pyarrow 23 infra: bump minimum supported Python version to Python 3.11 Oct 28, 2026
@oresttokovenko
oresttokovenko force-pushed the drop-python-3.10 branch 2 times, most recently from 6fd9ab7 to 6f1c0b7 Compare October 28, 2026 16:33
Python 3.10 reached end of life on 2026-10-01 and the devguide lists it as
unsupported. Current pyarrow and pandas also publish no 3.10 wheels, so a
3.10 install resolved to pyarrow 25.0.1 and pandas 2.3.3 while 3.11 and up
resolved to newer versions.

Drops the 3.10 classifier and matrix entry, and moves the two once-only CI
steps (lock check, linters) to 3.11. The lock loses its pandas 2.3.3 fork,
and pyproject loses the google.api_core warning filter that only existed
because that library warns on Python versions it does not support.

ruff reads requires-python, so it applies the 3.11 rewrites in the same pass:
datetime.UTC in place of timezone.utc, and typing.Self in place of
typing_extensions.Self where the typing module has it.

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks for splitting out the Arrow stuff, I've overlooked it that it was part of this PR as well

Comment thread pyproject.toml
# Turns a warning into an error
filterwarnings = [
"error",
# Ignore Python version deprecation, end-of-life and unsupported warnings from google.api_core while we still support 3.10

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ugh, this error message is still popping up on 3.11. Can you add this back in?

…ing filter

The cibuildwheel requires-python override and setup-python list still
included 3.10, so releases would build cp310 wheels. google.api_core also
warns on 3.11, so its FutureWarning filter is still needed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

thanks @oresttokovenko

i pushed a commit (eae2b9a) to fix the CI and remove a few other places for 3.10

@kevinjqliu
kevinjqliu enabled auto-merge October 28, 2026 17:53
@kevinjqliu
kevinjqliu added this pull request to the merge queue Oct 28, 2026
Merged via the queue into apache:main with commit 267118b Oct 28, 2026
20 checks passed
@kevinjqliu kevinjqliu added the changelog Indicates that the PR introduces changes that require an entry in the changelog. label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Indicates that the PR introduces changes that require an entry in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants