pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Drop Python 3.10

Open Armavica opened this issue 9 months ago • 1 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--1253.org.readthedocs.build/en/1253/

Armavica avatar Feb 27 '25 15:02 Armavica

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 81.65%. Comparing base (b05acfd) to head (04b2d67). :warning: Report is 16 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1253      +/-   ##
==========================================
- Coverage   81.67%   81.65%   -0.03%     
==========================================
  Files         232      232              
  Lines       53132    53078      -54     
  Branches     9410     9405       -5     
==========================================
- Hits        43396    43340      -56     
- Misses       7283     7285       +2     
  Partials     2453     2453              
Files with missing lines Coverage Δ
pytensor/link/c/basic.py 87.74% <100.00%> (-0.02%) :arrow_down:
pytensor/link/numba/dispatch/elemwise.py 94.82% <100.00%> (ø)
pytensor/npy_2_compat.py 100.00% <100.00%> (ø)
pytensor/tensor/basic.py 91.80% <100.00%> (ø)
pytensor/tensor/blas.py 73.52% <100.00%> (ø)
pytensor/tensor/einsum.py 97.11% <100.00%> (+0.01%) :arrow_up:
pytensor/tensor/elemwise.py 90.01% <100.00%> (ø)
pytensor/tensor/extra_ops.py 88.54% <100.00%> (-0.02%) :arrow_down:
pytensor/tensor/math.py 92.86% <100.00%> (-0.02%) :arrow_down:
pytensor/tensor/nlinalg.py 94.98% <100.00%> (ø)
... and 5 more

... and 2 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 Feb 27 '25 16:02 codecov[bot]

Does this mean we can also drop numpy<2 and related CI matrix?

ricardoV94 avatar Sep 29 '25 14:09 ricardoV94

Yeah I think that the plan was to drop numpy < 2.0 and python 3.10 together if I remember correctly

Armavica avatar Sep 29 '25 14:09 Armavica

Let's do it. There is stuff in npy_compat as well

ricardoV94 avatar Sep 29 '25 15:09 ricardoV94

There is stuff remaining but I want to check this for now.

Armavica avatar Sep 29 '25 16:09 Armavica

I was wondering if I need to increment the c code version after removing the compatibility headers?

Armavica avatar Sep 30 '25 10:09 Armavica

I was wondering if I need to increment the c code version after removing the compatibility headers?

I don't think so, the generated C code didn't change if you are using numpy>2.0, and you can't use the old one anymore now. Could be wrong ofc

ricardoV94 avatar Sep 30 '25 10:09 ricardoV94

I don't think so, the generated C code didn't change if you are using numpy>2.0

Even with this commit? a0ad2464

Armavica avatar Sep 30 '25 11:09 Armavica

Even with this commit? https://github.com/pymc-devs/pytensor/commit/a0ad24641926b39cedf78863c4c36660e08bf90f

Can you check if we bumped the C versions when we added that header thing to those Ops? If we did, then maybe let's be safe and bump again

ricardoV94 avatar Sep 30 '25 12:09 ricardoV94

Can you check if we bumped the C versions when we added that header thing to those Ops? If we did, then maybe let's be safe and bump again

This is the commit that introduced that header, it changed the C code in other ways too but it did bump the C versions: https://github.com/pymc-devs/pytensor/pull/1194/commits/0aa10c0bccf2b573e906073962cb6ef15eea4eb8

Armavica avatar Sep 30 '25 14:09 Armavica

Right, let's rebump then. Thanks for checking it

ricardoV94 avatar Sep 30 '25 14:09 ricardoV94

looks good just a small question

ricardoV94 avatar Oct 03 '25 20:10 ricardoV94

Thanks a ton @Armavica

Anything else missing?

ricardoV94 avatar Oct 05 '25 14:10 ricardoV94

Thanks a ton @Armavica

Anything else missing?

I can't think of anything else

Armavica avatar Oct 05 '25 14:10 Armavica

The PyPI CI seems to be failing

ricardoV94 avatar Oct 06 '25 13:10 ricardoV94

Not sure what this is about, I will debug in a few days

Armavica avatar Oct 07 '25 08:10 Armavica

I think it's trying to build something with python 3.10. Also are you rebased from main?

ricardoV94 avatar Oct 07 '25 10:10 ricardoV94

Specifically this job may need the python version specified (the one above build_universal_wheel specifies it for example): https://github.com/pymc-devs/pytensor/blob/4312d8c6bd0dc6f708bd3327d66bf9750ab3ce46/.github/workflows/pypi.yml#L186

ricardoV94 avatar Oct 07 '25 10:10 ricardoV94

Specifically this job may need the python version specified (the one above build_universal_wheel specifies it for example):

https://github.com/pymc-devs/pytensor/blob/4312d8c6bd0dc6f708bd3327d66bf9750ab3ce46/.github/workflows/pypi.yml#L186

Thank you, it looks like that did the trick

Armavica avatar Oct 07 '25 11:10 Armavica

LGTM. I asked @lucianopaz and @maresb to also take a look in case they spot something else problematic. Specifically I suspect @maresb needs to be in the loop for the conda release anyway

ricardoV94 avatar Oct 07 '25 11:10 ricardoV94

Thanks again @Armavica

ricardoV94 avatar Oct 07 '25 22:10 ricardoV94