You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/29 18:41:10 UTC

[airflow] branch master updated: Revert "Fix reading from zip package to default to text (#13962)" (#13977)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 047397c  Revert "Fix reading from zip package to default to text (#13962)" (#13977)
047397c is described below

commit 047397c2327cb534c105e9984952f133da293109
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Fri Jan 29 18:40:57 2021 +0000

    Revert "Fix reading from zip package to default to text (#13962)" (#13977)
    
    This reverts commit cc70227d9be25be5ce95c0dae4383c3883819d68.
---
 airflow/utils/file.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/airflow/utils/file.py b/airflow/utils/file.py
index 8c48aad..553c506 100644
--- a/airflow/utils/file.py
+++ b/airflow/utils/file.py
@@ -15,7 +15,6 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-import io
 import logging
 import os
 import re
@@ -85,7 +84,7 @@ def open_maybe_zipped(fileloc, mode='r'):
     """
     _, archive, filename = ZIP_REGEX.search(fileloc).groups()
     if archive and zipfile.is_zipfile(archive):
-        return io.TextIOWrapper(zipfile.ZipFile(archive, mode=mode).open(filename))
+        return zipfile.ZipFile(archive, mode=mode).open(filename)
     else:
         return open(fileloc, mode=mode)