Skip to content
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

fix(deps): allow google-api-core 2.x for python 3 users #1649

Merged
merged 2 commits into from Jan 11, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 17 additions & 5 deletions describe.py
Expand Up @@ -402,13 +402,25 @@ def document_api(name, version, uri):
FLAGS.discovery_uri_template, {"api": name, "apiVersion": version}
)
)
discovery = json.loads(content)

version = safe_version(version)
if response.status == 200:
discovery = json.loads(content)

document_collection_recursive(
service, "{}_{}.".format(name, version), discovery, discovery
)
version = safe_version(version)

document_collection_recursive(
service, "{}_{}.".format(name, version), discovery, discovery
)
elif resp.status == 404:
print(
"Warning: {} {} not found. HTTP Code: {}".format(name, version, resp.status)
)
else:
print(
"Warning: {} {} could not be built. HTTP Code: {}".format(
name, version, resp.status
)
)


def document_api_from_discovery_document(uri):
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Expand Up @@ -36,9 +36,11 @@

install_requires = [
"httplib2>=0.15.0,<1dev",
"google-auth>=1.16.0",
"google-auth>=1.16.0, <2dev; python_version<'3'",
"google-auth>=1.16.0, <3dev; python_version>='3'",
"google-auth-httplib2>=0.0.3",
"google-api-core>=1.21.0,<2dev",
"google-api-core>=1.21.0, <2dev; python_version<'3'",
"google-api-core>=1.21.0, <3dev; python_version>='3'",
# rsa version 4.5 is the last version that is compatible with Python 2.7
"rsa==4.5;python_version<'3'",
"six>=1.13.0,<2dev",
Expand Down