-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
- The PR <fix: handle query_params tuples in JSONConnection.build_api_url #34> requires
six>=1.13.0and is in releases 1.4.2 & newer. - Any service using an older release of
sixwill encounter thisImportError:
Traceback (most recent call last):
. . .
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/main.py", line 16, in <module>
from google.cloud import ndb
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/ndb/__init__.py", line 28, in <module>
from google.cloud.ndb.client import Client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/ndb/client.py", line 26, in <module>
from google.cloud.datastore_v1.gapic import datastore_client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore_v1/__init__.py", line 18, in <module>
from google.cloud.datastore_v1.gapic import datastore_client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore_v1/gapic/datastore_client.py", line 39, in <module>
from google.cloud.datastore.version import __version__
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/__init__.py", line 60, in <module>
from google.cloud.datastore.client import Client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/client.py", line 26, in <module>
from google.cloud.datastore._http import HTTPDatastoreAPI
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/_http.py", line 19, in <module>
from google.cloud import _http as connection_module
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/_http.py", line 22, in <module>
from six.moves import collections_abc
ImportError: cannot import name collections_abc
- This affects all Python 2 App Engine users as
six==1.12.0is built-in - The current workaround is to reference the immediately preceding version by adding
google-cloud-core==1.4.1in any affected application'srequirements.txtfile until either App Engine revssixto a newer release (>=1.13.0), or Line 22 of google/cloud/_http.py is patched, perhaps with something like this:
# catch six<1.13.0
try:
from six.moves import collections_abc
except ImportError:
# catch python<3.3.0
try:
import collections.abc as collections_abc # only works on 3.3+
except ImportError:
import collections as collections_abc
Metadata
Metadata
Assignees
Labels
No labels