forked from pool/python-black
Compare commits
15 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b686383587 | |||
| b2ae651af2 | |||
| 947481aa62 | |||
| f6cd2027bf | |||
| f4d89a7c92 | |||
| fd3f5314f8 | |||
| 0a29e7c4f2 | |||
| 00b5fcb8c1 | |||
| 67f07faedc | |||
| 12dbb9a243 | |||
| 4de8aee8eb | |||
| 2538c47b8f | |||
| 26ca7ee935 | |||
| cf2dc2d33c | |||
| 93edfe795b |
BIN
black-24.4.2.tar.gz
LFS
BIN
black-24.4.2.tar.gz
LFS
Binary file not shown.
3
black-25.11.0.tar.gz
Normal file
3
black-25.11.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9a323ac32f5dc75ce7470501b887250be5005a01602e931a15e45593f70f6e08
|
||||||
|
size 655669
|
||||||
@@ -1,18 +1,156 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 20 21:35:02 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 25.11.0:
|
||||||
|
* Enable base 3.14 support
|
||||||
|
* Add support for the new Python 3.14 t-string syntax
|
||||||
|
introduced by PEP 750
|
||||||
|
* Fix bug where comments between `# fmt: off` and `# fmt: on`
|
||||||
|
were reformatted
|
||||||
|
* Comments containing fmt directives now preserve their exact
|
||||||
|
formatting instead of being normalized
|
||||||
|
* Add `no_cache` option to control caching behavior.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 22 07:34:17 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 25.9.0:
|
||||||
|
* Remove support for pre-python 3.7 `await/async` as soft
|
||||||
|
keywords/variable names
|
||||||
|
* Fix crash while formatting a long `del` statement containing
|
||||||
|
tuples
|
||||||
|
* Fix crash while formatting expressions using the walrus
|
||||||
|
operator in complex `with` statements
|
||||||
|
* Handle `# fmt: skip` followed by a comment at the end of file
|
||||||
|
* Fix crash when a tuple appears in the `as` clause of a `with`
|
||||||
|
statement
|
||||||
|
* Fix crash when tuple is used as a context manager inside a
|
||||||
|
`with` statement
|
||||||
|
* Fix crash when formatting a `\` followed by a `
|
||||||
|
` followed
|
||||||
|
by a comment
|
||||||
|
* Fix crash on a `\r
|
||||||
|
* Fix crash on `await ...` (where `...` is a literal
|
||||||
|
`Ellipsis`)
|
||||||
|
* Fix crash on parenthesized expression inside a type parameter
|
||||||
|
bound
|
||||||
|
* Fix crash when using line ranges excluding indented single
|
||||||
|
line decorated items
|
||||||
|
* (#4670)
|
||||||
|
* Fix a bug where one-liner functions/conditionals marked with
|
||||||
|
`# fmt: skip` would still be formatted
|
||||||
|
* Improve `multiline_string_handling` with ternaries and
|
||||||
|
dictionaries
|
||||||
|
* Fix a bug where `string_processing` would not split f-strings
|
||||||
|
directly after expressions
|
||||||
|
* Wrap the `in` clause of comprehensions across lines if
|
||||||
|
necessary
|
||||||
|
* Remove parentheses around multiple exception types in
|
||||||
|
`except` and `except*` without `as`.
|
||||||
|
* Rewrite tokenizer to improve performance and compliance
|
||||||
|
* Fix bug where certain unusual expressions (e.g., lambdas)
|
||||||
|
were not accepted in type parameter bounds and defaults.
|
||||||
|
* Avoid using an extra process when running with only one
|
||||||
|
worker
|
||||||
|
- drop update-PEP-701.patch, click-820.patch: upstream
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 18 20:26:19 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Instead of skipping the test, apply upstream fix as
|
||||||
|
update-PEP-701.patch (code from gh#psf/black!4690).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 18 07:27:52 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Skip test_simple_format tests, which is failing with 3.13.5
|
||||||
|
(gh#psf/black#4698).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 12 11:01:03 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives
|
||||||
|
- Add upstream click-820.patch to make it work with latest
|
||||||
|
python-click
|
||||||
|
gh#psf/black#4577, gh#psf/black#4591, gh#psf/black#4666
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 10 09:37:29 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||||
|
|
||||||
|
- Update to 25.1.0:
|
||||||
|
Highlights:
|
||||||
|
* Normalize casing of Unicode escape characters in strings to lowercase (#2916)
|
||||||
|
* Fix inconsistencies in whether certain strings are detected as docstrings (#4095)
|
||||||
|
* Consistently add trailing commas to typed function parameters (#4164)
|
||||||
|
* Remove redundant parentheses in if guards for case blocks (#4214)
|
||||||
|
* Add parentheses to if clauses in case blocks when the line is too long (#4269)
|
||||||
|
* Whitespace before # fmt: skip comments is no longer normalized (#4146)
|
||||||
|
* Fix line length computation for certain expressions that involve the power operator (#4154)
|
||||||
|
* Check if there is a newline before the terminating quotes of a docstring (#4185)
|
||||||
|
* Fix type annotation spacing between * and more complex type variable tuple (#4440)
|
||||||
|
* Remove parentheses around sole list items (#4312)
|
||||||
|
* Generic function definitions are now formatted more elegantly: parameters are
|
||||||
|
split over multiple lines first instead of type parameter definitions (#4553)
|
||||||
|
Stable style:
|
||||||
|
* Fix formatting cells in IPython notebooks with magic methods and starting or trailing
|
||||||
|
empty lines (#4484)
|
||||||
|
* Fix crash when formatting with statements containing tuple generators/unpacking
|
||||||
|
(#4538)
|
||||||
|
Preview style:
|
||||||
|
* Fix/remove string merging changing f-string quotes on f-strings with internal quotes
|
||||||
|
(#4498)
|
||||||
|
* Collapse multiple empty lines after an import into one (#4489)
|
||||||
|
* Prevent string_processing and wrap_long_dict_values_in_parens from removing
|
||||||
|
parentheses around long dictionary values (#4377)
|
||||||
|
* Move wrap_long_dict_values_in_parens from the unstable to preview style (#4561)
|
||||||
|
Packaging:
|
||||||
|
* Store license identifier inside the License-Expression metadata field, see
|
||||||
|
PEP 639. (#4479)
|
||||||
|
Performance:
|
||||||
|
* Speed up the is_fstring_start function in Black's tokenizer (#4541)
|
||||||
|
Integrations:
|
||||||
|
* If using stdin with --stdin-filename set to a force excluded path, stdin won't be
|
||||||
|
formatted. (#4539)
|
||||||
|
- update requirements from pyproject.toml
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 27 01:22:37 UTC 2024 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
|
- Update to 24.8.0
|
||||||
|
Stable style
|
||||||
|
* Fix crash when # fmt: off is used before a closing parenthesis
|
||||||
|
or bracket. (#4363)
|
||||||
|
Parser
|
||||||
|
* Fix regression where Black failed to parse a multiline f-string
|
||||||
|
containing another multiline string (#4339)
|
||||||
|
* Fix regression where Black failed to parse an escaped single
|
||||||
|
quote inside an f-string (#4401)
|
||||||
|
* Fix bug with Black incorrectly parsing empty lines with
|
||||||
|
a backslash (#4343)
|
||||||
|
* Fix bugs with Black's tokenizer not handling \{
|
||||||
|
inside f-strings very well (#4422)
|
||||||
|
* Fix incorrect line numbers in the tokenizer for certain
|
||||||
|
tokens within f-strings (#4423)
|
||||||
|
Performance
|
||||||
|
* Improve performance when a large directory is listed
|
||||||
|
in .gitignore (#4415)
|
||||||
|
Blackd
|
||||||
|
* Fix blackd (and all extras installs) for docker container (#4357)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Jul 21 16:03:44 UTC 2024 - Andrea Manzini <andrea.manzini@suse.com>
|
Sun Jul 21 16:03:44 UTC 2024 - Andrea Manzini <andrea.manzini@suse.com>
|
||||||
|
|
||||||
* Fix regression where certain complex f-strings failed to parse
|
- update to 24.4.2
|
||||||
* Fix bad performance on certain complex string literals
|
* Fix regression where certain complex f-strings failed to parse
|
||||||
* Fix bad performance on certain complex string literals
|
* Fix bad performance on certain complex string literals
|
||||||
- update to 24.4.1
|
- update to 24.4.1
|
||||||
* Fix crash involving indented dummy functions containing newlines
|
* Add support for the new Python 3.12 f-string syntax introduced by PEP 701
|
||||||
* Add support for type parameter defaults, a new syntactic feature added
|
* Fix crash involving indented dummy functions containing newlines
|
||||||
to Python 3.13 by PEP 696
|
* Add support for type parameter defaults, a new syntactic feature added
|
||||||
to Python 3.13 by PEP 696
|
to Python 3.13 by PEP 696
|
||||||
* Fix unwanted crashes caused by AST equivalency check
|
- update to 24.4.0
|
||||||
* Fix unwanted crashes caused by AST equivalency check
|
* Fix unwanted crashes caused by AST equivalency check
|
||||||
* Stop moving multiline strings to a new line unless inside brackets
|
* if guards in case blocks are now wrapped in parentheses when the line is too long.
|
||||||
* Stop moving multiline strings to a new line unless inside brackets
|
* Stop moving multiline strings to a new line unless inside brackets
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-black
|
# spec file for package python-black
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,50 +16,52 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-black
|
Name: python-black
|
||||||
Version: 24.4.2
|
Version: 25.11.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A code formatter written in, and written for Python
|
Summary: A code formatter written in, and written for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/psf/black
|
URL: https://github.com/psf/black
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/black/black-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/black/black-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module aiohttp >= 3.3.2}
|
BuildRequires: %{python_module aiohttp >= 3.3.2}
|
||||||
BuildRequires: %{python_module aiohttp_cors}
|
|
||||||
BuildRequires: %{python_module attrs >= 18.1.0}
|
|
||||||
BuildRequires: %{python_module base >= 3.8}
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
BuildRequires: %{python_module click >= 8.0.0}
|
BuildRequires: %{python_module click >= 8.0.0}
|
||||||
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
BuildRequires: %{python_module hatch-fancy-pypi-readme}
|
||||||
BuildRequires: %{python_module hatch_vcs}
|
BuildRequires: %{python_module hatch_vcs}
|
||||||
BuildRequires: %{python_module hatchling >= 1.8.0}
|
BuildRequires: %{python_module hatchling >= 1.8.0}
|
||||||
BuildRequires: %{python_module mypy_extensions >= 0.4.3}
|
BuildRequires: %{python_module mypy_extensions >= 0.4.3}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging >= 22.0}
|
||||||
BuildRequires: %{python_module pathspec >= 0.9.0}
|
BuildRequires: %{python_module pathspec >= 0.9.0}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module platformdirs >= 2}
|
BuildRequires: %{python_module platformdirs >= 2}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module tomli >= 1.1.0}
|
BuildRequires: %{python_module pytokens >= 0.1.10}
|
||||||
%if 0%{?suse_version} > 1500
|
|
||||||
BuildRequires: %{python_module typing_extensions >= 3.10.0.0 if %python-base < 3.11}
|
|
||||||
%endif
|
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-aiohttp >= 3.3.2
|
Suggests: python-aiohttp >= 3.10.0
|
||||||
Requires: python-aiohttp_cors
|
|
||||||
Requires: python-attrs >= 18.1.0
|
|
||||||
Requires: python-click >= 8.0.0
|
Requires: python-click >= 8.0.0
|
||||||
Requires: python-mypy_extensions >= 0.4.3
|
Requires: python-mypy_extensions >= 0.4.3
|
||||||
Requires: python-packaging
|
Requires: python-packaging
|
||||||
Requires: python-pathspec >= 0.9.0
|
Requires: python-pathspec >= 0.9.0
|
||||||
Requires: python-platformdirs >= 2
|
Requires: python-platformdirs >= 2
|
||||||
Requires: python-tomli >= 1.1.0
|
Requires: python-pytokens >= 0.1.10
|
||||||
|
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
|
||||||
%if 0%{?python_version_nodots} < 311
|
|
||||||
Requires: python-typing_extensions >= 3.10.0.0
|
|
||||||
%endif
|
%endif
|
||||||
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -87,14 +89,18 @@ also recognizes YAPF's block comments to the same effect.
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
# Copy one of the executable scripts into the PATH
|
# Copy one of the executable scripts into the PATH
|
||||||
mkdir ~/bin
|
mkdir -p ~/bin
|
||||||
cp $(ls %{buildroot}%{_bindir}/black-* | head -1) ~/bin/black
|
cp $(ls %{buildroot}%{_bindir}/black-* | head -1) ~/bin/black
|
||||||
export PATH=$PATH:~/bin
|
export PATH=$PATH:~/bin
|
||||||
|
|
||||||
# test_expression_diff - sometimes fails on async timing in OBS
|
# test_expression_diff - sometimes fails on async timing in OBS
|
||||||
# test_bpo_2142_workaround fails on arm
|
# test_bpo_2142_workaround fails on arm
|
||||||
skiptests="test_expression_diff or test_bpo_2142_workaround"
|
skiptests="test_expression_diff or test_bpo_2142_workaround"
|
||||||
%pytest -k "not ($skiptests)"
|
%pytest
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative black
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative black blackd
|
%python_install_alternative black blackd
|
||||||
|
|||||||
Reference in New Issue
Block a user