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

Add explicit support for Python 3.11 #198

Merged
merged 5 commits into from
Mar 10, 2023
Merged

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jan 24, 2023

Depends on next Numba release for support of Python 3.11: numba/numba#8304

Not testing Numba on Python 3.11 for now

The last two commits of this PR should be removed once:

  1. Numba supports Python 3.11
  2. The mypy issue mentioned below is sorted out

Other unrelated CI changes

  1. Don't run both fast-compile and float32 to reduce a big chunk of the tests combinations. Both modes are arguably very specialized on their own, and if we need tests to check their interaction we should add them explicitly. In general, the biggest issue with float32 is some Ops that would upcast stuff to float64. Fast-compile has less optimizations / introduces less specialized Ops, so this should be less of a concern for maintaining float32.
  2. Exclude fast-compile/float32 from the oldest supported Python version. Run them on the newest instead.

@ricardoV94 ricardoV94 changed the title Support Python 3.11 and drop support for 3.7 Add support Python 3.11 and drop support for 3.7 Jan 24, 2023
@ricardoV94 ricardoV94 changed the title Add support Python 3.11 and drop support for 3.7 Add support for Python 3.11 and drop support for 3.7 Jan 24, 2023
@ricardoV94 ricardoV94 marked this pull request as draft January 24, 2023 09:56
@ricardoV94 ricardoV94 changed the title Add support for Python 3.11 and drop support for 3.7 Add support for Python 3.11 Feb 7, 2023
@ricardoV94
Copy link
Member Author

ricardoV94 commented Mar 9, 2023

Other than numba and #238 tests seem to be passing in 3.11

CI is failing in 3.11, somehow mypy thinks that:

[pytensor/link/c/exceptions.py]
pytensor/link/c/exceptions.py:1: error: Module "setuptools._distutils.errors" has no attribute "CompileError"

I see that mypy is not officially supported in Python 3.11 yet, so maybe it will be sorted out once it is? python/mypy#12840

@ricardoV94 ricardoV94 marked this pull request as ready for review March 9, 2023 18:10
@ricardoV94 ricardoV94 requested a review from maresb March 9, 2023 18:31
@ricardoV94 ricardoV94 changed the title Add support for Python 3.11 Add explicit support for Python 3.11 Mar 9, 2023
@ricardoV94 ricardoV94 added tests and removed major labels Mar 9, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #198 (b590aca) into main (c28db53) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             main     #198     +/-   ##
=========================================
  Coverage   80.43%   80.44%             
=========================================
  Files         170      170             
  Lines       45328    45328             
  Branches     9687    11069   +1382     
=========================================
+ Hits        36461    36463      +2     
+ Misses       6643     6642      -1     
+ Partials     2224     2223      -1     

see 2 files with indirect coverage changes

@ricardoV94
Copy link
Member Author

Anything we need to do on the conda-forge side?

@michaelosthege
Copy link
Member

Anything we need to do on the conda-forge side?

According to the current build status badge under https://github.com/conda-forge/pytensor-suite-feedstock/ and the files under https://anaconda.org/conda-forge/pytensor/files it's already outputting 3.11 artifacts.

@ricardoV94 ricardoV94 merged commit 277559b into pymc-devs:main Mar 10, 2023
@ricardoV94 ricardoV94 deleted the test_311 branch June 21, 2023 08:56
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.

3 participants