Skip to content
Permalink
Browse files
fix(deps): update minimum dependency versions to pick up bugfixes (#496)
Also, actually test those minimum versions using constraints file.

Closes #494
  • Loading branch information
tseaver committed Jul 8, 2021
1 parent c111a28 commit 92251a5c8ea4d663773506eb1c630201a657aa69
Showing with 21 additions and 12 deletions.
  1. +15 −6 noxfile.py
  2. +2 −2 setup.py
  3. 0 testing/constraints-2.7.txt
  4. +4 −4 testing/constraints-3.6.txt
@@ -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 = ["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):
@@ -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(
@@ -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")
@@ -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.
@@ -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'",
Empty file.
@@ -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.