Skip to content

Commit df95b9b

Browse files
committed
refactor(sqlalchemy-bigquery): drop extract_runtime_version for sys.version_info
1 parent d41682e commit df95b9b

2 files changed

Lines changed: 3 additions & 37 deletions

File tree

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import warnings
2424

25-
from . import _versions_helpers
2625
from ._types import (
2726
ARRAY,
2827
BIGNUMERIC,
@@ -44,16 +43,15 @@
4443
)
4544
from .base import BigQueryDialect, dialect
4645
from .version import __version__
47-
48-
sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
46+
import sys
4947

5048
# Now that support for Python 3.7, 3.8 and 3.9 has been removed, we don't expect the
5149
# following check to succeed. The warning is only included for robustness.
52-
if sys_major == 3 and sys_minor in (7, 8, 9): # pragma: NO COVER
50+
if sys.version_info < (3, 10): # pragma: NO COVER
5351
warnings.warn(
5452
"The python-bigquery-sqlalchemy library no longer supports Python 3.7, "
5553
"3.8 and 3.9. "
56-
f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We "
54+
f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}. We "
5755
"recommend that you update soon to ensure ongoing support. For "
5856
"more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)",
5957
FutureWarning,

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/_versions_helpers.py

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

0 commit comments

Comments
 (0)