This repository was archived by the owner on Nov 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
google/cloud/bigquery_storage_v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515from __future__ import absolute_import
1616
1717import collections
18+ import io
1819import json
1920
2021try :
3132 import pyarrow
3233except ImportError : # pragma: NO COVER
3334 pyarrow = None
34- import six
3535
3636try :
3737 import pyarrow
@@ -400,7 +400,7 @@ def _dtypes_from_avro(self, avro_fields):
400400 if isinstance (field_info ["type" ], list ):
401401 type_info = next (item for item in field_info ["type" ] if item != "null" )
402402
403- if isinstance (type_info , six . string_types ):
403+ if isinstance (type_info , str ):
404404 field_dtype = type_map .get (type_info , "object" )
405405 else :
406406 logical_type = type_info .get ("logicalType" )
@@ -461,7 +461,7 @@ def next(self):
461461 self ._parse_rows ()
462462 if self ._remaining > 0 :
463463 self ._remaining -= 1
464- return six . next (self ._iter_rows )
464+ return next (self ._iter_rows )
465465
466466 # Alias needed for Python 2/3 support.
467467 __next__ = next
@@ -652,7 +652,7 @@ def to_rows(self, message):
652652 A sequence of rows, represented as dictionaries.
653653 """
654654 self ._parse_fastavro ()
655- messageio = six .BytesIO (message .avro_rows .serialized_binary_rows )
655+ messageio = io .BytesIO (message .avro_rows .serialized_binary_rows )
656656 while True :
657657 # Loop in a while loop because schemaless_reader can only read
658658 # a single record.
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616
1717import itertools
18+ import io
1819import json
1920from unittest import mock
2021
2122import fastavro
2223import pandas
2324import pandas .testing
2425import pytest
25- import six
2626
2727import google .api_core .exceptions
2828from google .cloud .bigquery_storage import types
@@ -68,7 +68,7 @@ def _bq_to_avro_blocks(bq_blocks, avro_schema_json):
6868 avro_blocks = []
6969 first_message = True
7070 for block in bq_blocks :
71- blockio = six .BytesIO ()
71+ blockio = io .BytesIO ()
7272 for row in block :
7373 fastavro .schemaless_writer (blockio , avro_schema , row )
7474 response = types .ReadRowsResponse ()
You can’t perform that action at this time.
0 commit comments