liferoad commented on code in PR #34374: URL: https://github.com/apache/beam/pull/34374#discussion_r2007659800
########## sdks/python/apache_beam/io/tfrecordio.py: ########## @@ -41,23 +41,20 @@ def _default_crc32c_fn(value): - """Calculates crc32c of a bytes object using either snappy or crcmod.""" + """Calculates crc32c of a bytes object using either google-crc32c or crcmod.""" if not _default_crc32c_fn.fn: try: - import snappy # pylint: disable=import-error - # Support multiple versions of python-snappy: - # https://github.com/andrix/python-snappy/pull/53 - if getattr(snappy, '_crc32c', None): - _default_crc32c_fn.fn = snappy._crc32c # pylint: disable=protected-access - elif getattr(snappy, '_snappy', None): - _default_crc32c_fn.fn = snappy._snappy._crc32c # pylint: disable=protected-access - except ImportError: + import google_crc32c # pylint: disable=import-error Review Comment: we cannot just remove snappy. To keep back compatible, we should keep this and add the check for google_crc32c. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org