pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Enable installation and tests with Python 3.14

Open Armavica opened this issue 2 months ago • 8 comments

Description

Related Issue

  • [ ] Closes #
  • [ ] Related to #

Checklist

Type of change

  • [ ] New feature / enhancement
  • [ ] Bug fix
  • [ ] Documentation
  • [ ] Maintenance
  • [ ] Other (please specify):

📚 Documentation preview 📚: https://pytensor--1661.org.readthedocs.build/en/1661/

Armavica avatar Oct 13 '25 22:10 Armavica

OK, we are already compatible and just need to wait for numba's next release https://github.com/numba/numba/issues/9957

Armavica avatar Oct 13 '25 22:10 Armavica

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 81.58%. Comparing base (95acdb3) to head (8d0fe36). :warning: Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1661      +/-   ##
==========================================
+ Coverage   81.56%   81.58%   +0.01%     
==========================================
  Files         242      240       -2     
  Lines       53819    53593     -226     
  Branches     9485     9454      -31     
==========================================
- Hits        43899    43723     -176     
+ Misses       7431     7394      -37     
+ Partials     2489     2476      -13     

see 4 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 15 '25 14:10 codecov[bot]

Thanks @Armavica for testing on the beta release of Numba and communicating the success on their Discourse!

maresb avatar Oct 15 '25 19:10 maresb

Luckily PyTensor was already compatible with Python 3.14. We just had to change the upper bound. So maybe it'd be better to write something like the following for the PR title?

Enable installation with and tests on Python 3.14

maresb avatar Oct 15 '25 19:10 maresb

Luckily PyTensor was already compatible with Python 3.14. We just had to change the upper bound. So maybe it'd be better to write something like the following for the PR title?

Enable installation with and tests on Python 3.14

I did have to adapt two tests but that's a better title indeed, thank you

Armavica avatar Oct 16 '25 08:10 Armavica

Numba is optional, so we can go ahead before their release

ricardoV94 avatar Oct 19 '25 18:10 ricardoV94

Numba is optional, so we can go ahead before their release

So, without upgrading the CI to 3.14?

Armavica avatar Oct 22 '25 14:10 Armavica

Numba is optional, so we can go ahead before their release

So, without upgrading the CI to 3.14?

Just not the numba CI

ricardoV94 avatar Oct 22 '25 16:10 ricardoV94

Looks like everything is working? The jax failing tests are probably because tfp isn't yet compatbile with 3.14, we can skip those for now

ricardoV94 avatar Nov 21 '25 10:11 ricardoV94

Looks like everything is working? The jax failing tests are probably because tfp isn't yet compatbile with 3.14, we can skip those for now

Yes but it's still an rc1 for numba

Armavica avatar Nov 21 '25 10:11 Armavica

I think we can release already. Perhaps test numba on rc for python 3.14 and keep last official release on python 3.11?

ricardoV94 avatar Nov 21 '25 13:11 ricardoV94

New Numba release!!!!!!!! https://github.com/numba/numba/releases/tag/0.63.0

maresb avatar Dec 09 '25 07:12 maresb

Thanks, updating in https://github.com/pymc-devs/pytensor/pull/1781

Armavica avatar Dec 09 '25 09:12 Armavica

PyMC installation on Python 3.14 via pip still fails because the latest PyTensor release on PyPI (2.35.1) is published with Requires-Python: <3.14. As a result, pip backtracks to PyTensor 2.17.x, which pins numpy<1.26 and fails to build due to pkgutil.ImpImporter removal. Since PyTensor already supports 3.14 in main, this seems to be a release/metadata issue? A PyPI release with Requires-Python >=3.11,<3.15 (and wheels) would unblock PyMC on 3.14.

fcotizelati avatar Dec 13 '25 09:12 fcotizelati

Yes we still need to make a new release, next one has a couple breaking changes so we want to bundle them al together. Hopefully by early next week. Then on the PyMC side we also need to bump the dependency, fix the changes, and do a new release. Probably a few more days

ricardoV94 avatar Dec 13 '25 09:12 ricardoV94