Skip to content

Commit

Permalink
fix(deps): require six>=1.4.0 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 committed Jun 18, 2021
1 parent 031889f commit a840691
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 4 deletions.
21 changes: 18 additions & 3 deletions noxfile.py
Expand Up @@ -14,10 +14,13 @@

from __future__ import absolute_import
import os
import pathlib
import shutil

import nox

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

SYSTEM_TEST_ENV_VARS = ("GOOGLE_APPLICATION_CREDENTIALS",)
BLACK_VERSION = "black==20.8b1"
GOOGLE_AUTH = "google-auth >= 1.22.0, < 2.0dev"
Expand All @@ -32,9 +35,13 @@
def unit(session):
"""Run the unit test suite."""

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", "pytest-asyncio<=0.14.0", GOOGLE_AUTH)
session.install("-e", ".[requests,aiohttp]")
session.install("-e", ".[requests,aiohttp]", "-c", constraints_path)

# Run py.test against the unit tests.
# NOTE: We don't require 100% line coverage for unit test runs since
Expand All @@ -60,9 +67,13 @@ def unit(session):
def unit_2(session):
"""Run the unit test suite."""

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", ".[requests]")
session.install("-e", ".[requests]", "-c", constraints_path)

# Run py.test against the unit tests.
# NOTE: We don't require 100% line coverage for unit test runs since
Expand Down Expand Up @@ -210,6 +221,10 @@ def blacken(session):
def system(session):
"""Run the system test suite."""

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)

# Environment check: environment variables are set.
missing = []
for env_var in SYSTEM_TEST_ENV_VARS:
Expand All @@ -225,7 +240,7 @@ def system(session):
# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install("mock", "pytest", GOOGLE_AUTH, "google-cloud-testutils")
session.install("-e", ".[requests,aiohttp]")
session.install("-e", ".[requests,aiohttp]", "-c", constraints_path)

# Run py.test against the async system tests.
if session.python.startswith("3"):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -24,7 +24,7 @@


REQUIREMENTS = [
'six',
'six>=1.4.0',
'google-crc32c >= 1.0, < 2.0dev; python_version>="3.5"',
'crcmod >= 1.7; python_version=="2.7"',

Expand Down
Empty file added testing/constraints-2.7.txt
Empty file.
Empty file added testing/constraints-3.10.txt
Empty file.
Empty file added testing/constraints-3.11.txt
Empty file.
12 changes: 12 additions & 0 deletions testing/constraints-3.6.txt
@@ -0,0 +1,12 @@
# 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
six==1.4.0
crcmod==1.7
google-crc32c==1.0
aiohttp==3.6.2
requests==2.18.0
Empty file added testing/constraints-3.7.txt
Empty file.
Empty file added testing/constraints-3.8.txt
Empty file.
Empty file added testing/constraints-3.9.txt
Empty file.

0 comments on commit a840691

Please sign in to comment.