From 68abdef03f67e1ea01c399b544dc7ba41d280ba4 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Mon, 11 Mar 2019 21:04:20 -0700 Subject: Fix issue #778, deprecating Python3.4 support - starting with removal of user --- CHANGELOG.md | 5 +++-- isort/settings.py | 2 +- test_isort.py | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 104d450b..c718f994 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,10 @@ Changelog ### 5.0.0 UNRELEASED **Breaking changes:** - - isort now requires Python 3.4+ to run but continues to support formatting + - isort now requires Python 3.5+ to run but continues to support formatting Python 2 code. - + - isort deprecates official support for Python 3.4, removing modules only in this release from known_standard_library: + - user Internal: - isort now utilizes mypy and typing to filter out typing related issues before deployment diff --git a/isort/settings.py b/isort/settings.py index 525c1315..34f658a7 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -122,7 +122,7 @@ default = {'force_to_top': [], 'test', 'textwrap', 'this', 'thread', 'threading', 'time', 'timeit', 'tkinter', 'token', 'tokenize', 'trace', 'traceback', 'tracemalloc', 'ttk', 'tty', 'turtle', 'turtledemo', 'types', 'typing', 'unicodedata', 'unittest', 'urllib', 'urllib2', - 'urlparse', 'user', 'usercustomize', 'uu', 'uuid', 'venv', 'videoreader', + 'urlparse', 'usercustomize', 'uu', 'uuid', 'venv', 'videoreader', 'warnings', 'wave', 'weakref', 'webbrowser', 'whichdb', 'winreg', 'winsound', 'wsgiref', 'xdrlib', 'xml', 'xmlrpc', 'xmlrpclib', 'zipapp', 'zipfile', 'zipimport', 'zlib'], diff --git a/test_isort.py b/test_isort.py index e6fe576e..91cb6f10 100644 --- a/test_isort.py +++ b/test_isort.py @@ -2923,3 +2923,10 @@ def test_to_ensure_correctly_handling_of_whitespace_only_issue_811(capsys): out, err = capsys.readouterr() assert out == '' assert err == '' + + +def test_standard_library_deprecates_user_issue_778(): + test_input = ('import os\n' + '\n' + 'import user\n') + assert SortImports(file_contents=test_input).output == test_input -- cgit v1.2.1