Skip to content

Commit b002d9c

Browse files
committed
Merge branch '3.1.x'
2 parents a516a99 + e82013c commit b002d9c

File tree

19 files changed

+394
-199
lines changed

19 files changed

+394
-199
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
include:
24+
- {python: '3.13'}
2425
- {python: '3.12'}
2526
- {name: Windows, python: '3.12', os: windows-latest}
2627
- {name: Mac, python: '3.12', os: macos-latest}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ci:
22
autoupdate_schedule: monthly
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.4.3
5+
rev: v0.4.4
66
hooks:
77
- id: ruff
88
- id: ruff-format

CHANGES.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ Unreleased
1111
- Use ``flit_core`` instead of ``setuptools`` as build backend.
1212

1313

14+
Version 3.1.5
15+
-------------
16+
17+
Unreleased
18+
19+
- Calling sync ``render`` for an async template uses ``asyncio.run``.
20+
:pr:`1952`
21+
- Avoid unclosed ``auto_aiter`` warnings. :pr:`1960`
22+
- Return an ``aclose``-able ``AsyncGenerator`` from
23+
``Template.generate_async``. :pr:`1960`
24+
- Avoid leaving ``root_render_func()`` unclosed in
25+
``Template.generate_async``. :pr:`1960`
26+
- Avoid leaving async generators unclosed in blocks, includes and extends.
27+
:pr:`1960`
28+
29+
1430
Version 3.1.4
1531
-------------
1632

@@ -143,9 +159,8 @@ Released 2021-05-18
143159
extensions shows more relevant context. :issue:`1429`
144160
- Fixed calling deprecated ``jinja2.Markup`` without an argument.
145161
Use ``markupsafe.Markup`` instead. :issue:`1438`
146-
- Calling sync ``render`` for an async template uses ``asyncio.run``
147-
on Python >= 3.7. This fixes a deprecation that Python 3.10
148-
introduces. :issue:`1443`
162+
- Calling sync ``render`` for an async template uses ``asyncio.new_event_loop``
163+
This fixes a deprecation that Python 3.10 introduces. :issue:`1443`
149164

150165

151166
Version 3.0.0

docs/api.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,6 @@ environment to compile different code behind the scenes in order to
515515
handle async and sync code in an asyncio event loop. This has the
516516
following implications:
517517

518-
- Template rendering requires an event loop to be available to the
519-
current thread. :func:`asyncio.get_running_loop` must return an
520-
event loop.
521518
- The compiled code uses ``await`` for functions and attributes, and
522519
uses ``async for`` loops. In order to support using both async and
523520
sync functions in this context, a small wrapper is placed around

requirements/build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ build==1.2.1
88
# via -r build.in
99
packaging==24.0
1010
# via build
11-
pyproject-hooks==1.0.0
11+
pyproject-hooks==1.1.0
1212
# via build

requirements/dev.txt

