forked from pool/python-isort
- 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
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a5fffa3af6c1fb6c885aa14798099c1188d978b4d87114a5088b1770604dfff9
|
|
||||||
size 617626
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6187a9f1ce8784cbc6d1b88790a43e6083a6302f03e9ae482acc0f232a98c843
|
|
||||||
size 145442
|
|
||||||
3
isort-5.6.1-gh.tar.gz
Normal file
3
isort-5.6.1-gh.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7f525efc733f5358e5fb5ffb2d36d3c9b848499f7698cfb410a2a41abf7a7c60
|
||||||
|
size 635856
|
||||||
@@ -1,3 +1,59 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 8 15:56:53 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- 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 <code@bnavigator.de>
|
Mon Sep 21 11:48:02 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
|||||||
@@ -27,45 +27,39 @@
|
|||||||
%endif
|
%endif
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-isort%{psuffix}
|
Name: python-isort%{psuffix}
|
||||||
Version: 5.5.3
|
Version: 5.6.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Python utility / library to sort Python imports
|
Summary: A Python utility / library to sort Python imports
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pycqa.github.io/isort/
|
URL: https://pycqa.github.io/isort/
|
||||||
# only PyPI archive contains setup.py
|
# Data for tests are not packaged for PyPI, get them from Github
|
||||||
Source: https://files.pythonhosted.org/packages/source/i/isort/isort-%{version}.tar.gz
|
Source: https://github.com/PyCQA/isort/archive/%{version}.tar.gz#/isort-%{version}-gh.tar.gz
|
||||||
# ... but test data are not packaged for PyPI, get them from git sources
|
BuildRequires: %{python_module pip}
|
||||||
Source1: https://github.com/PyCQA/isort/archive/%{version}.tar.gz#/isort-%{version}-gh.tar.gz
|
BuildRequires: %{python_module poetry}
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-setuptools
|
Requires: python-setuptools
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
|
Recommends: python-colorama >= 0.4.3
|
||||||
Recommends: python-hypothesmith
|
Recommends: python-hypothesmith
|
||||||
Recommends: python-pip-api
|
Recommends: python-pip-api
|
||||||
Recommends: python-pipreqs
|
Recommends: python-pipreqs
|
||||||
Recommends: python-requirementslib >= 1.5.4
|
Recommends: python-requirementslib
|
||||||
Recommends: python-tomlkit
|
|
||||||
Suggests: git
|
Suggests: git
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module black}
|
BuildRequires: %{python_module black}
|
||||||
BuildRequires: %{python_module hypothesis-auto}
|
BuildRequires: %{python_module hypothesis-auto}
|
||||||
BuildRequires: %{python_module hypothesmith}
|
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 libcst}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pip-api}
|
BuildRequires: %{python_module pip-api}
|
||||||
BuildRequires: %{python_module pipreqs}
|
BuildRequires: %{python_module pipreqs}
|
||||||
BuildRequires: %{python_module poetry}
|
|
||||||
BuildRequires: %{python_module pylama}
|
BuildRequires: %{python_module pylama}
|
||||||
BuildRequires: %{python_module pytest-mock}
|
BuildRequires: %{python_module pytest-mock}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requirementslib >= 1.5.4}
|
BuildRequires: %{python_module requirementslib >= 1.5}
|
||||||
BuildRequires: %{python_module tomlkit}
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
%endif
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -82,54 +76,49 @@ too.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n isort-%{version}
|
%setup -q -n isort-%{version}
|
||||||
chmod -x LICENSE
|
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
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
%endif
|
|
||||||
|
|
||||||
%if !%{with test}
|
%if ! %{with test}
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand rm -r %{buildroot}%{$python_sitelib}/tests/
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/isort
|
%python_clone -a %{buildroot}%{_bindir}/isort
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%{python_expand # create egg-info for example projects
|
ORIGPATH=$PATH
|
||||||
for exampledir in example_shared_isort_profile example_isort_formatting_plugin; do
|
%{python_expand # install example projects for testing
|
||||||
pushd $exampledir
|
mkdir isort-test-%{$python_bin_suffix}
|
||||||
# don't enforce exact same environment as upstream's devel project
|
for proj in isort*.whl example_shared_isort_profile example_isort_formatting_plugin; do
|
||||||
rm poetry.lock
|
$python -m pip install --verbose \
|
||||||
# no dependency download, we have them all by BuildRequires
|
--root $(pwd)/isort-test-%{$python_bin_suffix} \
|
||||||
sed -i '/tool.poetry.dependencies/,/^$/ d' pyproject.toml
|
--no-deps \
|
||||||
poetry-%{$python_bin_suffix} install
|
--use-pep517 \
|
||||||
# append current dir, only use colon if not empty
|
--no-build-isolation \
|
||||||
export PYTHONPATH="${PYTHONPATH:+$PYTHONPATH:}$(pwd)"
|
--progress-bar off \
|
||||||
popd
|
--disable-pip-version-check \
|
||||||
|
$proj
|
||||||
done
|
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
|
# test_projects_using_isort.py: these tests try to clone from
|
||||||
# online git repositories.
|
# online git repositories.
|
||||||
# test_settung_combinations.py::test_isort_is_idempotent
|
# test_settung_combinations.py::test_isort_is_idempotent
|
||||||
# is flaky https://github.com/PyCQA/isort/issues/1466
|
# is flaky https://github.com/PyCQA/isort/issues/1466
|
||||||
%{pytest -W "ignore::UserWarning" \
|
pytest-%{$python_bin_suffix} -v \
|
||||||
|
-W "ignore::UserWarning" \
|
||||||
-W "ignore::DeprecationWarning" \
|
-W "ignore::DeprecationWarning" \
|
||||||
--ignore tests/integration/test_projects_using_isort.py \
|
--ignore tests/integration/test_projects_using_isort.py \
|
||||||
-k "not (test_setting_combinations and test_isort_is_idempotent)"
|
-k "not (test_setting_combinations and test_isort_is_idempotent)"
|
||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if ! %{with test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative isort
|
%python_install_alternative isort
|
||||||
|
|
||||||
@@ -141,7 +130,7 @@ done
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/isort
|
%python_alternative %{_bindir}/isort
|
||||||
%{python_sitelib}/isort
|
%{python_sitelib}/isort
|
||||||
%{python_sitelib}/isort-%{version}-py*.egg-info
|
%{python_sitelib}/isort-%{version}.dist-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user