Sourced from black's releases.
22.8.0
Highlights
- Python 3.11 is now supported, except for blackd as aiohttp does not support 3.11 as of publishing (#3234)
- This is the last release that supports running Black on Python 3.6 (formatting 3.6 code will continue to be supported until further notice)
- Reword the stability policy to say that we may, in rare cases, make changes that affect code that was not previously formatted by Black (#3155)
Stable style
- Fix an infinite loop when using
# fmt: on/off
in the middle of an expression or code block (#3158)- Fix incorrect handling of
# fmt: skip
on colon (:
) lines (#3148)- Comments are no longer deleted when a line had spaces removed around power operators (#2874)
Preview style
- Single-character closing docstring quotes are no longer moved to their own line as this is invalid. This was a bug introduced in version 22.6.0. (#3166)
--skip-string-normalization
/-S
now prevents docstring prefixes from being normalized as expected (#3168)- When using
--skip-magic-trailing-comma
or-C
, trailing commas are stripped from subscript expressions with more than 1 element (#3209)- Implicitly concatenated strings inside a list, set, or tuple are now wrapped inside parentheses (#3162)
- Fix a string merging/split issue when a comment is present in the middle of implicitly concatenated strings on its own line (#3227)
Blackd
blackd
now supports enabling the preview style via theX-Preview
header (#3217)Configuration
- Black now uses the presence of debug f-strings to detect target version (#3215)
- Fix misdetection of project root and verbose logging of sources in cases involving
--stdin-filename
(#3216)- Immediate
.gitignore
files in source directories given on the command line are now also respected, previously only.gitignore
files in the project root and automatically discovered directories were respected (#3237)Documentation
- Recommend using BlackConnect in IntelliJ IDEs (#3150)
Integrations
- Vim plugin: prefix messages with
Black:
so it's clear they come from Black (#3194)- Docker: changed to a /opt/venv installation + added to PATH to be available to non-root users (#3202)
Output
- Change from deprecated
asyncio.get_event_loop()
to create our event loop which removes DeprecationWarning (#3164)- Remove logging from internal
blib2to3
library since it regularly emits error logs about failed caching that can and should be ignored (#3193)Parser
- Type comments are now included in the AST equivalence check consistently so accidental deletion raises an error. Though type comments can't be tracked when running on PyPy 3.7 due to standard library limitations. (#2874)
Performance
... (truncated)
Sourced from black's changelog.
22.8.0
Highlights
- Python 3.11 is now supported, except for blackd as aiohttp does not support 3.11 as of publishing (#3234)
- This is the last release that supports running Black on Python 3.6 (formatting 3.6 code will continue to be supported until further notice)
- Reword the stability policy to say that we may, in rare cases, make changes that affect code that was not previously formatted by Black (#3155)
Stable style
- Fix an infinite loop when using
# fmt: on/off
in the middle of an expression or code block (#3158)- Fix incorrect handling of
# fmt: skip
on colon (:
) lines (#3148)- Comments are no longer deleted when a line had spaces removed around power operators (#2874)
Preview style
- Single-character closing docstring quotes are no longer moved to their own line as this is invalid. This was a bug introduced in version 22.6.0. (#3166)
--skip-string-normalization
/-S
now prevents docstring prefixes from being normalized as expected (#3168)- When using
--skip-magic-trailing-comma
or-C
, trailing commas are stripped from subscript expressions with more than 1 element (#3209)- Implicitly concatenated strings inside a list, set, or tuple are now wrapped inside parentheses (#3162)
- Fix a string merging/split issue when a comment is present in the middle of implicitly concatenated strings on its own line (#3227)
Blackd
blackd
now supports enabling the preview style via theX-Preview
header (#3217)Configuration
- Black now uses the presence of debug f-strings to detect target version (#3215)
- Fix misdetection of project root and verbose logging of sources in cases involving
--stdin-filename
(#3216)- Immediate
.gitignore
files in source directories given on the command line are now also respected, previously only.gitignore
files in the project root and automatically discovered directories were respected (#3237)Documentation
- Recommend using BlackConnect in IntelliJ IDEs (#3150)
Integrations
... (truncated)
2018e66
Prepare docs for release 22.8.0 (#3248)0019261
Update stable branch after publishing to PyPI (#3223)7757078
Improve & update release process to reflect recent changes (#3242)767604e
Use .gitignore files in the initial source directories (#3237)2c90480
Use strict mypy checking (#3222)ba618a3
Add parens around implicit string concatenations where it increases readabili...c0cc19b
Delay worker count determinationafed2c0
Load .gitignore and exclude regex at time of usee269f44
Lazily import parallelized format modulesc47b91f
Fix misdetection of project root with --stdin-filename
(#3216)Sourced from jinja2's releases.
3.1.0
This is a feature release, which includes new features and removes previously deprecated features. The 3.1.x branch is now the supported bugfix branch, the 3.0.x branch has become a tag marking the end of support for that branch. We encourage everyone to upgrade, and to use a tool such as pip-tools to pin all dependencies and control upgrades. We also encourage upgrading to MarkupSafe 2.1.1, the latest version at this time.
Sourced from jinja2's changelog.
Version 3.1.0
Released 2022-03-24
Drop support for Python 3.6. :pr:
1534
Remove previously deprecated code. :pr:
1544
WithExtension
andAutoEscapeExtension
are built-in now.contextfilter
andcontextfunction
are replaced bypass_context
.evalcontextfilter
andevalcontextfunction
are replaced bypass_eval_context
.environmentfilter
andenvironmentfunction
are replaced bypass_environment
.Markup
andescape
should be imported from MarkupSafe.- Compiled templates from very old Jinja versions may need to be recompiled.
- Legacy resolve mode for
Context
subclasses is no longer supported. Overrideresolve_or_missing
instead ofresolve
.unicode_urlencode
is renamed tourl_quote
.Add support for native types in macros. :issue:
1510
The
{% trans %}
tag can usepgettext
andnpgettext
by passing a context string as the first token in the tag, like{% trans "title" %}
. :issue:1430
Update valid identifier characters from Python 3.6 to 3.7. :pr:
1571
Filters and tests decorated with
@async_variant
are pickleable. :pr:1612
Add
items
filter. :issue:1561
Subscriptions (
[0]
, etc.) can be used after filters, tests, and calls when the environment is in async mode. :issue:1573
The
groupby
filter is case-insensitive by default, matching other comparison filters. Added thecase_sensitive
parameter to control this. :issue:1463
Windows drive-relative path segments in template names will not result in
FileSystemLoader
andPackageLoader
loading from drive-relative paths. :pr:1621
Version 3.0.3
Released 2021-11-09
- Fix traceback rewriting internals for Python 3.10 and 3.11. :issue:
1535
- Fix how the native environment treats leading and trailing spaces when parsing values on Python 3.10. :pr:
1537
... (truncated)
84c0e2c
Merge pull request #1625 from pallets/release-3.1.07b0c47f
release version 3.1.0ede0f98
Merge pull request #1621 from pallets/template-safe-path040088a
use posixpath.join
when loading template namesa292075
Merge pull request #1620 from janfilips/patch-16e4df02
Fix formatting in tricks.rst3a050b1
Merge pull request #1617 from pallets/docs-prose4b63cd8
rewrite include statement sectiona98d482
clean up faq, move technical discussions9de99f8
clean up engine comparisons9d697f5
22.1.06a14491
Update README76f8934
Update test deps885df35
Min Python to 3.7a93206b
Bump poetry to 1.2.0d2eda61
Add missing commab02cf6a
CI tweaks7636eff
Update README.rst9bc662a
Added os scantdir with is't tests and improved the tests for listdir2aefa1e
Added os listdir function with it's testsThis is an experiment.
databases: off: tables: products_from_owners: title: products_from_owners* description_html: |-Description
``` The result for http://xxxx.xxx/-/metadata gives: ```json { ""title"": ""Some title"", ""description_html"": ""This is an experiment.
"", ""databases"": { ""false"": { ""tables"": { ""products_from_owners"": { ""title"": ""products_from_owners*"", ""description_html"": ""Description
"" } } } } } ``` => see the `""false""` instead of `""off""`.",107914493,issue,,,"{""url"": ""https://api.github.com/repos/simonw/datasette/issues/1798/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed 1355433619,PR_kwDOCGYnMM4-B7Mc,480,search_sql add include_rank option,7908073,closed,0,,,4,2022-08-30T09:10:29Z,2022-08-31T03:40:35Z,2022-08-31T03:40:35Z,CONTRIBUTOR,simonw/sqlite-utils/pulls/480,"I haven't tested this yet but wanted to get a heads-up whether this kind of change would be useful or if I should just duplicate the function and tweak it within my code ---- :books: Documentation preview :books:: https://sqlite-utils--480.org.readthedocs.build/en/480/ ",140912432,pull,,,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/issues/480/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",0, 1178546862,I_kwDOCGYnMM5GPzKu,420,Document how to use a `--convert` function that runs initialization code first,770231,closed,0,,,12,2022-03-23T19:07:36Z,2022-08-28T11:34:37Z,2022-03-25T20:07:33Z,NONE,,"When I have an insert command with transform like this: ``` cat items.json | jq '.data' | sqlite-utils insert listings.db listings - --convert ' d = enchant.Dict(""en_US"") row[""is_dictionary_word""] = d.check(row[""name""]) ' --import=enchant --ignore ``` I noticed as the number of rows increases the operation becomes quite slow, likely due to the creation of the `d = enchant.Dict(""en_US"")` object for each row. Is there a way to share that instance `d` between transform function calls, like a shared context?",140912432,issue,,,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/issues/420/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed 1353196970,I_kwDOCGYnMM5QqCWq,476,Release notes for 3.29,9599,closed,0,,8355157,2,2022-08-27T23:21:21Z,2022-08-28T04:07:15Z,2022-08-28T04:07:03Z,OWNER,,https://github.com/simonw/sqlite-utils/compare/3.28...104f37fa4d2e7e5999c1d829267b62c737f74d3e,140912432,issue,,,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/issues/476/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed 1348169997,I_kwDOCGYnMM5QW3EN,467,Mechanism for ensuring a table has all the columns,9599,closed,0,,8355157,13,2022-08-23T15:50:23Z,2022-08-27T23:19:41Z,2022-08-27T23:17:56Z,OWNER,,Suggested by @jefftriplett on Discord: https://discord.com/channels/823971286308356157/997738192360964156/1011655389063958600,140912432,issue,,,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/issues/467/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed 1348294436,PR_kwDOCGYnMM49qP2V,468,"db[table].create(..., transform=True) and create-table --transform",9599,closed,0,,8355157,6,2022-08-23T17:27:58Z,2022-08-27T23:17:55Z,2022-08-27T23:17:55Z,OWNER,simonw/sqlite-utils/pulls/468,"Work in progress. Still needs documentation and tests (and to cover more cases of things that might have changed). Refs: - #467 ---- :books: Documentation preview :books:: https://sqlite-utils--468.org.readthedocs.build/en/468/ ",140912432,pull,,,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/issues/468/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",0, 1353189941,I_kwDOCGYnMM5QqAo1,475,table.default_values introspection property,9599,closed,0,,8355157,1,2022-08-27T22:33:31Z,2022-08-27T22:44:46Z,2022-08-27T22:43:02Z,OWNER,,"> Interesting challenge with `default_value`: I need to be able to tell if the default values passed to `.create()` differ from those in the database already. > > Introspecting that is a bit tricky: > > ```pycon > >>> import sqlite_utils > >>> db = sqlite_utils.Database(memory=True) > >>> db[""blah""].create({""id"": int, ""name"": str}, not_null=(""name"",), defaults={""name"": ""bob""}) >