Skip to content

Commit 0588f19

Browse files
alextford11tswast
authored andcommitted
fix(bigquery): import Mapping from collections.abc not from collections (googleapis#9826)
* fix(bigquery): import Mapping from collections.abc not from collections * fix(bigquery): importing module not class * Use collections_abc import from six.
1 parent 20824fa commit 0588f19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bigquery/google/cloud/bigquery/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
"""Schemas for BigQuery tables / queries."""
1616

17-
import collections
17+
from six.moves import collections_abc
1818

1919
from google.cloud.bigquery_v2 import types
2020

@@ -281,7 +281,7 @@ def _to_schema_fields(schema):
281281
instance or a compatible mapping representation of the field.
282282
"""
283283
for field in schema:
284-
if not isinstance(field, (SchemaField, collections.Mapping)):
284+
if not isinstance(field, (SchemaField, collections_abc.Mapping)):
285285
raise ValueError(
286286
"Schema items must either be fields or compatible "
287287
"mapping representations."

0 commit comments

Comments
 (0)