Python 3.8 reaches EOL in October. Meanwhile, python 3.11 and 3.12 have been released since we last updated our supported python versions. This PR adds support for 3.11 and 3.12, and changes the default bazel targets to use 3.9 instead of 3.8. Some things of note:
The bazel dependency for torchvision in python3.10 is no longer resolving (and doesn't resolve for 3.11 or 3.12 either). For now, this PR handles that by making all bazel targets depending on torch vision only get built/tested for 3.8 and 3.9 . Note that this does NOT mean the examples using torch vision will not be runnable in higher python versions outside the context of bazel.
recent rules_python introduce a complex bazel workspace dependency issue so we can only have bazel targets for building and testing with interpreters up to python3.11. Note again that this is a limitation of what we can do in bazel and not a limitation of what interpreters the resulting wheel can be run with.
Note that this does not change what version of python the server or default worker images run with (python3.9 for both). So this is essentially an sdk and local-server only change.
Testing
Ran all bazel tests
Used bazel CLI to start local server and run the MNIST example against it
built a wheel and ran the following tests on fresh virtual envs with python 3.9/3.10/3.11/3.12: (a) install from wheel (b) stop and start local server (c) run mnist example (d) view it in browser
Python 3.8 reaches EOL in October. Meanwhile, python 3.11 and 3.12 have been released since we last updated our supported python versions. This PR adds support for 3.11 and 3.12, and changes the default bazel targets to use 3.9 instead of 3.8. Some things of note:
The bazel dependency for torchvision in python3.10 is no longer resolving (and doesn't resolve for 3.11 or 3.12 either). For now, this PR handles that by making all bazel targets depending on torch vision only get built/tested for 3.8 and 3.9 . Note that this does NOT mean the examples using torch vision will not be runnable in higher python versions outside the context of bazel.
recent
rules_python
introduce a complex bazel workspace dependency issue so we can only have bazel targets for building and testing with interpreters up to python3.11. Note again that this is a limitation of what we can do in bazel and not a limitation of what interpreters the resulting wheel can be run with.Note that this does not change what version of python the server or default worker images run with (python3.9 for both). So this is essentially an sdk and local-server only change.
Testing