Skip to content

Commit

Permalink
fix(deps): allow google-api-core 2.x for python 3 users (#1649)
Browse files Browse the repository at this point in the history
* fix(deps): allow google-api-core 2.x for python 3 users

Fixes #1611

* attempt to fix docs build

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
busunkim96 and parthea committed Jan 11, 2022
1 parent 09155f1 commit 3b3fb15
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
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

0 comments on commit 3b3fb15

Please sign in to comment.