SHA256
1
0
forked from pool/python-isort

12 Commits

Author SHA256 Message Date
a6d2790d0f Accepting request 1323247 from devel:languages:python
- Update to 7.0.0:
  * Breaking Changes
    + Drop support for Python 3.9 (#2430) @DanielNoord
  * Features
    + Show absolute paths in skipped file messages (#2416) @pranlawate
  * Fixes
    + Drop use of non-standard pkg_resources API (#2405) @dvarrazzo
    + Use working isort version in pre-commit example (#2402) @iainelder
    + fix typo in _get_files_from_dir_cached test (#2392) @tiltingpenguin
    + Resolve bandit warnings (#2379) @kurtmckee
    + Some fixes for Python 3.14 (#2433) @DanielNoord
    + Test on 3.14 and fix any bugs (#2425) @DanielNoord
    + Update CHANGELOG.md + Fix Formatting and Grammar (#2419) @lukbrew25
    + Fix output of hanging indent for long lines with noqa (#2407)
- Drop patch fix-typo.patch, merged upstream.

OBS-URL: https://build.opensuse.org/request/show/1323247
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=49
2025-12-17 16:38:03 +00:00
3dced7c567 - Update to 7.0.0:
* Breaking Changes
    + Drop support for Python 3.9 (#2430) @DanielNoord
  * Features
    + Show absolute paths in skipped file messages (#2416) @pranlawate
  * Fixes
    + Drop use of non-standard pkg_resources API (#2405) @dvarrazzo
    + Use working isort version in pre-commit example (#2402) @iainelder
    + fix typo in _get_files_from_dir_cached test (#2392) @tiltingpenguin
    + Resolve bandit warnings (#2379) @kurtmckee
    + Some fixes for Python 3.14 (#2433) @DanielNoord
    + Test on 3.14 and fix any bugs (#2425) @DanielNoord
    + Update CHANGELOG.md + Fix Formatting and Grammar (#2419) @lukbrew25
    + Fix output of hanging indent for long lines with noqa (#2407)
- Drop patch fix-typo.patch, merged upstream.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=129
2025-12-17 03:58:55 +00:00
b0155a41c8 Accepting request 1291702 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1291702
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=48
2025-07-10 20:13:57 +00:00
a0705cdd0b ... and group alts
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=127
2025-07-10 13:28:12 +00:00
a5ba4d8461 fix after spec-cleaner
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=126
2025-07-10 13:26:30 +00:00
53548581e1 - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=125
2025-07-10 13:24:47 +00:00
5ab9285979 Accepting request 1273976 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1273976
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=47
2025-05-02 13:01:05 +00:00
2d2761fe58 - Raise suse_version to disable pymama tests to <= 1600
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=123
2025-05-02 09:34:05 +00:00
8e320f4883 Accepting request 1267733 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1267733
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=46
2025-04-07 16:56:01 +00:00
349ac22339 - Update to 6.0.1
- Update to 6.0.0
- drop support-pytest-8.patch, merged upstream
- change source url back to pypi, tests are now included
- update build-requirements
- add fix-typo.patch to fix tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=121
2025-04-07 16:12:39 +00:00
4f4540169d Accepting request 1218037 from devel:languages:python
- Remove not needed build dependencies

OBS-URL: https://build.opensuse.org/request/show/1218037
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-isort?expand=0&rev=45
2024-10-24 13:45:02 +00:00
fc9d94cbe2 - Remove not needed build dependencies
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isort?expand=0&rev=119
2024-10-24 11:57:01 +00:00
5 changed files with 107 additions and 87 deletions

Binary file not shown.

3
isort-7.0.0.tar.gz Normal file
View File

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

View File

@@ -1,3 +1,85 @@
-------------------------------------------------------------------
Wed Dec 17 03:58:06 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 7.0.0:
* Breaking Changes
+ Drop support for Python 3.9 (#2430) @DanielNoord
* Features
+ Show absolute paths in skipped file messages (#2416) @pranlawate
* Fixes
+ Drop use of non-standard pkg_resources API (#2405) @dvarrazzo
+ Use working isort version in pre-commit example (#2402) @iainelder
+ fix typo in _get_files_from_dir_cached test (#2392) @tiltingpenguin
+ Resolve bandit warnings (#2379) @kurtmckee
+ Some fixes for Python 3.14 (#2433) @DanielNoord
+ Test on 3.14 and fix any bugs (#2425) @DanielNoord
+ Update CHANGELOG.md + Fix Formatting and Grammar (#2419) @lukbrew25
+ Fix output of hanging indent for long lines with noqa (#2407)
- Drop patch fix-typo.patch, merged upstream.
-------------------------------------------------------------------
Thu Jul 10 13:23:44 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Fri May 2 08:59:30 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Raise suse_version to disable pymama tests to <= 1600
-------------------------------------------------------------------
Mon Apr 7 13:03:24 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Update to 6.0.1
* fix multi_line_output_modes docs (#2096) @xinydev
* Ruff rules PT for pytest (#2372) @cclauss
* Ruff rules B017, B028, and E203 (#2371) @cclauss
* Lint Python code with ruff (#2359) @cclauss
* Fix test_find_imports_in_file_error failing on Windows (#2369) @kobarity
* Move flake8 settings into pyproject.toml (#2360) @cclauss
* Upgrade to uv>=0.6.0 and enable-cache (#2364) @cclauss
* Apply some ruff rules (#2353) @cclauss
* Add OSError handling in find_imports_in_file (#2331) @kobarity
* Link GH as changelog (#2354) @staticdev
- Update to 6.0.0
* Remove support for Python 3.8 (#2327) @DanielNoord
* Python 3.13 support (#2306) @mayty
* Updates round 3 (#2334) @matthewhughes934
* Speed up exists_case_sensitive calls (#2264) @correctmost
* nit: Fix deprecation message link (#2220) @syou6162
* Ensure that split_on_trailing_comma works with as imports (#2340) @DanielNoord
* Black profile: enable magic comma (#2236) @MrMino
* Fix google style test (#2336) @DanielNoord
* Update line_length and single_line_exclusions in google profile (#2149) @jagapiou
* Updates round 2 (#2329) @matthewhughes934
* Dependency updates round 1 (#2325) @matthewhughes934
* Run pre-commit autoupdate (#2321) @kurtmckee
* Allow --diff to be used with --jobs (#2302) @mnakama
* wemake has 80 chars hard limit, not 79 (#2241) @sobolevn
* Fix errors on main (#2320) @DanielNoord
* Fixed syntax error (#2289) @Sergio-prog
* fix: typo (#2298) @Rotzbua
* Fix sort_reexports code mangling (#2283) @Helveg
* fix: correct group by package tokenization (#2136) @glasnt
* Fix isort-action usage documentation (#2297) @jamescurtin
* Fix CDN for Ace (#2127) @abitrolly
* Fix help text (#2229) @stweil
* docs: fix spelling mistake (#2249) @cachho
* Bump poetry to 2.0.1 (#2341) @DanielNoord
* Fix misc unsafe dependencies (#2345) @staticdev
* Bump the github-actions group across 1 directory with 5 updates (#2324) @dependabot[bot]
* Bump gitpython from 3.1.40 to 3.1.41 (#2223) @dependabot[bot]
* Bump jinja2 from 3.1.2 to 3.1.3 (#2224) @dependabot[bot]
- drop support-pytest-8.patch, merged upstream
- change source url back to pypi, tests are now included
- update build-requirements
- add fix-typo.patch to fix tests
-------------------------------------------------------------------
Thu Oct 24 11:20:33 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Remove not needed build dependencies
-------------------------------------------------------------------
Fri Aug 30 02:57:29 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-isort
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,56 +24,48 @@
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} < 1550
%if 0%{?suse_version} <= 1600
%bcond_with pylama
%else
%bcond_without pylama
%endif
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-isort%{psuffix}
Version: 5.13.2
Version: 7.0.0
Release: 0
Summary: A Python utility / library to sort Python imports
License: MIT
URL: https://pycqa.github.io/isort/
# 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
# PATCH-FIX-UPSTREAM gh#PyCQA/isort#2235
Patch0: support-pytest-8.patch
BuildRequires: %{python_module base >= 3.8}
Source: https://files.pythonhosted.org/packages/source/i/isort/isort-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module hatch-vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-colorama >= 0.4.3
Recommends: python-pip-api
Recommends: python-pip-shims >= 0.5.2
Recommends: python-pipreqs
Recommends: python-setuptools
Requires: alts
Recommends: python-colorama >= 0.4.6
Suggests: git-core
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module black}
BuildRequires: %{python_module colorama >= 0.4.3}
BuildRequires: %{python_module hypothesmith}
BuildRequires: %{python_module colorama >= 0.4.6}
BuildRequires: %{python_module hypothesmith >= 0.3.3}
BuildRequires: %{python_module isort == %{version}}
BuildRequires: %{python_module libcst}
BuildRequires: %{python_module natsort}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pip-api}
BuildRequires: %{python_module pipreqs}
BuildRequires: %{python_module poetry}
%if %{with pylama}
BuildRequires: %{python_module pylama}
%endif
BuildRequires: %{python_module pytest > 6.0}
BuildRequires: %{python_module pytest >= 8.4}
BuildRequires: %{python_module pytest-benchmark >= 5.1}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module toml >= 0.10.2}
BuildRequires: git-core
%if %{with pylama}
BuildRequires: %{python_module pylama}
%endif
%endif
%python_subpackages
@@ -83,7 +75,7 @@ isort your python imports for you so you don't have to.
isort is a Python utility / library to sort imports alphabetically, and
automatically separated into sections and by type. It provides a command line
utility, Python library and plugins for various editors to quickly sort all your
imports. It requires Python 3.8+ to run but supports formatting Python 2 code
imports. It requires Python 3.9+ to run but supports formatting Python 2 code
too.
%prep
@@ -113,6 +105,7 @@ hypothesis.settings.register_profile(
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/isort
%python_clone -a %{buildroot}%{_bindir}/isort-identify-imports
%python_group_libalternatives isort isort-identify-imports
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -172,11 +165,8 @@ pytest-%{$python_bin_suffix} -v \
%endif
%if !%{with test}
%post
%python_install_alternative isort isort-identify-imports
%postun
%python_uninstall_alternative isort
%pre
%python_libalternatives_reset_alternative isort
%files %{python_files}
%doc README.md

View File

@@ -1,52 +0,0 @@
From 9c0b6272bfb1fd41298dd0fa9d072367bd79cc1b Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Thu, 15 Feb 2024 17:42:59 +0300
Subject: [PATCH] Drop deprecated pytest.warns(None)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With Pytest 7:
https://docs.pytest.org/en/stable/changelog.html#pytest-7-0-0rc1-2021-12-06
> #8645: pytest.warns(None) is now deprecated because many people used
it to mean “this code does not emit warnings”, but it actually had the
effect of checking that the code emits at least one warning of any
type-like pytest.warns() or pytest.warns(Warning)
With Pytest 8 it's the error.
Changed according to the documentation:
https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests
Fixes: https://github.com/PyCQA/isort/issues/2234
Signed-off-by: Stanislav Levin <slev@altlinux.org>
---
tests/unit/test_ticketed_features.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/unit/test_ticketed_features.py b/tests/unit/test_ticketed_features.py
index 32eeb709..bc847ed5 100644
--- a/tests/unit/test_ticketed_features.py
+++ b/tests/unit/test_ticketed_features.py
@@ -3,6 +3,7 @@
"""
from functools import partial
from io import StringIO
+import warnings
import pytest
@@ -615,9 +616,9 @@ def test_isort_should_warn_on_empty_custom_config_issue_1433(tmpdir):
quiet = true
"""
)
- with pytest.warns(None) as warning: # type: ignore
+ with warnings.catch_warnings():
+ warnings.simplefilter("error")
assert Config(settings_file=str(settings_file)).quiet
- assert not warning
def test_float_to_top_should_respect_existing_newlines_between_imports_issue_1502():