Skip to content

Support Python 3.15, drop Python 3.10, require pandas 3 - #1851

Draft
hkad98 wants to merge 4 commits into
gooddata:masterfrom
hkad98:jkd/python-3-15
Draft

hkad98 wants to merge 4 commits into
gooddata:masterfrom
hkad98:jkd/python-3-15

Conversation

@hkad98

@hkad98 hkad98 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds Python 3.15 support, drops Python 3.10 (EOL October 2026), requires pandas 3 and migrates (str, Enum) classes to StrEnum. These are breaking changes; the next release should be 2.0.0.

Draft: the py315 CI job is expected to fail until pyarrow 26.0.0 (first release with cp315 wheels, currently in its release vote as 26.0.0 RC0) is on PyPI. Once it is, a uv lock --upgrade-package pyarrow commit finishes this PR.

Breaking changes

  • Python 3.11+ required. Python 3.10 users stay on 1.x.
  • gooddata-pandas requires pandas >=3.0.0,<4.0.0. The DataFrames and Series it returns follow pandas 3 semantics: string columns and index levels use the default str dtype instead of object, missing values in string columns stay missing, and copy-on-write is always on. Date/datetime attribute columns keep datetime64[ns] as before.
  • StrEnum migration. str() and format() of these enums now return the member value (e.g. "asc") instead of "SortDirection.ASC". Equality with plain strings and serialization are unchanged.
    • gooddata-sdk: SortDirection, LocatorItemType (UpsertOutcome already behaved this way)
    • gooddata-pipelines: CustomFieldType, ColumnDataType, EntityType, LoadType, WorkflowType
    • gooddata-eval: AnomalyDetectionGranularity, LoopExit

Commits

Override cachebox to >=6

cachebox (sdk test group, via deepdiff) publishes cp315 wheels only from 6.x, but deepdiff 9.1.0 still caps it <6. A uv override-dependencies entry forces 6.2.7; drop it once deepdiff allows cachebox 6.

Support Python 3.15 and drop Python 3.10

  • 3.15 added to classifiers, tox envlists, the CI matrix and ci_tests.mk (new test-ci-py315-build target on python:3.15.0rc3-slim-bookworm; bump to the final tag once released).
  • requires-python >=3.11 everywhere; the 3.10 classifier, tox env, CI entry and Docker target removed; READMEs, AGENTS.md, CONTRIBUTING.md and Sonar settings updated.
  • ruff target-version = "py311": applied the safe UP017 (datetime.UTC) and import-order fixes.

Require pandas 3 in gooddata-pandas

pandas 2 has no cp315 wheels (2.3.3 built from source segfaults inside pd.to_datetime on 3.15), and pandas 3's behavior changes reach users through gooddata-pandas' return values, so the pin moves to >=3.0.0,<4.0.0 as a breaking change rather than silently allowing both majors.

  • pd.to_datetime infers resolution in pandas 3 (datetime64[s] for dates). Date/datetime conversion in both the JSON and Arrow paths now goes through to_datetime_ns(), keeping the datetime64[ns] dtype gooddata-pandas returned before.
  • Index levels built from Arrow field metadata (transposed results) were never Arrow-mapped and now get the default str dtype; the ARROW_STRINGS test skips them as it skips object levels. Converter output is unchanged.

Migrate (str, Enum) classes to StrEnum

With 3.11 as the floor, StrEnum is available and several enums already carried notes to switch once 3.10 was dropped. ruff UP042 is enforced.

Points for review

  • Keeping date columns at datetime64[ns] vs. adopting pandas 3's inferred resolution.
  • Release as 2.0.0, with release notes covering the breaking changes above.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

hkad98 added 4 commits October 6, 2026 14:30
cachebox is pulled into the sdk test group via deepdiff. Only cachebox
6.x publishes CPython 3.15 wheels; 5.x has to be built from source with
PyO3, whose bundled version refuses 3.15 unless forced with
PYO3_USE_ABI3_FORWARD_COMPATIBILITY. deepdiff 9.1.0 (latest) still caps
cachebox <6, so a plain lock upgrade is a no-op and a uv override is
needed. Remove it once deepdiff allows cachebox 6.

cachebox 5.2.3 -> 6.2.7. gooddata-sdk tests pass with it on py314 and
py310 via tox (572 passed) and on 3.15.0rc3 (568 passed, arrow test
excluded as pyarrow has no cp315 wheels yet).
Python 3.10 reaches end of life in October 2026, so the floor moves to
3.11 as 3.15 is added, keeping five supported versions.

Adding 3.15:
- trove classifiers, tox envlists of all packages, the CI unit-test
  matrix and the default IN_TEST_ENVS in ci_tests.mk
- CI runs tox inside per-version Docker images, so ci_tests.mk gains a
  test-ci-py315-build target based on python:3.15.0rc3-slim-bookworm
  (3.15 final is not released yet; bump the tag once it is)
- gooddata-eval also gets the 3.14 classifier it was missing

Dropping 3.10:
- requires-python >=3.11 for the workspace and every package; the 3.10
  classifier, tox env, CI matrix entry and Docker build target removed;
  READMEs, AGENTS.md, CONTRIBUTING.md and Sonar settings updated
- ruff target-version py311: applied the safe UP017 (datetime.UTC) and
  import-order fixes. UP042 ((str, Enum) -> StrEnum) is ignored here
  and handled in a separate commit because it changes str()/format()
  of public enums

Known blockers for a green py315 job: pyarrow (latest 25.0.1) publishes
no cp315 wheels and fails to build from source, which affects
gooddata-flexconnect, gooddata-flight-server and the test groups of
gooddata-sdk and gooddata-pandas; and gooddata-pandas still caps pandas
<3 while pandas 2 has no cp315 wheels (lifted in a following commit).

Tested: all packages via tox on py311 and py314; ruff, ruff format and
ty pass.
gooddata-pandas returns pandas objects, so pandas 3's behavior changes
(default "str" dtype for strings, copy-on-write, missing-value handling
in string columns) reach users through our API. Rather than silently
allowing both majors, gooddata-pandas now requires pandas >=3.0.0,<4.0.0
and the change ships as a breaking release. pandas 3 is also the only
line with CPython 3.15 wheels; pandas 2.3.3 segfaults inside
pd.to_datetime when built from source on 3.15. pandas 3 requires Python
3.11+, which the previous commit made the floor.

Behavior changes found by running the test suite on pandas 3:

- pd.to_datetime infers resolution from the input in pandas 3 (dates
  become datetime64[s]) while pandas 2 always produced datetime64[ns].
  Date/datetime attribute conversion in both the JSON and Arrow paths
  now goes through to_datetime_ns(), which keeps the datetime64[ns]
  dtype gooddata-pandas returned before.
- Index levels built from Arrow field metadata (transposed results) are
  never Arrow-mapped; they used to be object dtype and are now the
  default "str" dtype (NaN-backed StringDtype). The ARROW_STRINGS test
  now skips those levels the same way it skips object levels.

Tested: gooddata-pandas tox py311 and py314 (pandas 3.0.6), 347 passed
each; ruff, ruff format and ty pass.
With Python 3.11 as the floor, StrEnum is available, and several of
these enums already carried notes to switch once 3.10 was dropped. ruff
UP042 is no longer ignored.

Breaking: str() and format() of these enums now return the member value
(e.g. "asc") instead of "SortDirection.ASC". Equality with plain strings
and JSON/pydantic serialization are unchanged. Public enums affected:
gooddata-sdk SortDirection and LocatorItemType; gooddata-pipelines
CustomFieldType, ColumnDataType, EntityType, LoadType and WorkflowType;
gooddata-eval AnomalyDetectionGranularity and LoopExit. UpsertOutcome
already overrode __str__ to return the value, so its override is
dropped as redundant.

Tested: all packages via tox on py311 and py314; ruff, ruff format and
ty pass.
@hkad98 hkad98 changed the title Support Python 3.15, drop Python 3.10, allow pandas 3 Support Python 3.15, drop Python 3.10, require pandas 3 Oct 6, 2026
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