From 4ee5703ba026465c727530ed7fc2508ebd90348a Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Fri, 8 May 2026 23:05:09 +0000 Subject: [PATCH 1/4] Started updating security alerts for Pytest. Also updated other dpendencies that were failing to build. --- auth/api-client/requirements-test.txt | 2 +- auth/api-client/requirements.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/api-client/requirements-test.txt b/auth/api-client/requirements-test.txt index 6ff70adf77d..787986d2f0e 100644 --- a/auth/api-client/requirements-test.txt +++ b/auth/api-client/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==8.2.0 +pytest==9.0.3 backoff==2.2.1 diff --git a/auth/api-client/requirements.txt b/auth/api-client/requirements.txt index 49f9ba5f887..6e3ecc212aa 100644 --- a/auth/api-client/requirements.txt +++ b/auth/api-client/requirements.txt @@ -1,7 +1,7 @@ -google-api-python-client==2.131.0 +google-api-python-client==2.196.0 google-auth-httplib2==0.2.0 google-auth==2.38.0 -google-cloud-api-keys==0.5.13 +google-cloud-api-keys==0.8.0 google-cloud-compute==1.11.0 google-cloud-language==2.15.1 -google-cloud-storage==2.9.0 +google-cloud-storage==3.10.1 From 8111a9e632f0855938234e1f149b0ed5f534a86b Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Sat, 9 May 2026 00:18:38 +0000 Subject: [PATCH 2/4] second wave of dependency updates. --- auth/custom-credentials/okta/noxfile_config.py | 2 +- auth/custom-credentials/okta/requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/custom-credentials/okta/noxfile_config.py b/auth/custom-credentials/okta/noxfile_config.py index 0ed973689f7..43be81de4a1 100644 --- a/auth/custom-credentials/okta/noxfile_config.py +++ b/auth/custom-credentials/okta/noxfile_config.py @@ -13,5 +13,5 @@ # limitations under the License. TEST_CONFIG_OVERRIDE = { - "ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"], + "ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.14"], } diff --git a/auth/custom-credentials/okta/requirements-test.txt b/auth/custom-credentials/okta/requirements-test.txt index f47609d2651..b539a4a18e5 100644 --- a/auth/custom-credentials/okta/requirements-test.txt +++ b/auth/custom-credentials/okta/requirements-test.txt @@ -1,2 +1,2 @@ -r requirements.txt -pytest==7.1.2 +pytest==9.0.3 From ba66cd4728d7d1e329038be1bed7f425ee279f0f Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Mon, 11 May 2026 22:26:34 +0000 Subject: [PATCH 3/4] - Added more updated dependencies for bigquery. --- bigquery/cloud-client/requirements-test.txt | 2 +- bigquery/cloud-client/requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bigquery/cloud-client/requirements-test.txt b/bigquery/cloud-client/requirements-test.txt index 7d32dfc20c7..84ae853071d 100644 --- a/bigquery/cloud-client/requirements-test.txt +++ b/bigquery/cloud-client/requirements-test.txt @@ -1,3 +1,3 @@ # samples/snippets should be runnable with no "extras" google-cloud-testutils==1.5.0 -pytest==8.3.4 +pytest==9.0.3 diff --git a/bigquery/cloud-client/requirements.txt b/bigquery/cloud-client/requirements.txt index 9897efac73c..29e768536d0 100644 --- a/bigquery/cloud-client/requirements.txt +++ b/bigquery/cloud-client/requirements.txt @@ -1,2 +1,3 @@ # samples/snippets should be runnable with no "extras" google-cloud-bigquery==3.29.0 +pyOpenSSL==26.2.0 From dde700ee5babeb8f495aab79058c3caa96a66f6a Mon Sep 17 00:00:00 2001 From: David del Real Sifuentes Date: Mon, 11 May 2026 22:34:40 +0000 Subject: [PATCH 4/4] Missed a few files. --- alloydb/notebooks/e2e_test.py | 10 ++++----- alloydb/notebooks/noxfile_config.py | 2 +- alloydb/notebooks/requirements-test.txt | 6 ++--- aml-ai/requirements-test.txt | 2 +- asset/snippets/requirements-test.txt | 2 +- asset/snippets/requirements.txt | 10 ++++----- auth/cloud-client-temp/noxfile.py | 2 +- auth/cloud-client-temp/requirements.txt | 3 +-- auth/cloud-client/requirements-test.txt | 2 +- auth/downscoping/requirements-test.txt | 5 ++--- auth/downscoping/requirements.txt | 6 ++--- auth/service-to-service/requirements-test.txt | 2 +- auth/service-to-service/requirements.txt | 4 ++-- automl/snippets/requirements-test.txt | 2 +- automl/snippets/requirements.txt | 6 ++--- batch/requirements-test.txt | 8 +++---- batch/requirements.txt | 4 ++-- .../snippets/noxfile_config.py | 2 +- .../snippets/requirements-test.txt | 2 +- .../snippets/noxfile_config.py | 2 +- .../snippets/requirements-test.txt | 4 ++-- .../snippets/requirements.txt | 3 ++- bigquery-migration/snippets/noxfile_config.py | 2 +- .../snippets/requirements-test.txt | 2 +- bigquery-migration/snippets/requirements.txt | 3 ++- bigquery/bigframes/call_python_udf.py | 22 +++++++------------ bigquery/bigframes/call_python_udf_test.py | 4 +++- bigquery/bigframes/noxfile_config.py | 2 +- bigquery/bigframes/requirements-test.txt | 2 +- bigquery/bigframes/requirements.txt | 2 +- bigquery/bqml/data_scientist_tutorial_test.py | 21 +++++------------- bigquery/bqml/ncaa_tutorial_test.py | 16 ++++---------- bigquery/bqml/noxfile_config.py | 2 +- bigquery/bqml/requirements-test.txt | 2 +- bigquery/bqml/requirements.txt | 2 -- 35 files changed, 72 insertions(+), 99 deletions(-) diff --git a/alloydb/notebooks/e2e_test.py b/alloydb/notebooks/e2e_test.py index 34516188c4a..46497fda9a0 100644 --- a/alloydb/notebooks/e2e_test.py +++ b/alloydb/notebooks/e2e_test.py @@ -93,9 +93,9 @@ async def test_embeddings_batch_processing( skip_shell_commands=True, replace={ ( - "password = input(\"Please provide " + 'password = input("Please provide ' "a password to be used for 'postgres' " - "database user: \")" + 'database user: ")' ): f"password = '{password}'", ( "await create_db(" @@ -141,14 +141,12 @@ async def test_embeddings_batch_processing( # Get the table back to the original state await conn.execute( sqlalchemy.text( - f"UPDATE {table_name} set " - f"analysis_embedding = NULL" + f"UPDATE {table_name} set " f"analysis_embedding = NULL" ) ) await conn.execute( sqlalchemy.text( - f"UPDATE {table_name} set " - f"overview_embedding = NULL" + f"UPDATE {table_name} set " f"overview_embedding = NULL" ) ) await conn.commit() diff --git a/alloydb/notebooks/noxfile_config.py b/alloydb/notebooks/noxfile_config.py index f5bc1ea9e2f..35591415ecb 100644 --- a/alloydb/notebooks/noxfile_config.py +++ b/alloydb/notebooks/noxfile_config.py @@ -14,7 +14,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12", "3.13"], + "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.11", "3.12", "3.13", 3.14], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/alloydb/notebooks/requirements-test.txt b/alloydb/notebooks/requirements-test.txt index ba12393197f..02707e1436d 100644 --- a/alloydb/notebooks/requirements-test.txt +++ b/alloydb/notebooks/requirements-test.txt @@ -1,6 +1,6 @@ -google-cloud-alloydb-connector[asyncpg]==1.5.0 +google-cloud-alloydb-connector[asyncpg]==1.12.1 sqlalchemy==2.0.40 -pytest==8.3.3 +pytest>=9.0.3 ipykernel==6.29.5 -pytest-asyncio==0.24.0 +pytest-asyncio==1.3.0 nbconvert==7.16.6 \ No newline at end of file diff --git a/aml-ai/requirements-test.txt b/aml-ai/requirements-test.txt index 060ed652e0b..d9ad1f716cc 100644 --- a/aml-ai/requirements-test.txt +++ b/aml-ai/requirements-test.txt @@ -1 +1 @@ -pytest==8.2.0 \ No newline at end of file +pytest==9.0.3 \ No newline at end of file diff --git a/asset/snippets/requirements-test.txt b/asset/snippets/requirements-test.txt index d57b0bfd0ab..f0cbd416948 100644 --- a/asset/snippets/requirements-test.txt +++ b/asset/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==2.2.1 flaky==3.8.1 -pytest==8.2.0 +pytest==9.0.3 diff --git a/asset/snippets/requirements.txt b/asset/snippets/requirements.txt index ed5d85fa0e3..b8a0fcea004 100644 --- a/asset/snippets/requirements.txt +++ b/asset/snippets/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-storage==2.9.0 -google-cloud-asset==3.27.1 -google-cloud-resource-manager==1.10.1 -google-cloud-pubsub==2.21.5 -google-cloud-bigquery==3.27.0 +google-cloud-storage==3.10.1 +google-cloud-asset==4.3.0 +google-cloud-resource-manager==1.17.0 +google-cloud-pubsub==2.38.0 +google-cloud-bigquery==3.41.0 diff --git a/auth/cloud-client-temp/noxfile.py b/auth/cloud-client-temp/noxfile.py index 3cdf3cf3bdb..c0672747cac 100644 --- a/auth/cloud-client-temp/noxfile.py +++ b/auth/cloud-client-temp/noxfile.py @@ -60,7 +60,7 @@ ] -@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]) +@nox.session(python=["3.10", "3.11", "3.12", "3.13"]) def unit(session): # constraints_path = str( # CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" diff --git a/auth/cloud-client-temp/requirements.txt b/auth/cloud-client-temp/requirements.txt index 8dafe853ea0..939663669ff 100644 --- a/auth/cloud-client-temp/requirements.txt +++ b/auth/cloud-client-temp/requirements.txt @@ -1,8 +1,7 @@ google-cloud-compute==1.42.0 google-cloud-storage==3.8.0 google-auth==2.47.0 -pytest===8.4.2; python_version == '3.9' -pytest==9.0.2; python_version > '3.9' +pytest==9.0.3; python_version > '3.9' boto3>=1.26.0 requests==2.32.5 python-dotenv==1.2.1 diff --git a/auth/cloud-client/requirements-test.txt b/auth/cloud-client/requirements-test.txt index 15d066af319..b3b2b3ca4cc 100644 --- a/auth/cloud-client/requirements-test.txt +++ b/auth/cloud-client/requirements-test.txt @@ -1 +1 @@ -pytest==8.2.0 +pytest==9.0.3 diff --git a/auth/downscoping/requirements-test.txt b/auth/downscoping/requirements-test.txt index 5d399275c93..61dab48ec3b 100644 --- a/auth/downscoping/requirements-test.txt +++ b/auth/downscoping/requirements-test.txt @@ -1,3 +1,2 @@ -pytest==8.2.0 -google-cloud-storage==2.9.0; python_version < '3.7' -google-cloud-storage==2.9.0; python_version > '3.6' +pytest==9.0.3 +google-cloud-storage==3.10.1; python_version > '3.9' diff --git a/auth/downscoping/requirements.txt b/auth/downscoping/requirements.txt index cb581b6e62b..5188427afff 100644 --- a/auth/downscoping/requirements.txt +++ b/auth/downscoping/requirements.txt @@ -1,3 +1,3 @@ -google-auth==2.38.0 -google-cloud-storage==2.9.0; python_version < '3.7' -google-cloud-storage==2.9.0; python_version > '3.6' +google-auth==2.52.0; python_version > '3.9' +google-cloud-storage==3.10.1; python_version > '3.9' +pyOpenSSL==26.2.0 \ No newline at end of file diff --git a/auth/service-to-service/requirements-test.txt b/auth/service-to-service/requirements-test.txt index 15d066af319..b3b2b3ca4cc 100644 --- a/auth/service-to-service/requirements-test.txt +++ b/auth/service-to-service/requirements-test.txt @@ -1 +1 @@ -pytest==8.2.0 +pytest==9.0.3 diff --git a/auth/service-to-service/requirements.txt b/auth/service-to-service/requirements.txt index ece414abb35..8ef1593e0a0 100644 --- a/auth/service-to-service/requirements.txt +++ b/auth/service-to-service/requirements.txt @@ -1,2 +1,2 @@ -google-auth==2.19.1 -requests==2.32.4 +google-auth==2.52.0; python_version > '3.9' +requests==2.33.1; python_version > '3.9' diff --git a/automl/snippets/requirements-test.txt b/automl/snippets/requirements-test.txt index f3230681cda..a5a3777fcb2 100644 --- a/automl/snippets/requirements-test.txt +++ b/automl/snippets/requirements-test.txt @@ -1,2 +1,2 @@ backoff==2.2.1 -pytest==8.2.0 +pytest==9.0.3 diff --git a/automl/snippets/requirements.txt b/automl/snippets/requirements.txt index 6386048f6eb..920463f0f34 100644 --- a/automl/snippets/requirements.txt +++ b/automl/snippets/requirements.txt @@ -1,3 +1,3 @@ -google-cloud-translate==3.18.0 -google-cloud-storage==2.9.0 -google-cloud-automl==2.14.1 +google-cloud-translate==3.26.0 +google-cloud-storage==3.10.1 +google-cloud-automl==2.19.0 diff --git a/batch/requirements-test.txt b/batch/requirements-test.txt index 08d1b1b9c1f..560b07be243 100644 --- a/batch/requirements-test.txt +++ b/batch/requirements-test.txt @@ -1,5 +1,5 @@ -pytest==8.2.0 -google-cloud-compute==1.11.0 -google-cloud-resource-manager==1.10.1 -google-cloud-storage==2.9.0 +pytest==9.0.3 +google-cloud-compute==1.47.0 +google-cloud-resource-manager==1.17.0 +google-cloud-storage==3.10.1 flaky==3.8.1 \ No newline at end of file diff --git a/batch/requirements.txt b/batch/requirements.txt index 3c5a9a00138..1d392a4f216 100644 --- a/batch/requirements.txt +++ b/batch/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-batch==0.17.31 -google-cloud-logging==3.5.0 +google-cloud-batch==0.21.0 +google-cloud-logging==3.15.0 diff --git a/bigquery-connection/snippets/noxfile_config.py b/bigquery-connection/snippets/noxfile_config.py index 28c09af52f7..381c09fb048 100644 --- a/bigquery-connection/snippets/noxfile_config.py +++ b/bigquery-connection/snippets/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"], + "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/bigquery-connection/snippets/requirements-test.txt b/bigquery-connection/snippets/requirements-test.txt index 5b0f38d50e2..a531c82b8f7 100644 --- a/bigquery-connection/snippets/requirements-test.txt +++ b/bigquery-connection/snippets/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==8.2.0 +pytest==9.0.3 google-cloud-testutils==1.5.0 \ No newline at end of file diff --git a/bigquery-datatransfer/snippets/noxfile_config.py b/bigquery-datatransfer/snippets/noxfile_config.py index 161ffcc14f3..f473d40e96d 100644 --- a/bigquery-datatransfer/snippets/noxfile_config.py +++ b/bigquery-datatransfer/snippets/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"], + "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, diff --git a/bigquery-datatransfer/snippets/requirements-test.txt b/bigquery-datatransfer/snippets/requirements-test.txt index ae8913096ea..aafa0c5710c 100644 --- a/bigquery-datatransfer/snippets/requirements-test.txt +++ b/bigquery-datatransfer/snippets/requirements-test.txt @@ -1,4 +1,4 @@ google-cloud-bigquery==3.27.0 -google-cloud-pubsub==2.28.0 -pytest==8.2.0 +google-cloud-pubsub==2.38.0 +pytest==9.0.3 mock==5.1.0 diff --git a/bigquery-datatransfer/snippets/requirements.txt b/bigquery-datatransfer/snippets/requirements.txt index c136720775a..7cd7db93791 100644 --- a/bigquery-datatransfer/snippets/requirements.txt +++ b/bigquery-datatransfer/snippets/requirements.txt @@ -1 +1,2 @@ -google-cloud-bigquery-datatransfer==3.17.1 +google-cloud-bigquery-datatransfer==3.22.0 +pyOpenSsl==26.2.0 diff --git a/bigquery-migration/snippets/noxfile_config.py b/bigquery-migration/snippets/noxfile_config.py index 68825a3b2dc..b19fa69717e 100644 --- a/bigquery-migration/snippets/noxfile_config.py +++ b/bigquery-migration/snippets/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.7", "3.8", "3.10", "3.11"], + "ignored_versions": ["2.7", "3.7", "3.8", "3.9", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/bigquery-migration/snippets/requirements-test.txt b/bigquery-migration/snippets/requirements-test.txt index d54b3ea50e2..32f4d6bf6d7 100644 --- a/bigquery-migration/snippets/requirements-test.txt +++ b/bigquery-migration/snippets/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==8.2.0 +pytest==9.0.3 google-cloud-testutils==1.5.0 google-api-core==2.17.1 google-cloud-storage==2.9.0 \ No newline at end of file diff --git a/bigquery-migration/snippets/requirements.txt b/bigquery-migration/snippets/requirements.txt index 767450fe41a..ec66708d8a9 100644 --- a/bigquery-migration/snippets/requirements.txt +++ b/bigquery-migration/snippets/requirements.txt @@ -1 +1,2 @@ -google-cloud-bigquery-migration==0.11.15 +google-cloud-bigquery-migration==0.14.0 +pyOpenSSL==26.2.0 diff --git a/bigquery/bigframes/call_python_udf.py b/bigquery/bigframes/call_python_udf.py index 200b1c1fb54..36231216a22 100644 --- a/bigquery/bigframes/call_python_udf.py +++ b/bigquery/bigframes/call_python_udf.py @@ -21,13 +21,13 @@ import pandas as pd import pyarrow as pa - # Using partial ordering mode enables more efficient query optimizations. bpd.options.bigquery.ordering_mode = "partial" def call_python_udf( - project_id: str, location: str, + project_id: str, + location: str, ) -> Tuple[pd.Series, bpd.Series]: # Set the billing project to use for queries. This step is optional, as the # project can be inferred from your environment in many cases. @@ -39,30 +39,24 @@ def call_python_udf( # Create a sample series. xml_series = pd.Series( [ - textwrap.dedent( - """ + textwrap.dedent(""" The Great Gatsby F. Scott Fitzgerald - """ - ), - textwrap.dedent( - """ + """), + textwrap.dedent(""" 1984 George Orwell - """ - ), - textwrap.dedent( - """ + """), + textwrap.dedent(""" Brave New World Aldous Huxley - """ - ), + """), ], dtype=pd.ArrowDtype(pa.string()), ) diff --git a/bigquery/bigframes/call_python_udf_test.py b/bigquery/bigframes/call_python_udf_test.py index 67475d94718..c8b4a09961c 100644 --- a/bigquery/bigframes/call_python_udf_test.py +++ b/bigquery/bigframes/call_python_udf_test.py @@ -19,6 +19,8 @@ def test_call_python_udf(project_id: str, location: str) -> None: bpd.close_session() - pd_result, bf_result = call_python_udf.call_python_udf(project_id=project_id, location=location) + pd_result, bf_result = call_python_udf.call_python_udf( + project_id=project_id, location=location + ) assert len(pd_result.index) == 3 assert len(bf_result.index) == 3 diff --git a/bigquery/bigframes/noxfile_config.py b/bigquery/bigframes/noxfile_config.py index f19dde20378..9b6f17e399b 100644 --- a/bigquery/bigframes/noxfile_config.py +++ b/bigquery/bigframes/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.6", "3.8", "3.9", "3.11"], + "ignored_versions": ["2.7", "3.6", "3.8", "3.9", "3.10", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": True, diff --git a/bigquery/bigframes/requirements-test.txt b/bigquery/bigframes/requirements-test.txt index f1684cd8061..887f4524a68 100644 --- a/bigquery/bigframes/requirements-test.txt +++ b/bigquery/bigframes/requirements-test.txt @@ -1,2 +1,2 @@ flaky==3.8.1 -pytest==8.2.0 +pytest==9.0.3 diff --git a/bigquery/bigframes/requirements.txt b/bigquery/bigframes/requirements.txt index a14856a58d8..918e558f745 100644 --- a/bigquery/bigframes/requirements.txt +++ b/bigquery/bigframes/requirements.txt @@ -1 +1 @@ -bigframes==2.38.0 +bigframes==2.39.0 diff --git a/bigquery/bqml/data_scientist_tutorial_test.py b/bigquery/bqml/data_scientist_tutorial_test.py index 860f8286879..afcbd01300d 100644 --- a/bigquery/bqml/data_scientist_tutorial_test.py +++ b/bigquery/bqml/data_scientist_tutorial_test.py @@ -20,7 +20,6 @@ # [END bqml_data_scientist_tutorial_import_and_client] import pytest - # [START bqml_data_scientist_tutorial_import_and_client] client = bigquery.Client() # We use a unique dataset ID for this example to avoid collisions with @@ -58,9 +57,7 @@ def test_data_scientist_tutorial(delete_dataset): `bigquery-public-data.google_analytics_sample.ga_sessions_*` WHERE _TABLE_SUFFIX BETWEEN '20160801' AND '20170630' - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_data_scientist_tutorial_create_model] @@ -71,9 +68,7 @@ def test_data_scientist_tutorial(delete_dataset): * FROM ML.TRAINING_INFO(MODEL `{}.sample_model`) - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_data_scientist_tutorial_get_training_statistics] @@ -93,9 +88,7 @@ def test_data_scientist_tutorial(delete_dataset): `bigquery-public-data.google_analytics_sample.ga_sessions_*` WHERE _TABLE_SUFFIX BETWEEN '20170701' AND '20170801')) - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_data_scientist_tutorial_evaluate_model] @@ -118,9 +111,7 @@ def test_data_scientist_tutorial(delete_dataset): GROUP BY country ORDER BY total_predicted_purchases DESC LIMIT 10 - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_data_scientist_tutorial_predict_transactions] @@ -144,9 +135,7 @@ def test_data_scientist_tutorial(delete_dataset): GROUP BY fullVisitorId ORDER BY total_predicted_purchases DESC LIMIT 10 - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_data_scientist_tutorial_predict_purchases] diff --git a/bigquery/bqml/ncaa_tutorial_test.py b/bigquery/bqml/ncaa_tutorial_test.py index 75388d969a2..721aa3bc491 100644 --- a/bigquery/bqml/ncaa_tutorial_test.py +++ b/bigquery/bqml/ncaa_tutorial_test.py @@ -71,9 +71,7 @@ def test_ncaa_tutorial(delete_dataset): WHERE # remove the game to predict game_id != 'f1063e80-23c7-486b-9a5e-faa52beb2d83' - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_ncaa_tutorial_create_model] @@ -84,9 +82,7 @@ def test_ncaa_tutorial(delete_dataset): * FROM ML.TRAINING_INFO(MODEL `{}.ncaa_model`) - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_ncaa_tutorial_get_training_statistics] @@ -104,9 +100,7 @@ def test_ncaa_tutorial(delete_dataset): FROM ML.EVALUATE(MODEL `{0}.ncaa_model`, TABLE eval_table) - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_ncaa_tutorial_evaluate_model] @@ -139,9 +133,7 @@ def test_ncaa_tutorial(delete_dataset): game_to_predict) AS truth ON predict.game_id = truth.game_id - """.format( - dataset_id - ) + """.format(dataset_id) df = client.query(sql).to_dataframe() print(df) # [END bqml_ncaa_tutorial_predict_outcomes] diff --git a/bigquery/bqml/noxfile_config.py b/bigquery/bqml/noxfile_config.py index 4e2c703470f..d08fb2085a4 100644 --- a/bigquery/bqml/noxfile_config.py +++ b/bigquery/bqml/noxfile_config.py @@ -23,7 +23,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. # Skipping for Python 3.9 due to pyarrow compilation failure. - "ignored_versions": ["2.7", "3.6", "3.9", "3.11"], + "ignored_versions": ["2.7", "3.6", "3.9", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, diff --git a/bigquery/bqml/requirements-test.txt b/bigquery/bqml/requirements-test.txt index f1684cd8061..887f4524a68 100644 --- a/bigquery/bqml/requirements-test.txt +++ b/bigquery/bqml/requirements-test.txt @@ -1,2 +1,2 @@ flaky==3.8.1 -pytest==8.2.0 +pytest==9.0.3 diff --git a/bigquery/bqml/requirements.txt b/bigquery/bqml/requirements.txt index cfed3976b1d..feb4a7c2b45 100644 --- a/bigquery/bqml/requirements.txt +++ b/bigquery/bqml/requirements.txt @@ -1,8 +1,6 @@ google-cloud-bigquery[pandas,bqstorage]==3.27.0 google-cloud-bigquery-storage==2.27.0 -pandas==2.0.3; python_version == '3.8' pandas==2.2.3; python_version > '3.8' -pyarrow==17.0.0; python_version <= '3.8' pyarrow==20.0.0; python_version > '3.9' flaky==3.8.1 mock==5.1.0