Skip to content

Commit ce4ceb6

Browse files
authored
fix(deps): require google-api-core >= 1.26.0 (#344)
Also, pin google-auth to lower version in constraints.
1 parent b4e07f8 commit ce4ceb6

File tree

7 files changed

+31
-11
lines changed

7 files changed

+31
-11
lines changed

noxfile.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
from __future__ import absolute_import
2020
import os
21+
import pathlib
2122
import shutil
2223

2324
import nox
@@ -30,6 +31,8 @@
3031
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
3132
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
3233

34+
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
35+
3336
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
3437
nox.options.sessions = [
3538
"unit",
@@ -78,13 +81,14 @@ def lint_setup_py(session):
7881

7982
def default(session):
8083
# Install all test dependencies, then install this package in-place.
81-
session.install("asyncmock", "pytest-asyncio")
82-
83-
session.install(
84-
"mock", "pytest", "pytest-cov",
84+
constraints_path = str(
85+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
8586
)
87+
session.install("asyncmock", "pytest-asyncio", "-c", constraints_path)
8688

87-
session.install("-e", ".")
89+
session.install("mock", "pytest", "pytest-cov", "-c", constraints_path)
90+
91+
session.install("-e", ".", "-c", constraints_path)
8892

8993
# Run py.test against the unit tests.
9094
session.run(
@@ -136,6 +140,10 @@ def system_emulated(session):
136140
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
137141
def system(session):
138142
"""Run the system test suite."""
143+
constraints_path = str(
144+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
145+
)
146+
139147
system_test_path = os.path.join("tests", "system.py")
140148
system_test_folder_path = os.path.join("tests", "system")
141149

@@ -147,7 +155,7 @@ def system(session):
147155
session.skip("Credentials must be set via environment variable")
148156
# Install pyopenssl for mTLS testing.
149157
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
150-
session.install("pyopenssl")
158+
session.install("pyopenssl", "-c", constraints_path)
151159

152160
system_test_exists = os.path.exists(system_test_path)
153161
system_test_folder_exists = os.path.exists(system_test_folder_path)
@@ -160,10 +168,8 @@ def system(session):
160168

161169
# Install all test dependencies, then install this package into the
162170
# virtualenv's dist-packages.
163-
session.install(
164-
"mock", "pytest", "google-cloud-testutils",
165-
)
166-
session.install("-e", ".")
171+
session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path)
172+
session.install("-e", ".", "-c", constraints_path)
167173

168174
# Run py.test against the system tests.
169175
if system_test_exists:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# 'Development Status :: 5 - Production/Stable'
3030
release_status = "Development Status :: 5 - Production/Stable"
3131
dependencies = [
32-
"google-api-core[grpc] >= 1.22.2, < 2.0.0dev",
32+
"google-api-core[grpc] >= 1.26.0, < 2.0.0dev",
3333
"google-cloud-core >= 1.4.1, < 2.0dev",
3434
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev",
3535
"proto-plus >= 1.13.0",

testing/constraints-3.10.txt

Whitespace-only changes.

testing/constraints-3.6.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
google-api-core==1.26.0
9+
google-cloud-core==1.4.1
10+
grpc-google-iam-v1==0.12.3
11+
proto-plus==1.13.0
12+
libcst==0.2.5
13+
packaging==14.3
14+
google-auth==1.24.0 # TODO: remove when google-auth >= 1.25.0 is required transitively through google-api-core

testing/constraints-3.7.txt

Whitespace-only changes.

testing/constraints-3.8.txt

Whitespace-only changes.

testing/constraints-3.9.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)