Update dependencies to support Python 3.12#439
Conversation
|
Thanks for the contribution! This PR contains changes from the user agent PR as well, please make sure you create a new branch from main for each new PR. Youre also welcome to add 3.12 to the build matrix for the functional testing CI job if you want to enable the unit tests to run in a python 3.12 environment |
Python 3.12+ installations were failing due to several pinned dependencies not providing compatible wheels or builds. Changes based on investigation in chaoss#163: - tensorflow: 2.15.0 -> >=2.16.1 (first version with Python 3.12 wheels) - scikit-image: 0.19.1 -> >=0.22.0 (fixes ModuleNotFoundError: distutils) - protobuf: removed <3.22 upper cap (was blocking newer tensorflow) - pandas: ==1.5.3 -> >=1.5.3 (relaxed to resolve dependency conflicts) - classifiers: added Python 3.12 to supported versions Fixes chaoss#163 Signed-off-by: Diptesh Roy <droy88333@gmail.com>
Signed-off-by: Diptesh Roy <droy88333@gmail.com>
60ec9af to
8b4bc6e
Compare
Yes sir did the necessary changes. |
Enables unit tests to run in a Python 3.12 environment as part of validating the dependency updates in this PR. Signed-off-by: Diptesh Roy <droy88333@gmail.com>
|
CI is failing. i suspect because the pandas version is from 2023 and setuptools is likely using the latest version. I think this maybe needs more testing to see what pandas version we need to bump to to fix this, without causing other things to fail |
|
oh wait pandas is unlocked - maybe we need to bump beyond 1.5? i think 1.5 was the last pandas version before 2.0 and i dont think |
pandas 1.5.x does not support Python 3.12. >=1.5.3 was not sufficient because uv resolves to the latest compatible minor version, and 1.5 was the last series before 2.0. Bumping to >=2.0.0 ensures a Python 3.12 compatible version is resolved. Regenerated uv.lock accordingly. Signed-off-by: Diptesh Roy <droy88333@gmail.com>
|
@MoralCode sir bumped pandas to >=2.0.0 and regenerated uv.lock. |
On Python 3.12, celery -> dateutil -> six.moves fails with: ModuleNotFoundError: No module named 'six.moves' python-dateutil depends on six but uv was not resolving six as a transitive dependency on Python 3.12. Adding six>=1.5 explicitly ensures it gets installed. Signed-off-by: Diptesh Roy <droy88333@gmail.com>
six 1.15.0 has a known issue where six.moves fails to register properly on Python 3.12, causing ModuleNotFoundError. six 1.16.0+ fixes this. Updated uv.lock accordingly (resolves to six 1.17.0). Signed-off-by: Diptesh Roy <droy88333@gmail.com>
|
sounds good! because we made a major version bump, id like to read the release notes for pandas 2.0 and find some way to validate that our use of pandas is not affected by it. We have plenty of time for that since I'd like to merge this after 1.1 comes out too |
Description
Python 3.12+ installations were failing because several pinned
dependencies don't provide compatible wheels or use removed stdlib
modules (distutils).
Changes based on the investigation documented in #163:
tensorflow:==2.15.0→>=2.16.1— first version with Python 3.12 wheelsscikit-image:==0.19.1→>=0.22.0— fixesModuleNotFoundError: No module named 'distutils'protobuf: removed<3.22upper cap — was blocking newer TensorFlow versionspandas:==1.5.3→>=1.5.3— relaxed to resolve cascading dependency conflictsPython :: 3.12Note:
uv.lockwill need to be regenerated after merging (uv lock).Testing with the automated unit tests on Python 3.12 would be valuable.
This PR fixes #163
Notes for Reviewers
Only
pyproject.tomlchanged. The lock file will need regenerating.Would appreciate testing on Python 3.12 to confirm unit tests pass.
Signed commits
Generative AI disclosure