Lines changed: 68 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -5,164 +5,144 @@
55
# pip-compile dev.in
66
#
77
alabaster==0.7.16
8-
# via
9-
# -r docs.txt
10-
# sphinx
11-
babel==2.14.0
12-
# via
13-
# -r docs.txt
14-
# sphinx
8+
# via sphinx
9+
attrs==23.2.0
10+
# via
11+
# outcome
12+
# trio
13+
babel==2.15.0
14+
# via sphinx
15+
build==1.2.1
16+
# via pip-tools
1517
cachetools==5.3.3
1618
# via tox
1719
certifi==2024.2.2
18-
# via
19-
# -r docs.txt
20-
# requests
20+
# via requests
2121
cfgv==3.4.0
2222
# via pre-commit
2323
chardet==5.2.0
2424
# via tox
2525
charset-normalizer==3.3.2
26+
# via requests
27+
click==8.1.7
2628
# via
27-
# -r docs.txt
28-
# requests
29+
# pip-compile-multi
30+
# pip-tools
2931
colorama==0.4.6
3032
# via tox
3133
distlib==0.3.8
3234
# via virtualenv
3335
docutils==0.21.2
34-
# via
35-
# -r docs.txt
36-
# sphinx
37-
filelock==3.13.4
36+
# via sphinx
37+
filelock==3.14.0
3838
# via
3939
# tox
4040
# virtualenv
4141
identify==2.5.36
4242
# via pre-commit
4343
idna==3.7
4444
# via
45-
# -r docs.txt
4645
# requests
46+
# trio
4747
imagesize==1.4.1
48-
# via
49-
# -r docs.txt
50-
# sphinx
48+
# via sphinx
5149
iniconfig==2.0.0
52-
# via
53-
# -r tests.txt
54-
# -r typing.txt
55-
# pytest
56-
jinja2==3.1.3
57-
# via
58-
# -r docs.txt
59-
# sphinx
50+
# via pytest
51+
jinja2==3.1.4
52+
# via sphinx
6053
markupsafe==2.1.5
61-
# via
62-
# -r docs.txt
63-
# jinja2
54+
# via jinja2
6455
mypy==1.10.0
65-
# via -r typing.txt
56+
# via -r typing.in
6657
mypy-extensions==1.0.0
67-
# via
68-
# -r typing.txt
69-
# mypy
58+
# via mypy
7059
nodeenv==1.8.0
71-
# via
72-
# -r typing.txt
73-
# pre-commit
74-
# pyright
60+
# via pre-commit
61+
outcome==1.3.0.post0
62+
# via trio
7563
packaging==24.0
7664
# via
77-
# -r docs.txt
78-
# -r tests.txt
79-
# -r typing.txt
65+
# build
8066
# pallets-sphinx-themes
8167
# pyproject-api
8268
# pytest
8369
# sphinx
8470
# tox
8571
pallets-sphinx-themes==2.1.3
86-
# via -r docs.txt
72+
# via -r docs.in
73+
pip-compile-multi==2.6.3
74+
# via -r dev.in
75+
pip-tools==7.4.1
76+
# via pip-compile-multi
8777
platformdirs==4.2.1
8878
# via
8979
# tox
9080
# virtualenv
9181
pluggy==1.5.0
9282
# via
93-
# -r tests.txt
94-
# -r typing.txt
9583
# pytest
9684
# tox
97-
pre-commit==3.7.0
85+
pre-commit==3.7.1
9886
# via -r dev.in
99-
pygments==2.17.2
100-
# via
101-
# -r docs.txt
102-
# sphinx
87+
pygments==2.18.0
88+
# via sphinx
10389
pyproject-api==1.6.1
10490
# via tox
105-
pyright==1.1.360
106-
# via -r typing.txt
107-
pytest==8.2.0
91+
pyproject-hooks==1.1.0
10892
# via
109-
# -r tests.txt
110-
# -r typing.txt
93+
# build
94+
# pip-tools
95+
pytest==8.2.0
96+
# via -r tests.in
11197
pyyaml==6.0.1
11298
# via pre-commit
11399
requests==2.31.0
114-
# via
115-
# -r docs.txt
116-
# sphinx
100+
# via sphinx
101+
sniffio==1.3.1
102+
# via trio
117103
snowballstemmer==2.2.0
118-
# via
119-
# -r docs.txt
120-
# sphinx
104+
# via sphinx
105+
sortedcontainers==2.4.0
106+
# via trio
121107
sphinx==7.3.7
122108
# via
123-
# -r docs.txt
109+
# -r docs.in
124110
# pallets-sphinx-themes
111+
# sphinx-issues
125112
# sphinxcontrib-log-cabinet
113+
sphinx-issues==4.1.0
114+
# via -r docs.in
126115
sphinxcontrib-applehelp==1.0.8
127-
# via
128-
# -r docs.txt
129-
# sphinx
116+
# via sphinx
130117
sphinxcontrib-devhelp==1.0.6
131-
# via
132-
# -r docs.txt
133-
# sphinx
118+
# via sphinx
134119
sphinxcontrib-htmlhelp==2.0.5
135-
# via
136-
# -r docs.txt
137-
# sphinx
120+
# via sphinx
138121
sphinxcontrib-jsmath==1.0.1
139-
# via
140-
# -r docs.txt
141-
# sphinx
122+
# via sphinx
142123
sphinxcontrib-log-cabinet==1.0.1
143-
# via -r docs.txt
124+
# via -r docs.in
144125
sphinxcontrib-qthelp==1.0.7
145-
# via
146-
# -r docs.txt
147-
# sphinx
126+
# via sphinx
148127
sphinxcontrib-serializinghtml==1.1.10
149-
# via
150-
# -r docs.txt
151-
# sphinx
128+
# via sphinx
129+
toposort==1.10
130+
# via pip-compile-multi
152131
tox==4.15.0
153132
# via -r dev.in
133+
trio==0.25.0
134+
# via -r tests.in
154135
typing-extensions==4.11.0
155-
# via
156-
# -r typing.txt
157-
# mypy
136+
# via mypy
158137
urllib3==2.2.1
159-
# via
160-
# -r docs.txt
161-
# requests
162-
virtualenv==20.26.0
138+
# via requests
139+
virtualenv==20.26.1
163140
# via
164141
# pre-commit
165142
# tox
143+
wheel==0.43.0
144+
# via pip-tools
166145

167146
# The following packages are considered to be unsafe in a requirements file:
147+
# pip
168148
# setuptools

requirements/docs.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
alabaster==0.7.16
88
# via sphinx
9-
babel==2.14.0
9+
babel==2.15.0
1010
# via sphinx
1111
certifi==2024.2.2
1212
# via requests
@@ -18,7 +18,7 @@ idna==3.7
1818
# via requests
1919
imagesize==1.4.1
2020
# via sphinx
21-
jinja2==3.1.3
21+
jinja2==3.1.4
2222
# via sphinx
2323
markupsafe==2.1.5
2424
# via jinja2
@@ -28,7 +28,7 @@ packaging==24.0
2828
# sphinx
2929
pallets-sphinx-themes==2.1.3
3030
# via -r docs.in
31-
pygments==2.17.2
31+
pygments==2.18.0
3232
# via sphinx
3333
requests==2.31.0
3434
# via sphinx
@@ -38,7 +38,10 @@ sphinx==7.3.7
3838
# via
3939
# -r docs.in
4040
# pallets-sphinx-themes
41+
# sphinx-issues
4142
# sphinxcontrib-log-cabinet
43+
sphinx-issues==4.1.0
44+
# via -r docs.in
4245
sphinxcontrib-applehelp==1.0.8
4346
# via sphinx
4447
sphinxcontrib-devhelp==1.0.6

requirements/tests.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pytest
2+
trio

requirements/tests.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@
44
#
55
# pip-compile tests.in
66
#
7+
attrs==23.2.0
8+
# via
9+
# outcome
10+
# trio
11+
idna==3.7
12+
# via trio
713
iniconfig==2.0.0
814
# via pytest
15+
outcome==1.3.0.post0
16+
# via trio
917
packaging==24.0
1018
# via pytest
1119
pluggy==1.5.0
1220
# via pytest
1321
pytest==8.2.0
1422
# via -r tests.in
23+
sniffio==1.3.1
24+
# via trio
25+
sortedcontainers==2.4.0
26+
# via trio
27+
trio==0.25.0
28+
# via -r tests.in

requirements/tests37.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pytest
2+
trio==0.22.2

0 commit comments

Comments
 (0)