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: drop support for end-of-life Python 3.10 (#19015) · googleapis/google-cloud-python@13d691b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/pandas-gbq
    • CONTRIBUTING.rst
    • docs
      • conf.py
    • noxfile.py
    • pandas_gbq
      • __init__.py
    • setup.py
    • testing
      • constraints-3.10.txt
      • constraints-3.11.txt
    • tests/unit
      • test_context.py
      • test_gbq.py
      • test_query.py
      • test_to_gbq.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/pandas-gbq/CONTRIBUTING.rst‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/CONTRIBUTING.rst
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows.
25+
3.11, 3.12, 3.13, 3.14 and 3.15 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -195,11 +195,11 @@ configure them just like the System Tests.
195195

196196
# Run all tests in a folder
197197
$ cd samples/snippets
198-
$ nox -s py-3.10
198+
$ nox -s py-3.14
199199

200200
# Run a single sample test
201201
$ cd samples/snippets
202-
$ nox -s py-3.10 -- -k <name of test>
202+
$ nox -s py-3.14 -- -k <name of test>
203203

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI
@@ -221,25 +221,25 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.10`_
225224
- `Python 3.11`_
226225
- `Python 3.12`_
227226
- `Python 3.13`_
228227
- `Python 3.14`_
228+
- `Python 3.15`_
229229

230-
.. _Python 3.10: https://docs.python.org/3.10/
231230
.. _Python 3.11: https://docs.python.org/3.11/
232231
.. _Python 3.12: https://docs.python.org/3.12/
233232
.. _Python 3.13: https://docs.python.org/3.13/
234233
.. _Python 3.14: https://docs.python.org/3.14/
234+
.. _Python 3.15: https://docs.python.org/3.15/
235235

236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239239
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/pandas-gbq/noxfile.py
240240

241241

242-
We also explicitly decided to support Python 3 beginning with version 3.10.
242+
We also explicitly decided to support Python 3 beginning with version 3.11.
243243
Reasons for this include:
244244

245245
- Encouraging use of newest versions of Python 3
Collapse file

‎packages/pandas-gbq/docs/conf.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/docs/conf.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# serve to show the default.
2626

2727
import os
28-
import shlex
2928
import sys
3029

3130
# If extensions (or modules to document with autodoc) are in another directory,
Collapse file

‎packages/pandas-gbq/noxfile.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/noxfile.py
+15-5Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
DEFAULT_PYTHON_VERSION = "3.14"
3737

38-
UNIT_TEST_PYTHON_VERSIONS = [
38+
ALL_PYTHON = [
3939
"3.10",
4040
"3.11",
4141
"3.12",
@@ -44,6 +44,14 @@
4444
"3.15",
4545
]
4646

47+
UNIT_TEST_PYTHON_VERSIONS = [
48+
"3.11",
49+
"3.12",
50+
"3.13",
51+
"3.14",
52+
"3.15",
53+
]
54+
4755
UNIT_TEST_STANDARD_DEPENDENCIES = [
4856
"mock",
4957
"asyncmock",
@@ -62,7 +70,7 @@
6270
"geopandas",
6371
]
6472
UNIT_TEST_EXTRAS_BY_PYTHON = {
65-
"3.10": [],
73+
"3.11": [], # We need at least one "no extras" Python to test against.
6674
}
6775

6876
SYSTEM_TEST_PYTHON_VERSIONS = ["3.12"]
@@ -264,10 +272,12 @@ def default(session):
264272
)
265273

266274

267-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
275+
@nox.session(python=ALL_PYTHON)
268276
@_calculate_duration
269277
def unit(session):
270278
"""Run the unit test suite."""
279+
if session.python not in UNIT_TEST_PYTHON_VERSIONS:
280+
session.skip(f"Python {session.python} is not supported.")
271281
default(session)
272282

273283

@@ -472,7 +482,7 @@ def cover(session):
472482
session.run("coverage", "erase")
473483

474484

475-
@nox.session(python="3.10")
485+
@nox.session(python="3.11")
476486
@_calculate_duration
477487
def docs(session):
478488
"""Build the docs for this library."""
@@ -508,7 +518,7 @@ def docs(session):
508518
)
509519

510520

511-
@nox.session(python="3.10")
521+
@nox.session(python="3.11")
512522
@_calculate_duration
513523
def docfx(session):
514524
"""Build the docfx yaml files for this library."""
Collapse file

‎packages/pandas-gbq/pandas_gbq/__init__.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/pandas_gbq/__init__.py
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# license that can be found in the LICENSE file.
44

55
import logging
6-
import sys
7-
import warnings
86

97
from pandas_gbq import arrow
108
from pandas_gbq import version as pandas_gbq_version
@@ -13,15 +11,6 @@
1311

1412
from .gbq import read_gbq, to_gbq # noqa
1513

16-
if sys.version_info < (3, 10):
17-
warnings.warn(
18-
"pandas-gbq no longer supports Python versions older than 3.10. "
19-
f"Your Python version is {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}. "
20-
"Please update to Python 3.10 or newer to ensure ongoing support. For more details, "
21-
"see: https://cloud.google.com/python/docs/supported-python-versions",
22-
FutureWarning,
23-
)
24-
2514
logger = logging.Logger(__name__)
2615

2716
__version__ = pandas_gbq_version.__version__
Collapse file

‎packages/pandas-gbq/setup.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/setup.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
"License :: OSI Approved :: BSD License",
8989
"Programming Language :: Python",
9090
"Programming Language :: Python :: 3",
91-
"Programming Language :: Python :: 3.10",
9291
"Programming Language :: Python :: 3.11",
9392
"Programming Language :: Python :: 3.12",
9493
"Programming Language :: Python :: 3.13",
@@ -102,7 +101,7 @@
102101
packages=packages,
103102
install_requires=dependencies,
104103
extras_require=extras,
105-
python_requires=">=3.10",
104+
python_requires=">=3.11",
106105
include_package_data=True,
107106
zip_safe=False,
108107
)
Collapse file

‎packages/pandas-gbq/testing/constraints-3.10.txt‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/testing/constraints-3.10.txt
-23Lines changed: 0 additions & 23 deletions
This file was deleted.
Collapse file

‎packages/pandas-gbq/testing/constraints-3.11.txt‎

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This constraints file is used to check that lower bounds
2+
# are correct in setup.py
3+
# List *all* library dependencies and extras in this file.
4+
# Pin the version to the lower bound.
5+
#
6+
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
7+
# Then this file should have foo==1.14.0
8+
db-dtypes==1.1.1
9+
numpy==1.26.4
10+
pandas==1.5.3
11+
pyarrow==12.0.0
12+
pydata-google-auth==1.5.0
13+
psutil==5.9.8
14+
google-api-core==2.25.0
15+
google-auth==2.14.1
16+
google-auth-oauthlib==0.7.0
17+
google-cloud-bigquery==3.20.0
18+
packaging==22.0.0
19+
# Extras
20+
google-cloud-bigquery-storage==2.29.0
21+
tqdm==4.23.0
22+
geopandas==0.14.4
23+
Shapely==1.8.5
Collapse file

‎packages/pandas-gbq/tests/unit/test_context.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/tests/unit/test_context.py
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ def test_read_gbq_should_use_dialect_with_query(monkeypatch, mock_bigquery_clien
8585
def test_read_gbq_should_use_dialect_with_query_and_wait(
8686
monkeypatch, mock_bigquery_client
8787
):
88-
if not hasattr(mock_bigquery_client, "query_and_wait"):
89-
pytest.skip(
90-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
91-
)
92-
9388
import pandas_gbq
9489
import pandas_gbq.features
9590

Collapse file

‎packages/pandas-gbq/tests/unit/test_gbq.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/tests/unit/test_gbq.py
+4-32Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ def mock_row_iterator(mock_bigquery_client):
5858
def generate_schema():
5959
if mock_bigquery_client.query.call_args:
6060
query = mock_bigquery_client.query.call_args[0][0]
61-
elif (
62-
hasattr(mock_bigquery_client, "query_and_wait")
63-
and mock_bigquery_client.query_and_wait.call_args
64-
):
61+
elif mock_bigquery_client.query_and_wait.call_args:
6562
query = mock_bigquery_client.query_and_wait.call_args[0][0]
6663
else:
6764
query = ""
@@ -81,9 +78,7 @@ def default_bigquery_client(mock_bigquery_client, mock_query_job, mock_row_itera
8178
mock_row_iterator.job = mock_query_job
8279
mock_bigquery_client.list_rows.return_value = mock_row_iterator
8380
mock_bigquery_client.query.return_value = mock_query_job
84-
85-
if hasattr(mock_bigquery_client, "query_and_wait"):
86-
mock_bigquery_client.query_and_wait.return_value = mock_row_iterator
81+
mock_bigquery_client.query_and_wait.return_value = mock_row_iterator
8782

8883
# Mock out get_table.
8984
def get_table(table_ref_or_id, **kwargs):
@@ -497,11 +492,6 @@ def test_read_gbq_with_inferred_project_id_with_query(
497492
def test_read_gbq_with_inferred_project_id_with_query_and_wait(
498493
monkeypatch, mock_bigquery_client
499494
):
500-
if not hasattr(mock_bigquery_client, "query_and_wait"):
501-
pytest.skip(
502-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
503-
)
504-
505495
monkeypatch.setattr(
506496
pandas_gbq.features.FEATURES,
507497
"_bigquery_installed_version",
@@ -540,11 +530,6 @@ def test_read_gbq_with_inferred_project_id_from_service_account_credentials_with
540530
def test_read_gbq_with_inferred_project_id_from_service_account_credentials_with_query_and_wait(
541531
monkeypatch, mock_bigquery_client, mock_service_account_credentials
542532
):
543-
if not hasattr(mock_bigquery_client, "query_and_wait"):
544-
pytest.skip(
545-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
546-
)
547-
548533
monkeypatch.setattr(
549534
pandas_gbq.features.FEATURES,
550535
"_bigquery_installed_version",
@@ -598,11 +583,6 @@ def test_read_gbq_with_max_results_ten_query(monkeypatch, mock_query_job):
598583
def test_read_gbq_with_max_results_ten_query_and_wait(
599584
monkeypatch, mock_bigquery_client
600585
):
601-
if not hasattr(mock_bigquery_client, "query_and_wait"):
602-
pytest.skip(
603-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
604-
)
605-
606586
monkeypatch.setattr(
607587
pandas_gbq.features.FEATURES,
608588
"_bigquery_installed_version",
@@ -966,15 +946,7 @@ def test_read_gbq_with_dry_run(mock_bigquery_client, mock_query_job):
966946

967947
dry_run_result = gbq.read_gbq("SELECT 1", project_id="my-project", dry_run=True)
968948

969-
# Check which method was called based on BigQuery version
970-
if (
971-
hasattr(mock_bigquery_client, "query_and_wait")
972-
and mock_bigquery_client.query_and_wait.called
973-
):
974-
_, kwargs = mock_bigquery_client.query_and_wait.call_args
975-
job_config = kwargs["job_config"]
976-
else:
977-
_, kwargs = mock_bigquery_client.query.call_args
978-
job_config = kwargs["job_config"]
949+
_, kwargs = mock_bigquery_client.query.call_args
950+
job_config = kwargs["job_config"]
979951
assert job_config.dry_run is True
980952
assert dry_run_result["totalBytesProcessed"] == total_bytes_processed
Collapse file

‎packages/pandas-gbq/tests/unit/test_query.py‎

Copy file name to clipboardExpand all lines: packages/pandas-gbq/tests/unit/test_query.py
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ def _make_connector(project_id: str = "some-project", **kwargs):
2626
def test_query_and_wait_via_client_library_apierror_raises_genericgbqexception(
2727
mock_bigquery_client,
2828
):
29-
if not hasattr(mock_bigquery_client, "query_and_wait"):
30-
pytest.skip(
31-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
32-
)
33-
3429
connector = _make_connector()
3530
connector.client = mock_bigquery_client
3631
mock_bigquery_client.query_and_wait.side_effect = (
@@ -53,11 +48,6 @@ def test_query_and_wait_via_client_library_apierror_raises_genericgbqexception(
5348
def test_query_and_wait_via_client_library_refresherror_raises_accessdenied_service_account(
5449
mock_bigquery_client,
5550
):
56-
if not hasattr(mock_bigquery_client, "query_and_wait"):
57-
pytest.skip(
58-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
59-
)
60-
6151
connector = _make_connector()
6252
connector.private_key = "abc"
6353
connector.client = mock_bigquery_client
@@ -81,11 +71,6 @@ def test_query_and_wait_via_client_library_refresherror_raises_accessdenied_serv
8171
def test_query_and_wait_via_client_library_refresherror_raises_accessdenied_user_credentials(
8272
mock_bigquery_client,
8373
):
84-
if not hasattr(mock_bigquery_client, "query_and_wait"):
85-
pytest.skip(
86-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
87-
)
88-
8974
connector = _make_connector()
9075
connector.client = mock_bigquery_client
9176
mock_bigquery_client.query_and_wait.side_effect = (
@@ -108,11 +93,6 @@ def test_query_and_wait_via_client_library_refresherror_raises_accessdenied_user
10893
def test_query_and_wait_via_client_library_timeout_raises_querytimeout(
10994
mock_bigquery_client,
11095
):
111-
if not hasattr(mock_bigquery_client, "query_and_wait"):
112-
pytest.skip(
113-
f"google-cloud-bigquery {google.cloud.bigquery.__version__} does not have query_and_wait"
114-
)
115-
11696
connector = _make_connector()
11797
connector.client = mock_bigquery_client
11898
connector.start = datetime.datetime(2020, 1, 1).timestamp()

0 commit comments

Comments
0 (0)
You are visitor 01402520 — 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.