Title: Remove dependency on deprecated distutils · Issue #507 · googleapis/python-api-core · GitHub
Open Graph Title: Remove dependency on deprecated distutils · Issue #507 · googleapis/python-api-core
X Title: Remove dependency on deprecated distutils · Issue #507 · googleapis/python-api-core
Description: 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/distu...
Open Graph Description: 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://setup...
X Description: 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://setup...
Opengraph URL: https://github.com/googleapis/python-api-core/issues/507
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove dependency on deprecated distutils","articleBody":"The distutils module has been deprecated and will be removed in Python3.12: https://docs.python.org/3.11/library/distutils.html\r\n\r\nsetuptools also discourages using its vendored version: https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#prefer-setuptools\r\n\r\n\r\nThe explicit `distutils` dependency / import in `abstract_operations_client.py` is only needed for one call to `distutils.util.strtobool()`: https://github.com/googleapis/python-api-core/blob/7dfc3a7a439243f05238a11b68a31720fde1769e/google/api_core/operations_v1/abstract_operations_client.py#L297\r\n\r\nWe 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.\r\n\r\n#### Environment details\r\n\r\n - OS type and version: Linux 218300304P 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux\r\n - Python version: Python 3.12.0b2\r\n - pip version: pip 23.1.2 from /tmp/venv/lib/python3.12/site-packages/pip (python 3.12)\r\n - `google-api-core` version: ```Name: google-api-core\r\nVersion: 2.11.0\r\nSummary: Google API client core library\r\nHome-page: https://github.com/googleapis/python-api-core\r\nAuthor: Google LLC\r\nAuthor-email: googleapis-packages@google.com\r\nLicense: Apache 2.0\r\nLocation: /tmp/venv/lib/python3.12/site-packages\r\nRequires: google-auth, googleapis-common-protos, protobuf, requests\r\nRequired-by:```\r\n\r\n#### Steps to reproduce\r\n\r\n 1. `python3.12 -m venv /tmp/venv`\r\n 2. `/tmp/venv/bin/pip install google-api-core`\r\n\r\n\r\n#### Code example\r\n\r\n```python\r\nfrom google.api_core.operations_v1.abstract_operations_client import AbstractOperationsClient\r\n```\r\n\r\n#### Stack trace\r\n```\r\nTraceback (most recent call last):\r\n File \"\u003cstring\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/tmp/venv/lib/python3.12/site-packages/google/api_core/operations_v1/__init__.py\", line 17, in \u003cmodule\u003e\r\n from google.api_core.operations_v1.abstract_operations_client import AbstractOperationsClient\r\n File \"/tmp/venv/lib/python3.12/site-packages/google/api_core/operations_v1/abstract_operations_client.py\", line 17, in \u003cmodule\u003e\r\n from distutils import util\r\nModuleNotFoundError: No module named 'distutils'\r\n```\r\n\r\n","author":{"url":"https://github.com/noirbee","@type":"Person","name":"noirbee"},"datePublished":"2023-06-13T12:50:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/507/python-api-core/issues/507"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6bc8caa5-9d44-9005-0a55-e26ef24944d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0D6:E21C4:1E44B5:27E864:6A4ED219 |
| html-safe-nonce | 894b35c6a14dee28b88638b213be568f9ac4551cd3af0c7f874de490d90268e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEQ2OkUyMUM0OjFFNDRCNToyN0U4NjQ6NkE0RUQyMTkiLCJ2aXNpdG9yX2lkIjoiNTg0NzU3Mzc2NzcyMzk1NTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d7340fcacb0cc6ba9d6bbdf1b0845240daf4bc2955b9da7010621b17086ef4ff |
| hovercard-subject-tag | issue:1754819438 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/507/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4ea72d3660eadc308113a96b4fc7aafa5d26304114f23493bf934ae2560bfdc2/googleapis/python-api-core/issues/507 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4ea72d3660eadc308113a96b4fc7aafa5d26304114f23493bf934ae2560bfdc2/googleapis/python-api-core/issues/507 |
| og:image:alt | 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://setup... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | noirbee |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992456 |
| octolytics-dimension-repository_nwo | googleapis/python-api-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992456 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-api-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width