Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

"ValueError: 'not' is not a valid parameter name" on python 3.11 #5048

Closed
9 tasks done
koviubi56 opened this issue Jun 17, 2022 · 7 comments
Closed
9 tasks done

"ValueError: 'not' is not a valid parameter name" on python 3.11 #5048

koviubi56 opened this issue Jun 17, 2022 · 7 comments
Labels
question Question or problem question-migrate

Comments

@koviubi56
Copy link

koviubi56 commented Jun 17, 2022

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to FastAPI but to Pydantic.
  • I already checked if it is not related to FastAPI but to Swagger UI.
  • I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

import fastapi

app = fastapi.FastAPI()


@app.get("/")
def index():
    return {"message": "Hello World"}

Description

In Python 3.11 (Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)]), importing fastapi raises an exception: ValueError: 'not' is not a valid parameter name. (Running the file in Python 3.10, 3.9, and 3.8 works as expected)

Traceback

Running the file

Traceback (most recent call last):
  File "C:\Users\Tibi\Documents\example.py", line 1, in 
    import fastapi
    ^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\__init__.py", line 7, in 
    from .applications import FastAPI as FastAPI
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\applications.py", line 15, in 
    from fastapi import routing
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 23, in 
    from fastapi.dependencies.models import Dependant
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\dependencies\models.py", line 3, in 
    from fastapi.security.base import SecurityBase
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\security\__init__.py", line 1, in 
    from .api_key import APIKeyCookie as APIKeyCookie
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\security\api_key.py", line 3, in 
    from fastapi.openapi.models import APIKey, APIKeyIn
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\openapi\models.py", line 103, in 
    class Schema(BaseModel):
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydantic\main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydantic\utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\inspect.py", line 2715, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: 'not' is not a valid parameter name

Using uvicorn

Traceback (most recent call last):
  File "", line 198, in _run_module_as_main
  File "", line 88, in _run_code
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\__main__.py", line 4, in 
    uvicorn.main()
    ^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\main.py", line 437, in main
    run(app, **kwargs)
    ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\main.py", line 463, in run
    server.run()
    ^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 181, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 115, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\server.py", line 67, in serve
    config.load()
    ^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\config.py", line 458, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1206, in _gcd_import
  File "", line 1178, in _find_and_load
  File "", line 1149, in _find_and_load_unlocked
  File "", line 690, in _load_unlocked
  File "", line 939, in exec_module
  File "", line 241, in _call_with_frames_removed
  File "C:\Users\Tibi\Documents\.\example.py", line 1, in 
    import fastapi
    ^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\__init__.py", line 7, in 
    from .applications import FastAPI as FastAPI
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\applications.py", line 15, in 
    from fastapi import routing
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\routing.py", line 23, in 
    from fastapi.dependencies.models import Dependant
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\dependencies\models.py", line 3, in 
    from fastapi.security.base import SecurityBase
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\security\__init__.py", line 1, in 
    from .api_key import APIKeyCookie as APIKeyCookie
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\security\api_key.py", line 3, in 
    from fastapi.openapi.models import APIKey, APIKeyIn
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\openapi\models.py", line 103, in 
    class Schema(BaseModel):
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydantic\main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\pydantic\utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\inspect.py", line 2715, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: 'not' is not a valid parameter name

The problem seems to be this line:

# File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\openapi\models.py"
class Schema(BaseModel):
    # ...
    #                                              ~~~~~~~~~~~
    not_: Optional["Schema"] = Field(default=None, alias="not")
    # ...

After changing that line to not_: Optional["Schema"] = None, there's another similar exception: ValueError: 'in' is not a valid parameter name, which is because of this:

# File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\openapi\models.py"
class Parameter(ParameterBase):
    name: str
    #                                 ~~~~~~~~~~
    in_: ParameterInType = Field(..., alias="in")

After changing that line to in_: ParameterInType, there's another similar exception: ValueError: 'in' is not a valid parameter name, which is because of this:

# File "C:\Users\Tibi\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastapi\openapi\models.py"
class APIKey(SecurityBase):
    type_ = Field(SecuritySchemeType.apiKey, alias="type")
    #                          ~~~~~~~~~~
    in_: APIKeyIn = Field(..., alias="in")
    name: str

After changing that line to in_: APIKeyIn, the code works as expected.

Operating System

Windows

Operating System Details

No response

FastAPI Version

0.78.0

Python Version

Python 3.11.0b3

Additional Context

If you would like to, I could make a PR that removes these aliases.

@koviubi56 koviubi56 added the question Question or problem label Jun 17, 2022
@alexfromapex
Copy link

Having the same issue on ARM-64 MacOS with Python 3.11.0b3

Traceback (most recent call last):
  File "/Users/alex/Code/Python/Flashcard/main.py", line 1, in <module>
    from fastapi import FastAPI
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/applications.py", line 15, in <module>
    from fastapi import routing
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/routing.py", line 23, in <module>
    from fastapi.dependencies.models import Dependant
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/dependencies/models.py", line 3, in <module>
    from fastapi.security.base import SecurityBase
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/security/__init__.py", line 1, in <module>
    from .api_key import APIKeyCookie as APIKeyCookie
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/security/api_key.py", line 3, in <module>
    from fastapi.openapi.models import APIKey, APIKeyIn
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/fastapi/openapi/models.py", line 103, in <module>
    class Schema(BaseModel):
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
    cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/envs/notecards/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
    merged_params[param_name] = Parameter(
                                ^^^^^^^^^^
  File "/Users/alex/.pyenv/versions/3.11-dev/lib/python3.11/inspect.py", line 2715, in __init__
    raise ValueError('{!r} is not a valid parameter name'.format(name))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@musicinmybrain
Copy link
Contributor

musicinmybrain commented Jun 29, 2022

This seems to be related to the following issue in CPython: python/cpython#92062
The associated PR is: python/cpython#92065
A related issue in Pydantic is: pydantic/pydantic#4011
A related PR in Pydantic is: pydantic/pydantic#4012

agronholm added a commit to asphalt-framework/asphalt-web that referenced this issue Jul 12, 2022
@musicinmybrain
Copy link
Contributor

The issue is still present in FastAPI 0.79.0 and Python 3.11.0b4.

@musicinmybrain
Copy link
Contributor

Any thoughts on whether or not simply removing the aliases as described in the original report is an appropriate fix?

@musicinmybrain
Copy link
Contributor

I found that removing the aliases as suggested leads to errors even collecting the test suite, let alone running the tests, since these aliases are used quite heavily.

@musicinmybrain
Copy link
Contributor

The python-fastapi package will be retired from Fedora Linux beginning with Fedora 37 due to this issue.

@koviubi56
Copy link
Author

This issue has been resolved in v1.10.0a1 of Pydantic.

pcmoritz pushed a commit to ray-project/ray that referenced this issue 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 tiangolo/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 issue 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 tiangolo/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.
tamohannes pushed a commit to ju2ez/ray that referenced this issue Jan 16, 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 tiangolo/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 issue 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 tiangolo/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 issue 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 tiangolo/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>
@tiangolo tiangolo reopened this Feb 27, 2023
Repository owner locked and limited conversation to collaborators Feb 27, 2023
@tiangolo tiangolo converted this issue into discussion #6230 Feb 27, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Question or problem question-migrate
Projects
None yet
Development

No branches or pull requests

4 participants