Skip to content

Commit 920a4fb

Browse files
committed
refactor(pandas-gbq): Standardize version check and remove helper
1 parent b41ba48 commit 920a4fb

2 files changed

Lines changed: 4 additions & 38 deletions

File tree

packages/pandas-gbq/pandas_gbq/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
# license that can be found in the LICENSE file.
44

55
import logging
6+
import sys
67
import warnings
78

89
from pandas_gbq import version as pandas_gbq_version
910
from pandas_gbq.contexts import Context, context
1011
from pandas_gbq.core.sample import sample
1112

12-
from . import _versions_helpers
1313
from .gbq import read_gbq, to_gbq # noqa
1414

15-
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
16-
if sys_major == 3 and sys_minor < 10:
15+
if sys.version_info < (3, 10):
1716
warnings.warn(
1817
"pandas-gbq no longer supports Python versions older than 3.10. "
19-
"Your Python version is "
20-
f"{sys_major}.{sys_minor}.{sys_micro}. Please update "
21-
"to Python 3.10 or newer to ensure ongoing support. For more details, "
18+
f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}. "
19+
"Please update to Python 3.10 or newer to ensure ongoing support. For more details, "
2220
"see: https://cloud.google.com/python/docs/supported-python-versions",
2321
FutureWarning,
2422
)

packages/pandas-gbq/pandas_gbq/_versions_helpers.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)