Skip to content

Commit

Permalink
fix(bigquery): import Mapping from collections.abc not from collectio…
Browse files Browse the repository at this point in the history
…ns (#9826)

* fix(bigquery): import Mapping from collections.abc not from collections

* fix(bigquery): importing module not class

* Use collections_abc import from six.
  • Loading branch information
alextford11 authored and tswast committed Nov 21, 2019
1 parent 20824fa commit 0588f19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bigquery/google/cloud/bigquery/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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

import collections
from six.moves import collections_abc

from google.cloud.bigquery_v2 import types

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

0 comments on commit 0588f19

Please sign in to comment.