Skip to content

Commit 4b03c9f

Browse files
committed
fix: remove call to importlib.metadata.packages_distributions() for py38/py39
1 parent 6493118 commit 4b03c9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

google/api_core/_python_version_support.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ def _flatten_message(text: str) -> str:
151151
return " ".join(textwrap.dedent(text).strip().split())
152152

153153

154-
# TODO(https://github.com/googleapis/python-api-core/issues/835): Remove once we
155-
# no longer support Python 3.7
156-
if sys.version_info < (3, 8):
154+
# TODO(https://github.com/googleapis/python-api-core/issues/835):
155+
# Remove once we no longer support Python 3.9.
156+
# `metadata.packages_distributions()` is only supported in Python 3.10 and newer
157+
if sys.version_info < (3, 10):
157158

158159
def _get_pypi_package_name(module_name): # pragma: NO COVER
159160
"""Determine the PyPI package name for a given module name."""

0 commit comments

Comments
 (0)