Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.12 #488

Merged
merged 8 commits into from
Jan 18, 2024
Merged

Support Python 3.12 #488

merged 8 commits into from
Jan 18, 2024

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Nov 9, 2023

Closes #472

Motivation for these changes

Get the latest Python goodness

Implementation details

Basically just 3.11β†’3.12

Checklist

Major / Breaking Changes

  • ...

New features

  • PyTensor now works with Python 3.12

Bugfixes

  • ...

Documentation

  • ...

Maintenance

  • ...

@ricardoV94
Copy link
Member

What the heck is the pre-commit complaining about?

@maresb
Copy link
Contributor Author

maresb commented Jan 14, 2024

Switching from #581 to #586 to see what happens

@maresb
Copy link
Contributor Author

maresb commented Jan 14, 2024

Beautiful... we can get mypy to pass on 3.9 or 3.12 but not both. Maybe there's a way to get mypy to ignore unused type ignores...

@maresb
Copy link
Contributor Author

maresb commented Jan 15, 2024

Ok, I've rebased on the latest main. I think there's still a Conda dependency conflict though.

@maresb
Copy link
Contributor Author

maresb commented Jan 15, 2024

There is no mkl-service build for Python 3.12. This seems pretty blocking.

See:
https://github.com/conda-forge/pytensor-suite-feedstock/blob/0671c8077973cfb8062aeffd0f131981067757f9/recipe/meta.yaml#L96-L99

@ricardoV94
Copy link
Member

At least we are narrowing down on what the blockers are!

@maresb
Copy link
Contributor Author

maresb commented Jan 15, 2024

I triggered a bot-rerun of the mkl-service feedstock, so hopefully in some hours there will be some movement on that front. The other possibility would be user-managed BLAS, but that feels like a pretty drastic change.

@maresb
Copy link
Contributor Author

maresb commented Jan 18, 2024

I fixed mkl-service upstream. Let's see if we get further now.

@maresb maresb closed this Jan 18, 2024
@maresb maresb reopened this Jan 18, 2024
@maresb
Copy link
Contributor Author

maresb commented Jan 18, 2024

Now we are hitting numba/numba#9197. The Numba release canddate is under review, so hopefully it will get released soon! (We may want to test.)

@ricardoV94
Copy link
Member

ricardoV94 commented Jan 18, 2024

Numba is an optional dependency, we can just not test it in the 3.12 run, like we did for a long time with 3.11

Numba releases and "soon" don't usually go together

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (ccc08ba) 80.92% compared to head (69319ef) 80.87%.
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #488      +/-   ##
==========================================
- Coverage   80.92%   80.87%   -0.06%     
==========================================
  Files         162      162              
  Lines       46627    46680      +53     
  Branches    11399    11408       +9     
==========================================
+ Hits        37732    37751      +19     
- Misses       6667     6699      +32     
- Partials     2228     2230       +2     
Files Coverage Ξ”
pytensor/tensor/shape.py 93.15% <100.00%> (ΓΈ)

... and 6 files with indirect coverage changes

@ricardoV94
Copy link
Member

ricardoV94 commented Jan 18, 2024

Just need to remove the old Check code style (3.10) | (3.11) from the Github branch protection settings, which we can do after merging the PR. Otherwise, anything missing @maresb?

@maresb
Copy link
Contributor Author

maresb commented Jan 18, 2024

Woah, crazy! Looks like I got it!

Just need to remove the old Check code style (3.10) | (3.11) from the Github branch protection settings

I don't understand ☝️ but probably I don't need to.

All good from my side! 😁

@ricardoV94
Copy link
Member

I was referring to the "required" CI tests that no longer exist:
image

@ricardoV94
Copy link
Member

@maresb do you want me to squash and merge or rebase and merge?

@maresb
Copy link
Contributor Author

maresb commented Jan 18, 2024

I feel like my commits are reasonably structured, so assuming you don't have any criticisms I'd prefer a rebase + merge.

@ricardoV94 ricardoV94 merged commit f799219 into pymc-devs:main Jan 18, 2024
52 checks passed
@ricardoV94
Copy link
Member

I feel like my commits are reasonably structured, so assuming you don't have any criticisms I'd prefer a rebase + merge.

Done, I was just double checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend support to Python 3.12
3 participants