-
Notifications
You must be signed in to change notification settings - Fork 6.7k
chore(deps): update dependency black to v26 #13751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore(deps): update dependency black to v26 #13751
Conversation
Summary of ChangesHello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the black dependency to version 26.1.0. While updating dependencies is good practice, this change introduces a critical issue. The new version of black requires Python 3.9+, but it's being applied to environments with Python versions older than 3.9, which will cause installation failures. My review includes a suggestion to use a compatible version of black for older Python environments to resolve this issue.
| black==26.1.0; python_version < "3.9" | ||
| black==26.1.0; python_version >= "3.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This update is incorrect and will break the build for older Python versions. black version 26.1.0 requires Python 3.9 or newer. However, the changes apply this version to environments where python_version < "3.9" (e.g., Python 3.8), which will cause dependency installation to fail.
To fix this, you should continue to use a version of black that supports older Python versions for those environments. The latest version of black that supports Python 3.8 is 24.10.0.
black==24.10.0; python_version < "3.9"
black==26.1.0; python_version >= "3.9"
This PR contains the following updates:
==24.10.0→==26.1.0==24.8.0→==26.1.0Release Notes
psf/black (black)
v26.1.0Compare Source
Highlights
Introduces the 2026 stable style (#4892), stabilizing the following changes:
always_one_newline_after_import: Always force one blank line after importstatements, except when the line after the import is a comment or an import statement
(#4489)
fix_fmt_skip_in_one_liners: Fix# fmt: skipbehavior on one-liner declarations,such as
def foo(): return "mock" # fmt: skip, where previously the declaration wouldhave been incorrectly collapsed (#4800)
fix_module_docstring_detection: Fix module docstrings being treated as normalstrings if preceded by comments (#4764)
fix_type_expansion_split: Fix type expansions split in generic functions (#4777)multiline_string_handling: Make expressions involving multiline strings more compact(#1879)
normalize_cr_newlines: Add\rstyle newlines to the potential newlines tonormalize file newlines both from and to (#4710)
remove_parens_around_except_types: Remove parentheses around multiple exceptiontypes in
exceptandexcept*withoutas(#4720)remove_parens_from_assignment_lhs: Remove unnecessary parentheses from the left-handside of assignments while preserving magic trailing commas and intentional multiline
formatting (#4865)
standardize_type_comments: Format type comments which have zero or more spacesbetween
#andtype:or betweentype:and value to# type: (value)(#4645)The following change was not in any previous stable release:
_width_table.pyand added tests for the Khmer language (#4253)This release alo bumps
pathspecto v1 and fixes inconsistencies with Git's.gitignorelogic (#4958). Now, files will be ignored if a pattern matches them, evenif the parent directory is directly unignored. For example, Black would previously
format
exclude/not_this/foo.pywith this.gitignore:Now,
exclude/not_this/foo.pywill remain ignored. To ensureexclude/not_this/andall of it's children are included in formatting (and in Git), use this
.gitignore:This new behavior matches Git. The leading
*/are only necessary if you wish to ignorematching subdirectories (like the previous behavior did), and not just matching root
directories.
Output
Integrations
v25.12.0Compare Source
Highlights
Stable style
# fmt: off/# fmt: onblocks were incorrectlyremoved, particularly affecting Jupytext's
# %% [markdown]comments (#4845)# fmt: skipcomments are used in a multi-part if-clause, onstring literals, or on dictionary entries with long lines (#4872)
fmt:directives aren't on the top level (#4856)Preview style
fmt: skipskipping the line after instead of the line it's on (#4855)magic trailing commas and intentional multiline formatting (#4865)
fix_fmt_skip_in_one_linerscrashing onwithstatements (#4853)fix_fmt_skip_in_one_linerscrashing on annotated parameters (#4854)# fmt: skipon them (#4894)Packaging
Integrations
output-fileinput to GitHub Actionpsf/blackto write formatter output to afile for artifact capture and log cleanliness (#4824)
v25.11.0Compare Source
Highlights
Stable style
# fmt: offand# fmt: onwere reformatted (#4811)being normalized (#4811)
Preview style
multiline_string_handlingfrom--unstableto--preview(#4760)comments (#4764)
# type: <value>(#4645)fix_fmt_skip_in_one_linerspreview feature to respect# fmt: skipfor compoundstatements with semicolon-separated bodies (#4800)
Configuration
no_cacheoption to control caching behavior. (#4803)Packaging
Output
(#4610)
Blackd
requests to blackd (#4774)
Integrations
psf/blackto support therequired-versionmajor-version-only"stability" format when using pyproject.toml (#4770)
v25.9.0Compare Source
Highlights
await/asyncas soft keywords/variable names(#4676)
Stable style
delstatement containing tuples (#4628)withstatements (#4630)
# fmt: skipfollowed by a comment at the end of file (#4635)asclause of awithstatement (#4634)withstatement (#4646)\followed by a\rfollowed by a comment (#4663)\\r\n(#4673)await ...(where...is a literalEllipsis) (#4676)(#4670)
Preview style
# fmt: skipwould stillbe formatted (#4552)
multiline_string_handlingwith ternaries and dictionaries (#4657)string_processingwould not split f-strings directly afterexpressions (#4680)
inclause of comprehensions across lines if necessary (#4699)exceptandexcept*withoutas. (#4720)\rstyle newlines to the potential newlines to normalize file newlines both fromand to (#4710)
Parser
parameter bounds and defaults. (#4602)
Performance
Integrations
psf/blackto read Black version from an additional section inpyproject.toml:
[project.dependency-groups](#4606)Documentation
v25.1.0Compare Source
Highlights
This release introduces the new 2025 stable style (#4558), stabilizing the following
changes:
# fmt: skipcomments is no longer normalized (#4146)(#4154)
*and more complex type variable tuple (#4440)The following changes were not in any previous release:
over multiple lines first instead of type parameter definitions (#4553)
Stable style
empty lines (#4484)
withstatements containing tuple generators/unpacking(#4538)
Preview style
(#4498)
string_processingandwrap_long_dict_values_in_parensfrom removingparentheses around long dictionary values (#4377)
wrap_long_dict_values_in_parensfrom the unstable to preview style (#4561)Packaging
License-Expressionmetadata field, seePEP 639. (#4479)
Performance
is_fstring_startfunction in Black's tokenizer (#4541)Integrations
--stdin-filenameset to a force excluded path, stdin won't beformatted. (#4539)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.