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

bump max Python version to 3.11 #869

Merged
merged 4 commits into from
Mar 15, 2023
Merged

bump max Python version to 3.11 #869

merged 4 commits into from
Mar 15, 2023

Conversation

esc
Copy link
Member

@esc esc commented Aug 2, 2022

As title

@esc esc mentioned this pull request Aug 2, 2022
@sklam sklam added this to the v0.40.0 milestone Aug 2, 2022
@leftys
Copy link

leftys commented Sep 22, 2022

It would be really helpful to merge this one. This bug breaks llvm with python3.11, which also blocks numba and therefore a lot of python data science tools. By the way, final version of python 3.11 is expected to be released in about a month if things go according to schedule.

@esc
Copy link
Member Author

esc commented Sep 23, 2022

It would be really helpful to merge this one. This bug breaks llvm with python3.11, which also blocks numba and therefore a lot of python data science tools. By the way, final version of python 3.11 is expected to be released in about a month if things go according to schedule.

Thank you for asking about this, I will answer briefly to do some expectation management. We have been monitoring the Python 3.11 situation since last year and llvmlite is likely to be fine, only the version number needs to be bumped as in this PR.

However, Numba is s different matter. Numba interfaces with the Python bytecode which has changed significantly again with 3.11. We do have some stuff in place already, but we can't make any guarantees about Numba being 3.11 compatible on the day of its release. For previous Python version 3.9 and 3.10 took 6 and 3 months respectively.

You can follow the Python 3.11 vs. Numba front here: numba/numba#8304

Thank you again for bringing this up, we are aware that Numba is a very popular library by now and we do understand our responsibility to keep a lot of data science tools working. I can assure you, we have been working very hard over the last few months and porting Numba to 3.11 presents a significant technical challenge.

@cloud11665
Copy link

Are there any reasons for not merging this one just for llvmlite ?
All tests pass on 3.11.0rc2 (which is the default /bin/python on fedora 37).

@esc
Copy link
Member Author

esc commented Nov 14, 2022

Are there any reasons for not merging this one just for llvmlite ? All tests pass on 3.11.0rc2 (which is the default /bin/python on fedora 37).

Our build and release process is based around conda. We can't run CI reliably without an official Python 3.11 package being released via anaconda.org. Hence we are currently blocked by that. We hope to get this merged up and a new version released as soon as the required packages become available. Until then, please be patient, thank you!

@cloud11665
Copy link

Oh ok, I see. No worries then.

@esc
Copy link
Member Author

esc commented Nov 15, 2022

FWIW: this had a conflict against main - I have rebased this now and fixed the conflict.

@maxnoe
Copy link

maxnoe commented Nov 15, 2022

Hence we are currently blocked by that. We hope to get this merged up and a new version released as soon as the required packages become available.

conda-forge had python 3.11 packages the day after the release

@esc
Copy link
Member Author

esc commented Nov 15, 2022

Hence we are currently blocked by that. We hope to get this merged up and a new version released as soon as the required packages become available.

conda-forge had python 3.11 packages the day after the release

@maxnoe yes, thank you for mentioning that. We are aware of the conda-forge efforts. We recently had a developer meeting about this with everyone who is a stakeholder in the build and release process. We came to the conclusion that conda-forge packages would be to unstable for our needs. We have experimented with using conda-forge for build and release before but hit too many roadblocks. IIRC this was mostly related to broken compiler packages, broken interpreter packages and lack of reliable, bare-metal support for the more esoteric architectures that Numba targets. So, for the time being we will stick to this decision. I would be open to revisiting this issue however, in due time, as and when we get the impression that conda-forge has become suitable for our needs.

@stuartarchibald
Copy link
Contributor

Under Python 3.11 this DeprecationWarning is issued which is causing Numba's numba.tests.test_import.TestNumbaImport.test_no_accidental_warnings test to fail:

    from llvmlite.binding import ffi
  File "<path>/site-packages/llvmlite/binding/ffi.py", line 159, in <module>
    _lib_handle = importlib.resources.path(pkgname, _lib_name)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<env>/importlib/resources/_legacy.py", line 18, in wrapper
    warnings.warn(
DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

@maxnoe
Copy link

maxnoe commented Jan 2, 2023

We have experimented with using conda-forge for build and release before but hit too many roadblocks.

I would kindly encourage you to re-evaluate this decision (or in general the dependency on anaconda python builds for your release process). Python 3.11 is released for a relatively long time now and for whatever reason, there are still no anaconda packages, not even official feedback in the corresponding anaconda-issues issue when it might come:
ContinuumIO/anaconda-issues#13082

This dependency also seems to make it impossible to CI test on release candidates and have changes ready once a release of python is made.

pcmoritz pushed a commit to ray-project/ray that referenced this pull request Jan 7, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.
AmeerHajAli pushed a commit to ray-project/ray that referenced this pull request Jan 12, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.
@maxnoe
Copy link

maxnoe commented Jan 18, 2023

@esc
Copy link
Member Author

esc commented Jan 23, 2023

We have experimented with using conda-forge for build and release before but hit too many roadblocks.

I would kindly encourage you to re-evaluate this decision (or in general the dependency on anaconda python builds for your release process).

Thank you for your feedback, rest assured that we are also fairly frustrated with this. However, I'd like to manage some expectations here: due to capacity constraints and other more high priority threads we are unlikely to have the bandwidth to re-evaluate this decision for the time being. I can only appeal to your continued patience here, thank you.

tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.

Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.

Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
@esc
Copy link
Member Author

esc commented Mar 6, 2023

With 7eeedcb I have also added the 3.11 trove classifier.

Copy link
Member

@sklam sklam left a comment

Choose a reason for hiding this comment

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

LGTM. This has been used for testing numba's py3.11 branch and has been passing

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

Successfully merging this pull request may close these issues.

6 participants