Remove dependency on deprecated distutils #507
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The distutils module has been deprecated and will be removed in Python3.12: https://docs.python.org/3.11/library/distutils.html
setuptools also discourages using its vendored version: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#prefer-setuptools
The explicit
distutils
dependency / import inabstract_operations_client.py
is only needed for one call todistutils.util.strtobool()
:python-api-core/google/api_core/operations_v1/abstract_operations_client.py
Line 297 in 7dfc3a7
We encountered this under Python3.10 due to the way we build / run our code under Docker. This can be easily circumvented in our case by installing the
python3-distutils
Debian package, but the dependency should probably be removed from this package.Environment details
google-api-core
version:Name: google-api-core Version: 2.11.0 Summary: Google API client core library Home-page: https://github.com/googleapis/python-api-core Author: Google LLC Author-email: [email protected] License: Apache 2.0 Location: /tmp/venv/lib/python3.12/site-packages Requires: google-auth, googleapis-common-protos, protobuf, requests Required-by:
Steps to reproduce
python3.12 -m venv /tmp/venv
/tmp/venv/bin/pip install google-api-core
Code example
Stack trace
The text was updated successfully, but these errors were encountered: