From 4bff5962e0fa50891ac1b4c7e2935e9f77a81818 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 25 Jun 2021 19:51:49 +0000 Subject: [PATCH 1/3] fix(deps): require google-api-core >= .26.0 --- noxfile.py | 22 ++++++++++++++++------ testing/constraints-3.10.txt | 0 testing/constraints-3.6.txt | 13 +++++++++++++ testing/constraints-3.7.txt | 0 testing/constraints-3.8.txt | 0 testing/constraints-3.9.txt | 0 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 testing/constraints-3.10.txt create mode 100644 testing/constraints-3.6.txt create mode 100644 testing/constraints-3.7.txt create mode 100644 testing/constraints-3.8.txt create mode 100644 testing/constraints-3.9.txt diff --git a/noxfile.py b/noxfile.py index e74321f49..6caa06eab 100644 --- a/noxfile.py +++ b/noxfile.py @@ -18,6 +18,7 @@ from __future__ import absolute_import import os +import pathlib import shutil import nox @@ -30,6 +31,8 @@ SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() + # 'docfx' is excluded since it only needs to run in 'docs-presubmit' nox.options.sessions = [ "unit", @@ -78,13 +81,16 @@ def lint_setup_py(session): def default(session): # Install all test dependencies, then install this package in-place. - session.install("asyncmock", "pytest-asyncio") + constraints_path = str( + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" + ) + session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) session.install( - "mock", "pytest", "pytest-cov", + "mock", "pytest", "pytest-cov", "-c", constraints_path ) - session.install("-e", ".") + session.install("-e", ".", "-c", constraints_path) # Run py.test against the unit tests. session.run( @@ -136,6 +142,10 @@ def system_emulated(session): @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" + constraints_path = str( + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" + ) + system_test_path = os.path.join("tests", "system.py") system_test_folder_path = os.path.join("tests", "system") @@ -147,7 +157,7 @@ def system(session): session.skip("Credentials must be set via environment variable") # Install pyopenssl for mTLS testing. if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true": - session.install("pyopenssl") + session.install("pyopenssl", "-c", constraints_path) system_test_exists = os.path.exists(system_test_path) system_test_folder_exists = os.path.exists(system_test_folder_path) @@ -161,9 +171,9 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install( - "mock", "pytest", "google-cloud-testutils", + "mock", "pytest", "google-cloud-testutils", "-c", constraints_path ) - session.install("-e", ".") + session.install("-e", ".", "-c", constraints_path) # Run py.test against the system tests. if system_test_exists: diff --git a/testing/constraints-3.10.txt b/testing/constraints-3.10.txt new file mode 100644 index 000000000..e69de29bb diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt new file mode 100644 index 000000000..0060cd2d8 --- /dev/null +++ b/testing/constraints-3.6.txt @@ -0,0 +1,13 @@ +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List *all* library dependencies and extras in this file. +# Pin the version to the lower bound. +# +# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev", +# Then this file should have foo==1.14.0 +google-api-core==1.26.0 +google-cloud-core==1.4.1 +grpc-google-iam-v1==0.12.3 +proto-plus==1.13.0 +libcst==0.2.5 +packaging==14.3 diff --git a/testing/constraints-3.7.txt b/testing/constraints-3.7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/testing/constraints-3.8.txt b/testing/constraints-3.8.txt new file mode 100644 index 000000000..e69de29bb diff --git a/testing/constraints-3.9.txt b/testing/constraints-3.9.txt new file mode 100644 index 000000000..e69de29bb From b0e919c0744279debea17550206f26c82167360e Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 25 Jun 2021 19:56:37 +0000 Subject: [PATCH 2/3] chore: pin google-auth to lower verison in constraints --- setup.py | 2 +- testing/constraints-3.6.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 21a0126f3..2a4362deb 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ # 'Development Status :: 5 - Production/Stable' release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.22.2, < 2.0.0dev", + "google-api-core[grpc] >= 1.26.0, < 2.0.0dev", "google-cloud-core >= 1.4.1, < 2.0dev", "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", "proto-plus >= 1.13.0", diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 0060cd2d8..25d8d3eef 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -11,3 +11,4 @@ grpc-google-iam-v1==0.12.3 proto-plus==1.13.0 libcst==0.2.5 packaging==14.3 +google-auth==1.24.0 # TODO: remove when google-auth >= 1.25.0 is required transitively through google-api-core From 0aeb96723b74ebaca57d02b4c05cf191729251d3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 25 Jun 2021 19:59:47 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md --- noxfile.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index 6caa06eab..804225c8c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -86,9 +86,7 @@ def default(session): ) session.install("asyncmock", "pytest-asyncio", "-c", constraints_path) - session.install( - "mock", "pytest", "pytest-cov", "-c", constraints_path - ) + session.install("mock", "pytest", "pytest-cov", "-c", constraints_path) session.install("-e", ".", "-c", constraints_path) @@ -170,9 +168,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install( - "mock", "pytest", "google-cloud-testutils", "-c", constraints_path - ) + session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path) session.install("-e", ".", "-c", constraints_path) # Run py.test against the system tests.