./devel/py-black, Uncompromising Python code formatter

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 24.10.0, Package name: py312-black-24.10.0, Maintainer: root

By using Black, you agree to cede control over minutiae of hand-formatting. In
return, Black gives you speed, determinism, and freedom from pycodestyle nagging
about formatting. You will save time and mental energy for more important
matters.


Required to run:
[devel/py-click] [devel/py-pathspec] [www/py-aiohttp] [lang/py-mypy_extensions] [misc/py-platformdirs] [lang/python310] [textproc/py-tomli]

Required to build:
[devel/py-setuptools_scm] [devel/py-hatchling] [devel/py-hatch-vcs] [devel/py-hatch-fancy-pypi-readme]

Master sites:

Filesize: 630.677 KB

Version history: (Expand)


CVS history: (Expand)


   2024-10-10 11:54:23 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.10.0

24.10.0

Highlights

- Black is now officially tested with Python 3.13 and provides Python 3.13
  mypyc-compiled wheels.
- Black will issue an error when used with Python 3.12.5, due to an upstream memory
  safety issue in Python 3.12.5 that can cause Black's AST safety checks to \ 
fail. Please
  use Python 3.12.6 or Python 3.12.4 instead.
- Black no longer supports running with Python 3.8

style

- Fix crashes involving comments in parenthesised return types or `X | Y` style \ 
unions.

- Fix skipping Jupyter cells with unknown `%%` magic

style

- Fix type annotation spacing between * and more complex type variable tuple \ 
(i.e. `def
  fn(*args: *tuple[*Ts, T]) -> None: pass`)

Caching

- Fix bug where the cache was shared between runs with and without `--unstable`

Packaging

- Upgrade version of mypyc used to 1.12 beta
- `blackd` now requires a newer version of aiohttp.

Output

- Added Python target version information on parse error
- Add information about Black version to internal error messages
   2024-08-04 09:12:14 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.8.0

24.8.0

Stable style

- Fix crash when `# fmt: off` is used before a closing parenthesis or bracket.

Packaging

- Packaging metadata updated: docs are explictly linked, the issue tracker is \ 
now also
 linked. This improves the PyPI listing for Black.

Parser

- Fix regression where Black failed to parse a multiline f-string containing another
 multiline string
- Fix regression where Black failed to parse an escaped single quote inside an \ 
f-string

- Fix bug with Black incorrectly parsing empty lines with a backslash
- Fix bugs with Black's tokenizer not handling `\{` inside f-strings very well
- Fix incorrect line numbers in the tokenizer for certain tokens within f-strings

Performance

- Improve performance when a large directory is listed in `.gitignore`

_Blackd_

- Fix blackd (and all extras installs) for docker container
   2024-04-26 09:22:20 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.4.2

24.4.2

This is a bugfix release to fix two regressions in the new f-string parser \ 
introduced in
24.4.1.
   2024-04-25 09:23:29 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.4.1

24.4.1

Highlights

- Add support for the new Python 3.12 f-string syntax introduced by PEP 701

Stable style

- Fix crash involving indented dummy functions containing newlines

Parser

- Add support for type parameter defaults, a new syntactic feature added to \ 
Python 3.13
 by PEP 696

Integrations

- Github Action now works even when `git archive` is skipped
   2024-04-13 07:14:49 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.4.0

24.4.0

Stable style

- Fix unwanted crashes caused by AST equivalency check

Preview style

- `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

Integrations

- Add a new option `use_pyproject` to the GitHub Action `psf/black`. This will \ 
read the
  Black version from `pyproject.toml`.
   2024-03-16 18:46:08 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.3.0

24.3.0

Highlights

This release is a milestone: it fixes Black's first CVE security vulnerability. \ 
If you
run Black on untrusted input, or if you habitually put thousands of leading tab
characters in your docstrings, you are strongly encouraged to upgrade \ 
immediately to fix
[CVE-2024-21503](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21503).

This release also fixes a bug in Black's AST safety check that allowed Black to make
incorrect changes to certain f-strings that are valid in Python 3.12 and higher.

Stable style

- Don't move comments along with delimiters, which could cause crashes
- Strengthen AST safety check to catch more unsafe changes to strings. Previous \ 
versions
 of Black would incorrectly format the contents of certain unusual f-strings \ 
containing
 nested strings with the same quote type. Now, Black will crash on such strings until
 support for the new f-string syntax is implemented.
- Fix a bug where line-ranges exceeding the last code line would not work as expected

Performance

- Fix catastrophic performance on docstrings that contain large numbers of \ 
leading tab
 characters. This fixes
 [CVE-2024-21503](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21503).

Documentation

- Note what happens when `--check` is used with `--quiet`
   2024-02-13 06:06:49 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-black: updated to 24.2.0

24.2.0

Stable style

- Fixed a bug where comments where mistakenly removed along with redundant \ 
parentheses

Preview style

- Move the `hug_parens_with_braces_and_square_brackets` feature to the unstable style
 due to an outstanding crash and proposed formatting tweaks
- Fixed a bug where base expressions caused inconsistent formatting of \*\* in tenary
 expression
- Checking for newline before adding one on docstring that is almost at the line \ 
limit

- Remove redundant parentheses in `case` statement `if` guards

Configuration

- Fix issue where _Black_ would ignore input files in the presence of symlinks
- _Black_ now ignores `pyproject.toml` that is missing a `tool.black` section when
 discovering project root and configuration. Since _Black_ continues to use version
 control as an indicator of project root, this is expected to primarily change \ 
behavior
 for users in a monorepo setup (desirably). If you wish to preserve previous \ 
behavior,
 simply add an empty `[tool.black]` to the previously discovered `pyproject.toml`

Output

- Black will swallow any `SyntaxWarning`s or `DeprecationWarning`s produced by \ 
the `ast`
 module when performing equivalence checks

Integrations

- Add a JSONSchema and provide a validate-pyproject entry-point
   2024-01-28 18:25:22 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-black: updated to 24.1.1

24.1.1

Bugfix release to fix a bug that made Black unusable on certain file systems \ 
with strict
limits on path length.

Preview style

- Consistently add trailing comma on typed parameters

Configuration

- Shorten the length of the name of the cache file to fix crashes on file \ 
systems that
 do not support long paths