Repository: incubator-beam Updated Branches: refs/heads/python-sdk 9565b2c27 -> 0fa9c4be6
Using strings instead of integers for identifying CompressionTypes. Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/8403ec1c Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/8403ec1c Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/8403ec1c Branch: refs/heads/python-sdk Commit: 8403ec1c446cc825eb81a46588a1222fcd42f523 Parents: 04d84c9 Author: Gus Katsiapis <katsia...@katsiapis-linux.mtv.corp.google.com> Authored: Thu Sep 22 13:15:51 2016 -0700 Committer: Robert Bradshaw <rober...@google.com> Committed: Thu Sep 22 16:18:28 2016 -0700 ---------------------------------------------------------------------- sdks/python/apache_beam/io/fileio.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/8403ec1c/sdks/python/apache_beam/io/fileio.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/io/fileio.py b/sdks/python/apache_beam/io/fileio.py index 6c254c7..54ca891 100644 --- a/sdks/python/apache_beam/io/fileio.py +++ b/sdks/python/apache_beam/io/fileio.py @@ -67,20 +67,20 @@ class CompressionTypes(object): # .gz (implies GZIP as described below) # .z (implies ZLIB as described below). # Any non-recognized extension implies UNCOMPRESSED as described below. - AUTO = _CompressionType(1) + AUTO = _CompressionType('auto') # GZIP compression (deflate with GZIP headers). - GZIP = _CompressionType(2) + GZIP = _CompressionType('gzip') # ZLIB compression (deflate with ZLIB headers). - ZLIB = _CompressionType(3) + ZLIB = _CompressionType('zlib') # Uncompressed (i.e., may be split). - UNCOMPRESSED = _CompressionType(4) + UNCOMPRESSED = _CompressionType('uncompressed') # TODO: Remove this backwards-compatibility soon. - NO_COMPRESSION = _CompressionType(4) # Deprecated. Use UNCOMPRESSED instead. - assert NO_COMPRESSION == UNCOMPRESSED + # Deprecated. Use UNCOMPRESSED instead. + NO_COMPRESSION = UNCOMPRESSED @classmethod def is_valid_compression_type(cls, compression_type):