Skip to content

deps: require six>=1.12.0 and google-api-core>=1.21.0 #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
deps: require six>=1.12.0 and google-api-core>=1.21.0
* `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
commit 42aa73d28eb331ecfdc74a44468e675dcdb557de
5 changes: 4 additions & 1 deletion google/cloud/_http.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.