Skip to content

Add support for Python 3.13#894

Merged
edwinnglabs merged 1 commit into
uber:devfrom
sluo1250:feat-python-3.13-support
May 7, 2026
Merged

Add support for Python 3.13#894
edwinnglabs merged 1 commit into
uber:devfrom
sluo1250:feat-python-3.13-support

Conversation

@sluo1250
Copy link
Copy Markdown
Contributor

@sluo1250 sluo1250 commented May 7, 2026

Summary

Adds official Python 3.13 support and bumps the minimum Python version to 3.12 (driven by arviz which already requires >=3.12).

Closes #891

Changes

Config & Metadata

  • pyproject.tomlrequires-python bumped >=3.9>=3.12, classifiers updated to 3.12/3.13, black target-version updated, dependency minimums bumped for 3.13 wheel availability
  • requirements.txt — synced minimum versions
  • tox.ini — envlist py38py312, py313

CI Workflows

  • test.yaml — actions/checkout v4, setup-python v5, test matrix expanded to [3.12, 3.13]
  • pypi-deploy.yaml — actions/checkout v4, setup-python v5

Compatibility Fixes

  • orbit/template/ktr.pynp.in1dnp.isin (removed in NumPy 2.x)
  • orbit/diagnostics/metrics.py — fixed invalid escape sequence in docstring (SyntaxWarning in Python 3.12+)
  • tests/orbit/models/test_dlt.py — chained assignment → .loc[] (pandas Copy-on-Write)
  • tests/orbit/models/test_ktr.pyfreq="3M""3ME" (deprecated pandas offset alias)
  • tests/orbit/models/test_ktrlite.pyfreq="3M"/"6M""3ME"/"6ME"

Tests

All 350 tests pass on Python 3.13.7 with 82% code coverage.

Dependencies

Minimum versions bumped for 3.13 compatibility:

Package Old Minimum New Minimum
numpy >=1.18 >=2.1.0
scipy >=1.4.1 >=1.14.1
pandas >=1.0.3 >=2.2.3
matplotlib >=3.3.2 >=3.9.2
statsmodels >=0.11.1 >=0.14.3
torch >=1.11.0 >=2.5.0
seaborn >=0.10.0 >=0.13.2

- Bump requires-python from >=3.9 to >=3.12 (arviz requires >=3.12)
- Update classifiers to 3.12/3.13
- Bump dependency minimums for 3.13 wheel availability
- Replace np.in1d with np.isin (removed in NumPy 2.x)
- Fix deprecated pandas freq aliases (M -> ME)
- Fix chained assignment for pandas Copy-on-Write
- Fix invalid escape sequence in docstring
- Update CI actions to v4/v5 and test matrix to [3.12, 3.13]
- Update tox envlist to py312, py313

Closes uber#891

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 7, 2026

CLA assistant check
All committers have signed the CLA.

@sluo1250
Copy link
Copy Markdown
Contributor Author

sluo1250 commented May 7, 2026

@edwinnglabs Could you take a look at this?

@edwinnglabs edwinnglabs self-requested a review May 7, 2026 23:42
Copy link
Copy Markdown
Collaborator

@edwinnglabs edwinnglabs left a comment

Choose a reason for hiding this comment

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

thank you so much for the change @sluo1250

@edwinnglabs edwinnglabs merged commit fed7f6d into uber:dev May 7, 2026
3 checks passed
@sluo1250
Copy link
Copy Markdown
Contributor Author

@edwinnglabs Appreciate your approval to merge. Any plan to release it on Pypi soon?

@edwinnglabs
Copy link
Copy Markdown
Collaborator

@edwinnglabs Appreciate your approval to merge. Any plan to release it on Pypi soon?

we can try release a version a week from now.

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.

Add support for python>=3.13

3 participants