Skip to content

Commit 92251a5

Browse files
authored
fix(deps): update minimum dependency versions to pick up bugfixes (#496)
Also, actually test those minimum versions using constraints file. Closes #494
1 parent c111a28 commit 92251a5

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

noxfile.py

+15-6
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 = ["2.7", "3.8"]
3132
UNIT_TEST_PYTHON_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]
3233

34+
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
35+
3336

3437
@nox.session(python=DEFAULT_PYTHON_VERSION)
3538
def lint(session):
@@ -65,9 +68,12 @@ def lint_setup_py(session):
6568

6669

6770
def default(session):
71+
constraints_path = str(
72+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
73+
)
6874
# Install all test dependencies, then install this package in-place.
69-
session.install("mock", "pytest", "pytest-cov")
70-
session.install("-e", ".")
75+
session.install("mock", "pytest", "pytest-cov", "-c", constraints_path)
76+
session.install("-e", ".", "-c", constraints_path)
7177

7278
# Run py.test against the unit tests.
7379
session.run(
@@ -93,6 +99,9 @@ def unit(session):
9399

94100
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
95101
def system(session):
102+
constraints_path = str(
103+
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
104+
)
96105
"""Run the system test suite."""
97106
system_test_path = os.path.join("tests", "system.py")
98107
system_test_folder_path = os.path.join("tests", "system")
@@ -121,15 +130,15 @@ def system(session):
121130
# 2021-05-06: defer installing 'google-cloud-*' to after this package,
122131
# in order to work around Python 2.7 googolapis-common-protos
123132
# issue.
124-
session.install(
125-
"mock", "pytest",
126-
)
127-
session.install("-e", ".")
133+
session.install("mock", "pytest", "-c", constraints_path)
134+
session.install("-e", ".", "-c", constraints_path)
128135
session.install(
129136
"google-cloud-testutils",
130137
"google-cloud-iam",
131138
"google-cloud-pubsub < 2.0.0",
132139
"google-cloud-kms < 2.0dev",
140+
"-c",
141+
constraints_path,
133142
)
134143

135144
# Run py.test against the system tests.

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
# 'Development Status :: 5 - Production/Stable'
2929
release_status = "Development Status :: 5 - Production/Stable"
3030
dependencies = [
31-
"google-auth >= 1.11.0, < 2.0dev",
32-
"google-cloud-core >= 1.4.1, < 2.0dev",
31+
"google-auth >= 1.24.0, < 2.0dev",
32+
"google-cloud-core >= 1.6.0, < 2.0dev",
3333
"google-resumable-media >= 1.3.0, < 2.0dev",
3434
"requests >= 2.18.0, < 3.0.0dev",
3535
"googleapis-common-protos < 1.53.0; python_version<'3.0'",

testing/constraints-2.7.txt

Whitespace-only changes.

testing/constraints-3.6.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
77
# Then this file should have foo==1.14.0
8-
google-auth==1.11.0
9-
google-cloud-core==1.4.1
10-
google-resumable-media==1.0.0
11-
requests==2.18.0
8+
google-auth==1.24.0
9+
google-cloud-core==1.6.0
10+
google-resumable-media==1.3.0
11+
requests==2.18.0

0 commit comments

Comments
 (0)