diff --git a/.librarian/generator-input/client-post-processing/firestore-integration.yaml b/.librarian/generator-input/client-post-processing/firestore-integration.yaml index 50defa6a4829..d31022a3b362 100644 --- a/.librarian/generator-input/client-post-processing/firestore-integration.yaml +++ b/.librarian/generator-input/client-post-processing/firestore-integration.yaml @@ -647,6 +647,26 @@ replacements: "pytest-xdist", ] count: 1 + - paths: [ + packages/google-cloud-firestore/noxfile.py + ] + before: 'RUFF_VERSION = "ruff==0\.14\.14"\n\nLINT_PATHS =' + after: |- + RUFF_VERSION = "ruff==0.14.14" + # Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error + # before pytest_configure hooks run, turning pytest-asyncio's unset + # asyncio_default_fixture_loop_scope warning into an error. Remove once + # pytest 9.2+ warning and fixture scope deprecations are resolved. + PYTEST_VERSION = "pytest<9.2" + + LINT_PATHS = + count: 1 + - paths: [ + packages/google-cloud-firestore/noxfile.py + ] + before: '"pytest",' + after: 'PYTEST_VERSION,' + count: 2 - paths: [ packages/google-cloud-firestore/noxfile.py ] diff --git a/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml b/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml index c200d3069dbf..1c686e8d7269 100644 --- a/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml +++ b/.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml @@ -388,6 +388,26 @@ replacements: before: '\n "--check-untyped-defs",' after: '\n # TODO(https://github.com/googleapis/google-cloud-python/issues/16083)\n # "--check-untyped-defs",' count: 1 + - paths: [ + "packages/google-cloud-error-reporting/noxfile.py", + ] + before: 'RUFF_VERSION = "ruff==0\.14\.14"\n\nLINT_PATHS =' + after: |- + RUFF_VERSION = "ruff==0.14.14" + # Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error + # before pytest_configure hooks run, turning pytest-asyncio's unset + # asyncio_default_fixture_loop_scope warning into an error. Remove once + # pytest 9.2+ warning and fixture scope deprecations are resolved. + PYTEST_VERSION = "pytest<9.2" + + LINT_PATHS = + count: 1 + - paths: [ + "packages/google-cloud-error-reporting/noxfile.py", + ] + before: '"pytest",' + after: 'PYTEST_VERSION,' + count: 2 - paths: [ "packages/google-cloud-monitoring-dashboards/noxfile.py", ] diff --git a/.librarian/generator-input/client-post-processing/logging-integration.yaml b/.librarian/generator-input/client-post-processing/logging-integration.yaml index 9db37f582424..f1f2d15c9e9e 100644 --- a/.librarian/generator-input/client-post-processing/logging-integration.yaml +++ b/.librarian/generator-input/client-post-processing/logging-integration.yaml @@ -452,6 +452,26 @@ replacements: "types", ) count: 1 + - paths: [ + packages/google-cloud-logging/noxfile.py + ] + before: 'RUFF_VERSION = "ruff==0\.14\.14"\n\nLINT_PATHS =' + after: |- + RUFF_VERSION = "ruff==0.14.14" + # Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error + # before pytest_configure hooks run, turning pytest-asyncio's unset + # asyncio_default_fixture_loop_scope warning into an error. Remove once + # pytest 9.2+ warning and fixture scope deprecations are resolved. + PYTEST_VERSION = "pytest<9.2" + + LINT_PATHS = + count: 1 + - paths: [ + packages/google-cloud-logging/noxfile.py + ] + before: '"pytest",' + after: 'PYTEST_VERSION,' + count: 2 - paths: [ packages/google-cloud-logging/noxfile.py ] diff --git a/.librarian/generator-input/client-post-processing/pubsub-integration.yaml b/.librarian/generator-input/client-post-processing/pubsub-integration.yaml index 238f99e447df..6cdee52bb96d 100644 --- a/.librarian/generator-input/client-post-processing/pubsub-integration.yaml +++ b/.librarian/generator-input/client-post-processing/pubsub-integration.yaml @@ -501,6 +501,24 @@ replacements: """Skipping until Pub/Sub migration is complete.""" session.skip("Skipping core_deps_from_source for google-cloud-pubsub.") count: 1 + - paths: + - "packages/google-cloud-pubsub/noxfile.py" + before: 'RUFF_VERSION = "ruff==0\.14\.14"\n\nLINT_PATHS =' + after: |- + RUFF_VERSION = "ruff==0.14.14" + # Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error + # before pytest_configure hooks run, turning pytest-asyncio's unset + # asyncio_default_fixture_loop_scope warning into an error. Remove once + # pytest 9.2+ warning and fixture scope deprecations are resolved. + PYTEST_VERSION = "pytest<9.2" + + LINT_PATHS = + count: 1 + - paths: + - "packages/google-cloud-pubsub/noxfile.py" + before: '"pytest",' + after: 'PYTEST_VERSION,' + count: 2 - paths: - "packages/google-cloud-pubsub/noxfile.py" before: '"--cov=google",' diff --git a/packages/db-dtypes/noxfile.py b/packages/db-dtypes/noxfile.py index 5d0c8b4980a9..fca37e128fea 100644 --- a/packages/db-dtypes/noxfile.py +++ b/packages/db-dtypes/noxfile.py @@ -31,6 +31,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" RUFF_VERSION = "ruff==0.14.14" ISORT_VERSION = "isort==5.11.0" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "db_dtypes", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -48,7 +53,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -61,7 +66,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] @@ -262,7 +267,7 @@ def prerelease(session, tests_path): session.install( "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", # tzdata is only needed for testing: pandas 3.0+ no longer installs diff --git a/packages/google-api-core/noxfile.py b/packages/google-api-core/noxfile.py index 4ae56dc0f008..cc934e4b66ca 100644 --- a/packages/google-api-core/noxfile.py +++ b/packages/google-api-core/noxfile.py @@ -29,6 +29,11 @@ import nox RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] @@ -220,7 +225,7 @@ def default( unittest.skip("The pre-release session cannot be run without grpc") session.install( - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-mock", "pytest-xdist", diff --git a/packages/google-auth-httplib2/noxfile.py b/packages/google-auth-httplib2/noxfile.py index e0a9b93502a4..68fe2f40313c 100644 --- a/packages/google-auth-httplib2/noxfile.py +++ b/packages/google-auth-httplib2/noxfile.py @@ -29,6 +29,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" RUFF_VERSION = "ruff==0.14.14" ISORT_VERSION = "isort==5.11.0" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google_auth_httplib2.py", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -44,7 +49,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -60,7 +65,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.10"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] diff --git a/packages/google-cloud-core/noxfile.py b/packages/google-cloud-core/noxfile.py index 772c0c136b3d..2221c42d66f9 100644 --- a/packages/google-cloud-core/noxfile.py +++ b/packages/google-cloud-core/noxfile.py @@ -23,6 +23,11 @@ BLACK_VERSION = "black==23.7.0" RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning (inherited via shared CI venvs) +# into an error. Remove once pytest 9.2+ deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -136,7 +141,7 @@ def default(session): ) # Install all test dependencies, then install local packages in-place. - session.install("pytest", "pytest-cov", "-c", constraints_path) + session.install(PYTEST_VERSION, "pytest-cov", "-c", constraints_path) session.install("-e", ".[grpc]", "-c", constraints_path) # Run py.test against the unit tests. @@ -275,7 +280,7 @@ def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" # Install all test dependencies, then install local packages in-place. - session.install("pytest", "pytest-cov") + session.install(PYTEST_VERSION, "pytest-cov") session.install("-e", ".[grpc]") # Because we test minimum dependency versions on the minimum Python @@ -362,7 +367,7 @@ def core_deps_from_source(session, protobuf_implementation): """ # Install all test dependencies, then install local packages in-place. - session.install("pytest", "pytest-cov") + session.install(PYTEST_VERSION, "pytest-cov") session.install("-e", ".[grpc]") # Because we test minimum dependency versions on the minimum Python diff --git a/packages/google-cloud-dns/noxfile.py b/packages/google-cloud-dns/noxfile.py index 0c6507c42a5d..5f659a148194 100644 --- a/packages/google-cloud-dns/noxfile.py +++ b/packages/google-cloud-dns/noxfile.py @@ -31,6 +31,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" RUFF_VERSION = "ruff==0.14.14" ISORT_VERSION = "isort==5.11.0" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -46,7 +51,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -58,7 +63,7 @@ SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] diff --git a/packages/google-cloud-documentai-toolbox/noxfile.py b/packages/google-cloud-documentai-toolbox/noxfile.py index e6ac183ea803..c1d2ab53dde8 100644 --- a/packages/google-cloud-documentai-toolbox/noxfile.py +++ b/packages/google-cloud-documentai-toolbox/noxfile.py @@ -31,6 +31,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" RUFF_VERSION = "ruff==0.14.14" ISORT_VERSION = "isort==5.11.0" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -47,7 +52,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -60,7 +65,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] diff --git a/packages/google-cloud-error-reporting/noxfile.py b/packages/google-cloud-error-reporting/noxfile.py index 4c37e91d4b4e..5cc4d0f63ee5 100644 --- a/packages/google-cloud-error-reporting/noxfile.py +++ b/packages/google-cloud-error-reporting/noxfile.py @@ -23,6 +23,11 @@ import nox RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -66,7 +71,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -79,7 +84,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] diff --git a/packages/google-cloud-firestore/noxfile.py b/packages/google-cloud-firestore/noxfile.py index b83aa0a5c973..9391ad33853d 100644 --- a/packages/google-cloud-firestore/noxfile.py +++ b/packages/google-cloud-firestore/noxfile.py @@ -23,6 +23,11 @@ import nox RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -66,7 +71,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio==0.21.2", ] @@ -83,7 +88,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", - "pytest", + PYTEST_VERSION, ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ "pytest-asyncio==0.21.2", diff --git a/packages/google-cloud-logging/noxfile.py b/packages/google-cloud-logging/noxfile.py index f8468c73410f..13cc30695b6c 100644 --- a/packages/google-cloud-logging/noxfile.py +++ b/packages/google-cloud-logging/noxfile.py @@ -23,6 +23,11 @@ import nox RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -66,7 +71,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -83,7 +88,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ diff --git a/packages/google-cloud-pubsub/noxfile.py b/packages/google-cloud-pubsub/noxfile.py index 219dbea9718f..7d3dde3e27d8 100644 --- a/packages/google-cloud-pubsub/noxfile.py +++ b/packages/google-cloud-pubsub/noxfile.py @@ -23,6 +23,11 @@ import nox RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -66,7 +71,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -81,7 +86,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ALL_PYTHON SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ diff --git a/packages/google-cloud-runtimeconfig/noxfile.py b/packages/google-cloud-runtimeconfig/noxfile.py index c8ddaaa120ef..b34f7bf306b5 100644 --- a/packages/google-cloud-runtimeconfig/noxfile.py +++ b/packages/google-cloud-runtimeconfig/noxfile.py @@ -31,6 +31,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" RUFF_VERSION = "ruff==0.14.14" ISORT_VERSION = "isort==5.11.0" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning into an error. Remove once +# pytest 9.2+ warning and fixture scope deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.14" @@ -46,7 +51,7 @@ UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", "asyncmock", - "pytest", + PYTEST_VERSION, "pytest-cov", "pytest-asyncio", ] @@ -59,7 +64,7 @@ SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", - "pytest", + PYTEST_VERSION, "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [] diff --git a/packages/google-cloud-testutils/noxfile.py b/packages/google-cloud-testutils/noxfile.py index 5a5809c9d760..4b07c13bbeb2 100644 --- a/packages/google-cloud-testutils/noxfile.py +++ b/packages/google-cloud-testutils/noxfile.py @@ -16,6 +16,7 @@ from __future__ import absolute_import + import os import pathlib import re @@ -37,6 +38,11 @@ DEFAULT_PYTHON_VERSION = "3.14" BLACK_VERSION = "black==23.7.0" RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning (inherited via shared CI venvs) +# into an error. Remove once pytest 9.2+ deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" BLACK_PATHS = ["test_utils", "setup.py"] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() # Path to the centralized mypy configuration file at the repository root. @@ -154,7 +160,7 @@ def unit(session): "-e", "tests/unit/resources/good_package", "tests/unit/resources/bad_package" ) - session.install("pytest", "pytest-cov") + session.install(PYTEST_VERSION, "pytest-cov") session.install("-e", ".", "-c", constraints_path) # Run py.test against the unit tests. @@ -303,7 +309,7 @@ def prerelease_deps(session): "-e", "tests/unit/resources/good_package", "tests/unit/resources/bad_package" ) - session.install("pytest", "pytest-cov") + session.install(PYTEST_VERSION, "pytest-cov") session.install("-e", ".", "-c", constraints_path) # Because we test minimum dependency versions on the minimum Python @@ -371,7 +377,7 @@ def core_deps_from_source(session): "-e", "tests/unit/resources/good_package", "tests/unit/resources/bad_package" ) - session.install("pytest", "pytest-cov") + session.install(PYTEST_VERSION, "pytest-cov") session.install("-e", ".", "-c", constraints_path) # Because we test minimum dependency versions on the minimum Python diff --git a/packages/proto-plus/noxfile.py b/packages/proto-plus/noxfile.py index fbdee3b362e0..4b4ba40a7e10 100644 --- a/packages/proto-plus/noxfile.py +++ b/packages/proto-plus/noxfile.py @@ -23,6 +23,11 @@ BLACK_VERSION = "black[jupyter]==23.7.0" ISORT_VERSION = "isort==5.11.0" RUFF_VERSION = "ruff==0.14.14" +# Temporarily pin pytest<9.2 because pytest 9.2.0 applies filterwarnings=error +# before pytest_configure hooks run, turning pytest-asyncio's unset +# asyncio_default_fixture_loop_scope warning (inherited via shared CI venvs) +# into an error. Remove once pytest 9.2+ deprecations are resolved. +PYTEST_VERSION = "pytest<9.2" LINT_PATHS = ["docs", "proto", "tests", "noxfile.py", "setup.py"] @@ -64,7 +69,7 @@ def unit(session, implementation): ) session.env["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = implementation - session.install("coverage", "pytest", "pytest-cov", "pytz") + session.install("coverage", PYTEST_VERSION, "pytest-cov", "pytz") session.install("-e", ".[testing]", "-c", constraints_path) # TODO(https://github.com/googleapis/proto-plus-python/issues/403): re-enable `-W=error` @@ -100,7 +105,7 @@ def prerelease_deps(session, implementation): session.env["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = implementation # Install test environment dependencies - session.install("coverage", "pytest", "pytest-cov", "pytz") + session.install("coverage", PYTEST_VERSION, "pytest-cov", "pytz") # Install the package without dependencies session.install("-e", ".", "--no-deps") @@ -157,7 +162,7 @@ def core_deps_from_source(session, implementation): session.env["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = implementation # Install test environment dependencies - session.install("coverage", "pytest", "pytest-cov", "pytz") + session.install("coverage", PYTEST_VERSION, "pytest-cov", "pytz") # Install the package without dependencies session.install("-e", ".", "--no-deps")