Skip to content

Commit

Permalink
fix(deps): update minimum dependency versions to pick up bugfixes (#496)
Browse files Browse the repository at this point in the history
Also, actually test those minimum versions using constraints file.

Closes #494
  • Loading branch information
tseaver committed Jul 8, 2021
1 parent c111a28 commit 92251a5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
21 changes: 15 additions & 6 deletions noxfile.py
Expand Up @@ -18,6 +18,7 @@

from __future__ import absolute_import
import os
import pathlib
import shutil

import nox
Expand All @@ -30,6 +31,8 @@
SYSTEM_TEST_PYTHON_VERSIONS = ["2.7", "3.8"]
UNIT_TEST_PYTHON_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"]

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()


@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint(session):
Expand Down Expand Up @@ -65,9 +68,12 @@ def lint_setup_py(session):


def default(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
# Install all test dependencies, then install this package in-place.
session.install("mock", "pytest", "pytest-cov")
session.install("-e", ".")
session.install("mock", "pytest", "pytest-cov", "-c", constraints_path)
session.install("-e", ".", "-c", constraints_path)

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

@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
def system(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
"""Run the system test suite."""
system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")
Expand Down Expand Up @@ -121,15 +130,15 @@ def system(session):
# 2021-05-06: defer installing 'google-cloud-*' to after this package,
# in order to work around Python 2.7 googolapis-common-protos
# issue.
session.install(
"mock", "pytest",
)
session.install("-e", ".")
session.install("mock", "pytest", "-c", constraints_path)
session.install("-e", ".", "-c", constraints_path)
session.install(
"google-cloud-testutils",
"google-cloud-iam",
"google-cloud-pubsub < 2.0.0",
"google-cloud-kms < 2.0dev",
"-c",
constraints_path,
)

# Run py.test against the system tests.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -28,8 +28,8 @@
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"google-auth >= 1.11.0, < 2.0dev",
"google-cloud-core >= 1.4.1, < 2.0dev",
"google-auth >= 1.24.0, < 2.0dev",
"google-cloud-core >= 1.6.0, < 2.0dev",
"google-resumable-media >= 1.3.0, < 2.0dev",
"requests >= 2.18.0, < 3.0.0dev",
"googleapis-common-protos < 1.53.0; python_version<'3.0'",
Expand Down
Empty file added testing/constraints-2.7.txt
Empty file.
8 changes: 4 additions & 4 deletions testing/constraints-3.6.txt
Expand Up @@ -5,7 +5,7 @@
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
google-auth==1.11.0
google-cloud-core==1.4.1
google-resumable-media==1.0.0
requests==2.18.0
google-auth==1.24.0
google-cloud-core==1.6.0
google-resumable-media==1.3.0
requests==2.18.0

0 comments on commit 92251a5

Please sign in to comment.