From 7250190ab65c6fbc002c16853fe32c32962b8a276375b717ce54b4cbef843065 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 21 Sep 2020 11:49:51 +0000 Subject: [PATCH 1/5] - Update to 5.5.3 * Fixed #1488: in rare cases isort can mangle yield from or raise from statements. - Version 5.5.2 * Fixed #1469: --diff option is ignored when input is from stdin. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=63 --- isort-5.5.1-gh.tar.gz | 3 --- isort-5.5.1.tar.gz | 3 --- isort-5.5.3-gh.tar.gz | 3 +++ isort-5.5.3.tar.gz | 3 +++ python-isort.changes | 9 +++++++++ python-isort.spec | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 isort-5.5.1-gh.tar.gz delete mode 100644 isort-5.5.1.tar.gz create mode 100644 isort-5.5.3-gh.tar.gz create mode 100644 isort-5.5.3.tar.gz diff --git a/isort-5.5.1-gh.tar.gz b/isort-5.5.1-gh.tar.gz deleted file mode 100644 index bd0a05f..0000000 --- a/isort-5.5.1-gh.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67242f7433db149413e9175eb88ada911ad8d131c0a42c75d2900ea90228f8fd -size 616959 diff --git a/isort-5.5.1.tar.gz b/isort-5.5.1.tar.gz deleted file mode 100644 index 5ff24b4..0000000 --- a/isort-5.5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:92533892058de0306e51c88f22ece002a209dc8e80288aa3cec6d443060d584f -size 144834 diff --git a/isort-5.5.3-gh.tar.gz b/isort-5.5.3-gh.tar.gz new file mode 100644 index 0000000..ae97103 --- /dev/null +++ b/isort-5.5.3-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5fffa3af6c1fb6c885aa14798099c1188d978b4d87114a5088b1770604dfff9 +size 617626 diff --git a/isort-5.5.3.tar.gz b/isort-5.5.3.tar.gz new file mode 100644 index 0000000..a8b0084 --- /dev/null +++ b/isort-5.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6187a9f1ce8784cbc6d1b88790a43e6083a6302f03e9ae482acc0f232a98c843 +size 145442 diff --git a/python-isort.changes b/python-isort.changes index b749b3b..594a32e 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 21 11:48:02 UTC 2020 - Benjamin Greiner + +- Update to 5.5.3 + * Fixed #1488: in rare cases isort can mangle yield from or raise + from statements. +- Version 5.5.2 + * Fixed #1469: --diff option is ignored when input is from stdin. + ------------------------------------------------------------------- Tue Sep 8 14:08:11 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index f1f4051..92977a0 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -27,7 +27,7 @@ %endif %define skip_python2 1 Name: python-isort%{psuffix} -Version: 5.5.1 +Version: 5.5.3 Release: 0 Summary: A Python utility / library to sort Python imports License: MIT From e812f0e4f5b69c0266b3e1de91fc739ea470023bb5d7e54d9b60b3b17c4ea5dc Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 8 Oct 2020 16:56:36 +0000 Subject: [PATCH 2/5] - Update to 5.6.1 * Fixed #1546: Unstable (non-idempotent) behavior with certain src trees. - Changelog for 5.6.0 * Implemented #1433: Provide helpful feedback in case a custom config file is specified without a configuration. * Implemented #1494: Default to sorting imports within .pxd files. * Implemented #1502: Improved float-to-top behavior when there is an existing import section present at top-of-file. * Implemented #1511: Support for easily seeing all files isort will be ran against using isort . --show-files. * Implemented #1487: Improved handling of encoding errors. * Improved handling of unsupported configuration option errors (see #1475). * Fixed #1463: Better interactive documentation for future option. * Fixed #1461: Quiet config option not respected by file API in some circumstances. * Fixed #1482: pylama integration is not working correctly out- of-the-box. * Fixed #1492: --check does not work with stdin source. * Fixed #1499: isort gets confused by single line, multi-line style comments when using float-to-top. * Fixed #1525: Some warnings can't be disabled with --quiet. * Fixed #1523: in rare cases isort can ignore direct from import if as import is also on same line. + Potentially breaking changes: * Implemented #1540: Officially support Python 3.9 stdlib imports by default. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=64 --- isort-5.5.3-gh.tar.gz | 3 -- isort-5.5.3.tar.gz | 3 -- isort-5.6.1-gh.tar.gz | 3 ++ python-isort.changes | 56 +++++++++++++++++++++++++++++++++ python-isort.spec | 73 ++++++++++++++++++------------------------- 5 files changed, 90 insertions(+), 48 deletions(-) delete mode 100644 isort-5.5.3-gh.tar.gz delete mode 100644 isort-5.5.3.tar.gz create mode 100644 isort-5.6.1-gh.tar.gz diff --git a/isort-5.5.3-gh.tar.gz b/isort-5.5.3-gh.tar.gz deleted file mode 100644 index ae97103..0000000 --- a/isort-5.5.3-gh.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5fffa3af6c1fb6c885aa14798099c1188d978b4d87114a5088b1770604dfff9 -size 617626 diff --git a/isort-5.5.3.tar.gz b/isort-5.5.3.tar.gz deleted file mode 100644 index a8b0084..0000000 --- a/isort-5.5.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6187a9f1ce8784cbc6d1b88790a43e6083a6302f03e9ae482acc0f232a98c843 -size 145442 diff --git a/isort-5.6.1-gh.tar.gz b/isort-5.6.1-gh.tar.gz new file mode 100644 index 0000000..c45dda3 --- /dev/null +++ b/isort-5.6.1-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f525efc733f5358e5fb5ffb2d36d3c9b848499f7698cfb410a2a41abf7a7c60 +size 635856 diff --git a/python-isort.changes b/python-isort.changes index 594a32e..07a96c7 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,59 @@ +------------------------------------------------------------------- +Thu Oct 8 15:56:53 UTC 2020 - Benjamin Greiner + +- Update to 5.6.1 + * Fixed #1546: Unstable (non-idempotent) behavior with certain + src trees. +- Changelog for 5.6.0 + * Implemented #1433: Provide helpful feedback in case a custom + config file is specified without a configuration. + * Implemented #1494: Default to sorting imports within .pxd + files. + * Implemented #1502: Improved float-to-top behavior when there + is an existing import section present at top-of-file. + * Implemented #1511: Support for easily seeing all files isort + will be ran against using isort . --show-files. + * Implemented #1487: Improved handling of encoding errors. + * Improved handling of unsupported configuration option errors + (see #1475). + * Fixed #1463: Better interactive documentation for future + option. + * Fixed #1461: Quiet config option not respected by file API in + some circumstances. + * Fixed #1482: pylama integration is not working correctly out- + of-the-box. + * Fixed #1492: --check does not work with stdin source. + * Fixed #1499: isort gets confused by single line, multi-line + style comments when using float-to-top. + * Fixed #1525: Some warnings can't be disabled with --quiet. + * Fixed #1523: in rare cases isort can ignore direct from import + if as import is also on same line. + + Potentially breaking changes: + * Implemented #1540: Officially support Python 3.9 stdlib + imports by default. + * Fixed #1443: Incorrect third vs first party categorization - + namespace packages. + * Fixed #1486: "Google" profile is not quite Google style. + * Fixed "PyCharm" profile to always add 2 lines to be consistent + with what PyCharm "Optimize Imports" does. + + Goal Zero: + * Implemented #1472: Full testing of stdin CLI Options + * Added additional branch coverage. + * More projects added to integration test suite. +- Changelog for 5.5.5 + * Fixed #1539: in extremely rare cases isort 5.5.4 introduces + syntax error by removing closing paren. +- Changelog for 5.5.4 + * Fixed #1507: in rare cases isort changes the content of + multiline strings after a yield statement. + * Fixed #1505: Support case where known_SECTION points to a + section not listed in sections. +- Use upstream's way of PIP with Poetry PEP517 backend to install + the package so we can use Github archive only +- A Poetry update required to modify the examples installation for + testing +- Test flavor does not depend on installed base package anymore + ------------------------------------------------------------------- Mon Sep 21 11:48:02 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index 92977a0..c1267ce 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -27,45 +27,39 @@ %endif %define skip_python2 1 Name: python-isort%{psuffix} -Version: 5.5.3 +Version: 5.6.1 Release: 0 Summary: A Python utility / library to sort Python imports License: MIT URL: https://pycqa.github.io/isort/ -# only PyPI archive contains setup.py -Source: https://files.pythonhosted.org/packages/source/i/isort/isort-%{version}.tar.gz -# ... but test data are not packaged for PyPI, get them from git sources -Source1: https://github.com/PyCQA/isort/archive/%{version}.tar.gz#/isort-%{version}-gh.tar.gz -BuildRequires: %{python_module setuptools} +# Data for tests are not packaged for PyPI, get them from Github +Source: https://github.com/PyCQA/isort/archive/%{version}.tar.gz#/isort-%{version}-gh.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools Requires(post): update-alternatives Requires(postun): update-alternatives +Recommends: python-colorama >= 0.4.3 Recommends: python-hypothesmith Recommends: python-pip-api Recommends: python-pipreqs -Recommends: python-requirementslib >= 1.5.4 -Recommends: python-tomlkit +Recommends: python-requirementslib Suggests: git BuildArch: noarch %if %{with test} BuildRequires: %{python_module black} BuildRequires: %{python_module hypothesis-auto} BuildRequires: %{python_module hypothesmith} -# we cannot just use the source dir on test flavor because tests expect the -# installed entrypoint (through alternatives) -BuildRequires: %{python_module isort = %{version}} BuildRequires: %{python_module libcst} BuildRequires: %{python_module mock} BuildRequires: %{python_module pip-api} BuildRequires: %{python_module pipreqs} -BuildRequires: %{python_module poetry} BuildRequires: %{python_module pylama} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module requirementslib >= 1.5.4} -BuildRequires: %{python_module tomlkit} +BuildRequires: %{python_module requirementslib >= 1.5} BuildRequires: git %endif %python_subpackages @@ -82,54 +76,49 @@ too. %prep %setup -q -n isort-%{version} chmod -x LICENSE -%if %{with test} -tar -x --strip-components=1 -f %{SOURCE1} \ - isort-%{version}/example_isort_formatting_plugin \ - isort-%{version}/example_shared_isort_profile \ - isort-%{version}/.isort.cfg \ - isort-%{version}/setup.cfg -%endif -%if !%{with test} %build -%python_build -%endif +%pyproject_wheel -%if !%{with test} +%if ! %{with test} %install -%python_install -%python_expand rm -r %{buildroot}%{$python_sitelib}/tests/ +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/isort %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %if %{with test} %check -%{python_expand # create egg-info for example projects -for exampledir in example_shared_isort_profile example_isort_formatting_plugin; do - pushd $exampledir - # don't enforce exact same environment as upstream's devel project - rm poetry.lock - # no dependency download, we have them all by BuildRequires - sed -i '/tool.poetry.dependencies/,/^$/ d' pyproject.toml - poetry-%{$python_bin_suffix} install - # append current dir, only use colon if not empty - export PYTHONPATH="${PYTHONPATH:+$PYTHONPATH:}$(pwd)" - popd +ORIGPATH=$PATH +%{python_expand # install example projects for testing +mkdir isort-test-%{$python_bin_suffix} +for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plugin; do + $python -m pip install --verbose \ + --root $(pwd)/isort-test-%{$python_bin_suffix} \ + --no-deps \ + --use-pep517 \ + --no-build-isolation \ + --progress-bar off \ + --disable-pip-version-check \ + $proj done -} + +export PATH="$(pwd)/isort-test-%{$python_bin_suffix}/usr/bin:$ORIGPATH" +export PYTHONPATH="$(pwd)/isort-test-%{$python_bin_suffix}%{$python_sitelib}" +export PYTHONDONTWRITEBYTECODE=1 # test_projects_using_isort.py: these tests try to clone from # online git repositories. # test_settung_combinations.py::test_isort_is_idempotent # is flaky https://github.com/PyCQA/isort/issues/1466 -%{pytest -W "ignore::UserWarning" \ +pytest-%{$python_bin_suffix} -v \ + -W "ignore::UserWarning" \ -W "ignore::DeprecationWarning" \ --ignore tests/integration/test_projects_using_isort.py \ -k "not (test_setting_combinations and test_isort_is_idempotent)" } %endif -%if !%{with test} +%if ! %{with test} %post %python_install_alternative isort @@ -141,7 +130,7 @@ done %license LICENSE %python_alternative %{_bindir}/isort %{python_sitelib}/isort -%{python_sitelib}/isort-%{version}-py*.egg-info +%{python_sitelib}/isort-%{version}.dist-info %endif %changelog From 59630a890941296f728d2ac919092dd6c81a022914f75ccbd7633b3aeac83b7d Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 9 Oct 2020 16:52:28 +0000 Subject: [PATCH 3/5] - Fix wheel building and installation for testing exampleprojects OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=65 --- python-isort.changes | 5 +++++ python-isort.spec | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/python-isort.changes b/python-isort.changes index 07a96c7..dda0bd6 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 9 16:47:11 UTC 2020 - Benjamin Greiner + +- Fix wheel building and installation for testing exampleprojects + ------------------------------------------------------------------- Thu Oct 8 15:56:53 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index c1267ce..1542a70 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -80,7 +80,7 @@ chmod -x LICENSE %build %pyproject_wheel -%if ! %{with test} +%if !%{with test} %install %pyproject_install %python_clone -a %{buildroot}%{_bindir}/isort @@ -90,9 +90,16 @@ chmod -x LICENSE %if %{with test} %check ORIGPATH=$PATH -%{python_expand # install example projects for testing +%{python_expand # install isort and required example projects into custom root +exampleprojects="example_shared_isort_profile example_isort_formatting_plugin" +for eproj in $exampleprojects; do + pushd $eproj + %pyproject_wheel + popd + mv $eproj/$eproj*.whl . +done mkdir isort-test-%{$python_bin_suffix} -for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plugin; do +for proj in isort $exampleprojects; do $python -m pip install --verbose \ --root $(pwd)/isort-test-%{$python_bin_suffix} \ --no-deps \ @@ -100,7 +107,7 @@ for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plu --no-build-isolation \ --progress-bar off \ --disable-pip-version-check \ - $proj + ${proj}*.whl done export PATH="$(pwd)/isort-test-%{$python_bin_suffix}/usr/bin:$ORIGPATH" @@ -118,7 +125,7 @@ pytest-%{$python_bin_suffix} -v \ } %endif -%if ! %{with test} +%if !%{with test} %post %python_install_alternative isort From f3e23bd15ecf298a471c0f1237cecff096fc9863d7823a7833ece67cd54c990c Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 9 Oct 2020 17:07:53 +0000 Subject: [PATCH 4/5] - Fix building and installation of exampleprojects for testing OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=66 --- python-isort.changes | 2 +- python-isort.spec | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/python-isort.changes b/python-isort.changes index dda0bd6..698c5a0 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Fri Oct 9 16:47:11 UTC 2020 - Benjamin Greiner -- Fix wheel building and installation for testing exampleprojects +- Fix building and installation of exampleprojects for testing ------------------------------------------------------------------- Thu Oct 8 15:56:53 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index 1542a70..38db251 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -91,23 +91,17 @@ chmod -x LICENSE %check ORIGPATH=$PATH %{python_expand # install isort and required example projects into custom root -exampleprojects="example_shared_isort_profile example_isort_formatting_plugin" -for eproj in $exampleprojects; do - pushd $eproj - %pyproject_wheel - popd - mv $eproj/$eproj*.whl . -done mkdir isort-test-%{$python_bin_suffix} -for proj in isort $exampleprojects; do +for proj in isort*.whl ./example_shared_isort_profile ./example_isort_formatting_plugin; do $python -m pip install --verbose \ + --no-index \ --root $(pwd)/isort-test-%{$python_bin_suffix} \ --no-deps \ --use-pep517 \ --no-build-isolation \ --progress-bar off \ --disable-pip-version-check \ - ${proj}*.whl + ${proj} done export PATH="$(pwd)/isort-test-%{$python_bin_suffix}/usr/bin:$ORIGPATH" From 6772e2c265460f53133c663c8c4e88aeafea16f8914d3ef14b2e822dda788573 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 13 Oct 2020 18:44:02 +0000 Subject: [PATCH 5/5] - Update to Version 5.6.4 * Fixed #1556: Empty line added between imports that should be skipped. - Version 5.6.3 * Improved packaging of test files alongside source distribution (see: https://github.com/PyCQA/isort/pull/1555). - Version 5.6.2 * Fixed #1548: On rare occasions an unecessary empty line can be added when an import is marked as skipped. * Fixed #1542: Bug in VERTICAL_PREFIX_FROM_MODULE_IMPORT wrap mode. * Fixed #1552: Pylama test dependent on source layout. * Goal Zero: (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan): * Zope added to integration test suite * Additional testing of CLI (simulate unseekable streams) - now only requires poetry.core as PEP517 backend OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=67 --- _multibuild | 2 +- isort-5.6.1-gh.tar.gz | 3 --- isort-5.6.4-gh.tar.gz | 3 +++ python-isort.changes | 21 +++++++++++++++++++++ python-isort.spec | 7 ++++--- 5 files changed, 29 insertions(+), 7 deletions(-) delete mode 100644 isort-5.6.1-gh.tar.gz create mode 100644 isort-5.6.4-gh.tar.gz diff --git a/_multibuild b/_multibuild index fcc7b97..49fb912 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,3 @@ - test + test diff --git a/isort-5.6.1-gh.tar.gz b/isort-5.6.1-gh.tar.gz deleted file mode 100644 index c45dda3..0000000 --- a/isort-5.6.1-gh.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f525efc733f5358e5fb5ffb2d36d3c9b848499f7698cfb410a2a41abf7a7c60 -size 635856 diff --git a/isort-5.6.4-gh.tar.gz b/isort-5.6.4-gh.tar.gz new file mode 100644 index 0000000..a797105 --- /dev/null +++ b/isort-5.6.4-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4018898c19c5e28797f64289c6286682ddc29eb49b4075866f6c63d8500eb7ab +size 636779 diff --git a/python-isort.changes b/python-isort.changes index 698c5a0..d141934 100644 --- a/python-isort.changes +++ b/python-isort.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Tue Oct 13 18:28:28 UTC 2020 - Benjamin Greiner + +- Update to Version 5.6.4 + * Fixed #1556: Empty line added between imports that should be + skipped. +- Version 5.6.3 + * Improved packaging of test files alongside source distribution + (see: https://github.com/PyCQA/isort/pull/1555). +- Version 5.6.2 + * Fixed #1548: On rare occasions an unecessary empty line can be + added when an import is marked as skipped. + * Fixed #1542: Bug in VERTICAL_PREFIX_FROM_MODULE_IMPORT wrap + mode. + * Fixed #1552: Pylama test dependent on source layout. + * Goal Zero: (Tickets related to aspirational goal of achieving 0 + regressions for remaining 5.0.0 lifespan): + * Zope added to integration test suite + * Additional testing of CLI (simulate unseekable streams) +- now only requires poetry.core as PEP517 backend + ------------------------------------------------------------------- Fri Oct 9 16:47:11 UTC 2020 - Benjamin Greiner diff --git a/python-isort.spec b/python-isort.spec index 38db251..eeff7c2 100644 --- a/python-isort.spec +++ b/python-isort.spec @@ -27,15 +27,15 @@ %endif %define skip_python2 1 Name: python-isort%{psuffix} -Version: 5.6.1 +Version: 5.6.4 Release: 0 Summary: A Python utility / library to sort Python imports License: MIT URL: https://pycqa.github.io/isort/ -# Data for tests are not packaged for PyPI, get them from Github +# tests and example projects are not packaged for PyPI, get them from Github Source: https://github.com/PyCQA/isort/archive/%{version}.tar.gz#/isort-%{version}-gh.tar.gz BuildRequires: %{python_module pip} -BuildRequires: %{python_module poetry} +BuildRequires: %{python_module poetry-core} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools @@ -56,6 +56,7 @@ BuildRequires: %{python_module libcst} BuildRequires: %{python_module mock} BuildRequires: %{python_module pip-api} BuildRequires: %{python_module pipreqs} +BuildRequires: %{python_module poetry} BuildRequires: %{python_module pylama} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest}