GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Log version check errors (#858) · googleapis/python-api-core@6493118

This repository was archived by the owner on Feb 23, 2026. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google/api_core
    • _python_version_support.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/api_core/_python_version_support.py‎

Copy file name to clipboardExpand all lines: google/api_core/_python_version_support.py
+11-4Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@
1616

1717
import datetime
1818
import enum
19+
import logging
1920
import warnings
2021
import sys
2122
import textwrap
2223
from typing import Any, List, NamedTuple, Optional, Dict, Tuple
2324

2425

26+
_LOGGER = logging.getLogger(__name__)
27+
28+
2529
class PythonVersionStatus(enum.Enum):
2630
"""Support status of a Python version in this client library artifact release.
2731
@@ -168,11 +172,14 @@ def _get_pypi_package_name(module_name):
168172
if module_name in module_to_distributions: # pragma: NO COVER
169173
# The value is a list of distribution names, take the first one
170174
return module_to_distributions[module_name][0]
171-
else:
172-
return None # Module not found in the mapping
173175
except Exception as e:
174-
print(f"An error occurred: {e}")
175-
return None
176+
_LOGGER.info(
177+
"An error occurred while determining PyPI package name for %s: %s",
178+
module_name,
179+
e,
180+
)
181+
182+
return None
176183

177184

178185
def _get_distribution_and_import_packages(import_package: str) -> Tuple[str, Any]:

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.