SHA256
1
0
forked from pool/python-isort

Accepting request 880607 from devel:languages:python

- Don't test requirementslib on python39. Isort calls it a
  "deprecated finder" anyway. Colorama needs to be pulled in
  seperately then. gh#sarugaku/requirementslib#288
- Update to version 5.8.0
  * Fixed #1631: as import comments can in some cases be
    duplicated.
  * Fixed #1667: extra newline added with float-to-top, after
    skip, in some cases.
  * Fixed #1594: incorrect placement of noqa comments with
    multiple from imports.
  * Fixed #1566: in some cases different length limits for dos
    based line endings.
  * Implemented #1648: Export MyPY type hints.
  * Implemented #1641: Identified import statements now return
    runnable code.
  * Implemented #1661: Added "wemake" profile.
  * Implemented #1669: Parallel (-j) now defaults to number of CPU
    cores if no value is provided.
  * Implemented #1668: Added a safeguard against accidental usage
    against /.
  * Implemented #1638 / #1644: Provide a flag --overwrite-in-place
    to ensure same file handle is used after sorting.
  * Implemented #1684: Added support for extending skips with
    --extend-skip and --extend-skip-glob.
  * Implemented #1688: Auto identification and skipping of some
    invalid import statements.
  * Implemented #1645: Ability to reverse the import sorting order.
  * Implemented #1504: Added ability to push star imports to the
    top to avoid overriding explicitly defined imports.
  * Documented #1685: Skip doesn't support plain directory names,
    but skip_glob does.

OBS-URL: https://build.opensuse.org/request/show/880607
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2021-03-24 15:10:54 +00:00 committed by Git OBS Bridge
commit 046bd0ce62
4 changed files with 60 additions and 15 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0075f620c552f6d52e26bc4ec53f44c716b2aaf0e4c8067dfffadef60413a740
size 705652

3
isort-5.8.0-gh.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aae32aa863c57735bba9665f2a1fa79416a4c528c45d021f0da5e62de504b3f8
size 717068

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Mon Mar 22 21:09:24 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Don't test requirementslib on python39. Isort calls it a
"deprecated finder" anyway. Colorama needs to be pulled in
seperately then. gh#sarugaku/requirementslib#288
-------------------------------------------------------------------
Sun Mar 21 18:33:47 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 5.8.0
* Fixed #1631: as import comments can in some cases be
duplicated.
* Fixed #1667: extra newline added with float-to-top, after
skip, in some cases.
* Fixed #1594: incorrect placement of noqa comments with
multiple from imports.
* Fixed #1566: in some cases different length limits for dos
based line endings.
* Implemented #1648: Export MyPY type hints.
* Implemented #1641: Identified import statements now return
runnable code.
* Implemented #1661: Added "wemake" profile.
* Implemented #1669: Parallel (-j) now defaults to number of CPU
cores if no value is provided.
* Implemented #1668: Added a safeguard against accidental usage
against /.
* Implemented #1638 / #1644: Provide a flag --overwrite-in-place
to ensure same file handle is used after sorting.
* Implemented #1684: Added support for extending skips with
--extend-skip and --extend-skip-glob.
* Implemented #1688: Auto identification and skipping of some
invalid import statements.
* Implemented #1645: Ability to reverse the import sorting order.
* Implemented #1504: Added ability to push star imports to the
top to avoid overriding explicitly defined imports.
* Documented #1685: Skip doesn't support plain directory names,
but skip_glob does.
-------------------------------------------------------------------
Fri Jan 29 19:59:54 UTC 2021 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,5 +1,5 @@
#
# spec file for package python-isort
# spec file for package python-isort-test
#
# Copyright (c) 2021 SUSE LLC
#
@ -27,7 +27,7 @@
%endif
%define skip_python2 1
Name: python-isort%{psuffix}
Version: 5.7.0
Version: 5.8.0
Release: 0
Summary: A Python utility / library to sort Python imports
License: MIT
@ -40,7 +40,7 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210127.3a18043
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
Recommends: python-colorama >= 0.4.3
Recommends: python-pip-api
Recommends: python-pipreqs
@ -49,17 +49,18 @@ Suggests: git
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module black}
BuildRequires: %{python_module colorama >= 0.4.3}
BuildRequires: %{python_module hypothesis-auto}
BuildRequires: %{python_module hypothesmith}
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 > 6.0}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requirementslib >= 1.5}
# requirementslib not ready for python 3.9 yet -- gh#sarugaku/requirementslib#288
BuildRequires: %{python_module requirementslib >= 1.5 if %python-base < 3.9}
BuildRequires: git
%endif
%python_subpackages
@ -90,6 +91,15 @@ chmod -x LICENSE
%if %{with test}
%check
# test_projects_using_isort.py: these tests try to clone from online git repositories.
ignoretests="--ignore tests/integration/test_projects_using_isort.py"
# test_setting_combinations.py::test_isort_is_idempotent
# is flaky https://github.com/PyCQA/isort/issues/1466
donttest="(test_setting_combinations and test_isort_is_idempotent)"
# requirementslib is not available yet for python39
# https://github.com/sarugaku/requirementslib/issues/288
python39_donttest=" or (test_deprecated_finders and test_pipfile_finder)"
ORIGPATH=$PATH
%{python_expand # install isort and required example projects into custom root
mkdir isort-test-%{$python_bin_suffix}
@ -110,15 +120,11 @@ for proj in build/isort-%{version}-py3-none-any.whl ./example_shared_isort_profi
${proj}
done
# test_projects_using_isort.py: these tests try to clone from
# online git repositories.
# test_setting_combinations.py::test_isort_is_idempotent
# is flaky https://github.com/PyCQA/isort/issues/1466
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)"
${ignoretests} \
-k "not (${donttest} ${$python_donttest})"
}
%endif