Skip to content

fix: pandas 3 and scikit-learn 1.9 compatibility, and improve dependency testing - #816

Merged
koaning merged 4 commits into
mainfrom
chore/bump-deps-fix-tests
Aug 30, 2026
Merged

fix: pandas 3 and scikit-learn 1.9 compatibility, and improve dependency testing#816
koaning merged 4 commits into
mainfrom
chore/bump-deps-fix-tests

Conversation

@FBruzzesi

Copy link
Copy Markdown
Collaborator

pandas 3 made Day a calendar offset, so TimeGapSplit.summary()'s frequency column silently became 24h instead of D; it now emits the pandas 3 rendering on every supported pandas version.

scikit-learn 1.9 additionally runs check_array_api_input on estimators tagged array_api_support=False, so 11 such checks are declared expected failures with reasons.

CI could not have caught either: uv run re-synced the test job back to uv.lock, discarding the uv pip install it was meant to be testing, and the nightly "latest" job was pinned to Python 3.10, where pandas 3 and scikit-learn 1.9 do not install at all.

Both fixed, plus dependency floors that could never install (pandas>=1.1.5 fails to build, scikit-learn>=1.0 contradicts sklearn-compat) and the two-year-old numpy<2.0 cap. Dropping it needed cvxpy>=1.5.2, umap-learn>=0.5.8 and a numba floor, and lets the PR job finally reach pandas 3.
A new minimum-versions job verifies every bound with --resolution lowest-direct.

Breaking: summary()["frequency"] returns 24h where it previously returned D to align with pandas v3+ behavior.

Comment thread pyproject.toml
Comment on lines +24 to +26
"numpy>=1.26.4",
"pandas>=2.0.3",
"scikit-learn>=1.4.2",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  1. Adding numpy to avoid it via transitive dependency, and pinning a min version
  2. pandas 2.0.3 was released 3+ years ago (2023-06-28)
  3. scikit 1.4.2 was released ~2.5 years ago (2024-04-09)

Comment thread pyproject.toml
Comment on lines +49 to +51
cvxpy = ["cvxpy>=1.5.2"]
formulaic = ["formulaic>=0.6.0"]
umap = ["umap-learn>=0.4.6", "numpy<2.0"]
umap = ["umap-learn>=0.5.8", "numba>=0.61"]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  • cvxpy 1.5.2 was released 2+ years ago (2024-06-18)
  • umap-learn 0.5.8 was released 1+ years ago (2025-06-30) - This is the most recent release in the bump. It allows us to pin numpy < 2.0

@FBruzzesi

Copy link
Copy Markdown
Collaborator Author

@koaning if we decide to go ahead with this one, I think it might be worth a minor version bump as it has quite some dependency version bumps AND one breaking change.

@FBruzzesi FBruzzesi added dependencies Pull requests that update a dependency file fix labels Aug 1, 2026
@FBruzzesi
FBruzzesi marked this pull request as ready for review August 1, 2026 21:05
@FBruzzesi FBruzzesi changed the title fix pandas 3 and scikit-learn 1.9 compatibility, and improve dependency testing fix: pandas 3 and scikit-learn 1.9 compatibility, and improve dependency testing Aug 2, 2026
@FBruzzesi
FBruzzesi requested a review from koaning August 4, 2026 12:37
@koaning
koaning merged commit af2092d into main Aug 30, 2026
11 checks passed
@FBruzzesi
FBruzzesi deleted the chore/bump-deps-fix-tests branch August 30, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants