Skip to content

Commit

Permalink
deps: require six>=1.12.0 and google-api-core>=1.21.0 (#46)
Browse files Browse the repository at this point in the history
* `six>=1.12.0` is to support legacy App Engine standard runtimes
* `google-api-core>=1.21.0` is needed for `DuplicateCredentialArgs`
  exception
  • Loading branch information
tswast committed Nov 18, 2020
1 parent 61a42cb commit a97b9ca
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 4 deletions.
5 changes: 4 additions & 1 deletion google/cloud/_http.py
Expand Up @@ -15,11 +15,14 @@
"""Shared implementation of connections to API servers."""

import collections
try:
import collections.abc as collections_abc
except ImportError:
import collections as collections_abc
import json
import platform
import warnings

from six.moves import collections_abc
from six.moves.urllib.parse import urlencode

from google.api_core.client_info import ClientInfo
Expand Down
17 changes: 15 additions & 2 deletions noxfile.py
Expand Up @@ -20,6 +20,7 @@


DEFAULT_PYTHON_VERSION = "3.7"
CURRENT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))


def default(session):
Expand All @@ -29,10 +30,22 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
constraints_path = os.path.join(
CURRENT_DIRECTORY,
"testing",
"constraints-{}.txt".format(session.python)
)

# Install all test dependencies, then install local packages in-place.
session.install("mock", "pytest", "pytest-cov", "grpcio >= 1.0.2")
session.install("-e", ".")
session.install(
"mock",
"pytest",
"pytest-cov",
"grpcio >= 1.0.2",
"-c",
constraints_path
)
session.install("-e", ".", "-c", constraints_path)

# Run py.test against the unit tests.
session.run(
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -27,7 +27,12 @@
# 'Development Status :: 4 - Beta'
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 5 - Production/Stable"
dependencies = ["google-api-core >= 1.19.0, < 2.0.0dev"]
dependencies = [
"google-api-core >= 1.21.0, < 2.0.0dev",
# Support six==1.12.0 due to App Engine standard runtime.
# https://github.com/googleapis/python-cloud-core/issues/45
"six >=1.12.0",
]
extras = {"grpc": "grpcio >= 1.8.2, < 2.0dev"}


Expand Down
2 changes: 2 additions & 0 deletions testing/constraints-2.7.txt
@@ -0,0 +1,2 @@
google-api-core==1.21.0
six==1.12.0
2 changes: 2 additions & 0 deletions testing/constraints-3.5.txt
@@ -0,0 +1,2 @@
google-api-core==1.21.0
six==1.12.0
Empty file added testing/constraints-3.6.txt
Empty file.
Empty file added testing/constraints-3.7.txt
Empty file.
Empty file added testing/constraints-3.8.txt
Empty file.

0 comments on commit a97b9ca

Please sign in to comment.