From a44d0cdacacdc5a841a8f2f93cb2871609d78c17 Mon Sep 17 00:00:00 2001 From: Timothy Edmund Crosley Date: Tue, 14 May 2019 17:21:35 -0700 Subject: Issue/948 (#949) * Implement fix for stream processing on Python 2.7 * Bump version for immediate distribution * Add change-set and release date to changelog --- CHANGELOG.md | 3 +++ appveyor.yml | 1 + isort/__init__.py | 2 +- isort/isort.py | 2 +- setup.py | 2 +- tox.ini | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d97c9da..aff495db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Changelog ========= +### 4.3.20 - May 14, 2019 - hot fix release +- Fixed issue #948 - Pipe redirection broken on Python2.7 + ### 4.3.19 - May 12, 2019 - hot fix release - Fixed issue #942 - correctly handle pyi (Python Template Files) to match `black` output diff --git a/appveyor.yml b/appveyor.yml index 11c69a45..cbd19866 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,7 @@ init: build: off install: + - python -m pip install --upgrade pip - pip install tox test_script: diff --git a/isort/__init__.py b/isort/__init__.py index 581a6ddb..8d4a047b 100644 --- a/isort/__init__.py +++ b/isort/__init__.py @@ -25,4 +25,4 @@ from __future__ import absolute_import, division, print_function, unicode_litera from . import settings # noqa: F401 from .isort import SortImports # noqa: F401 -__version__ = "4.3.19" +__version__ = "4.3.20" diff --git a/isort/isort.py b/isort/isort.py index 3ab68c2d..08d18af5 100644 --- a/isort/isort.py +++ b/isort/isort.py @@ -140,7 +140,7 @@ class SortImports(object): file_.seek(0) self.file_encoding = coding_check(file_) file_.seek(0) - except io.UnsupportedOperation: + except (io.UnsupportedOperation, IOError): pass reader = codecs.getreader(self.file_encoding) file_contents = reader(file_).read() diff --git a/setup.py b/setup.py index 72a165e2..9fb541c7 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ with open('README.rst') as f: readme = f.read() setup(name='isort', - version='4.3.19', + version='4.3.20', description='A Python utility / library to sort Python imports.', long_description=readme, author='Timothy Crosley', diff --git a/tox.ini b/tox.ini index d02b0307..16c8f5b8 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ envlist = [testenv] deps = pytest + pip==19.1.1 extras = pipfile pyproject -- cgit v1.2.1