Skip to content

Commit 55af19e

Browse files
authored
Merge branch 'master' into sig
2 parents 18ca126 + 9d2bad1 commit 55af19e

41 files changed

Lines changed: 3420 additions & 806 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ jobs:
8888
- python: '3.8' # <- not actually used
8989
pypy_nightly_branch: 'py3.8'
9090
extra_name: ', pypy 3.8 nightly'
91+
continue-on-error: >-
92+
${{
93+
(
94+
matrix.check_formatting == '1'
95+
|| matrix.pypy_nightly_branch == 'py3.7'
96+
|| endsWith(matrix.python, '-dev')
97+
)
98+
&& true
99+
|| false
100+
}}
91101
steps:
92102
- name: Checkout
93103
uses: actions/checkout@v2
@@ -138,3 +148,21 @@ jobs:
138148
env:
139149
# Should match 'name:' up above
140150
JOB_NAME: 'macOS (${{ matrix.python }})'
151+
152+
# https://github.com/marketplace/actions/alls-green#why
153+
check: # This job does nothing and is only used for the branch protection
154+
155+
if: always()
156+
157+
needs:
158+
- Windows
159+
- Ubuntu
160+
- macOS
161+
162+
runs-on: ubuntu-latest
163+
164+
steps:
165+
- name: Decide whether the needed jobs succeeded or failed
166+
uses: re-actors/alls-green@release/v1
167+
with:
168+
jobs: ${{ toJSON(needs) }}

docs-requirements.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# RTD is currently installing 1.5.3, which has a bug in :lineno-match:
2-
sphinx >= 1.7.0
2+
# sphinx-3.4 causes warnings about some trio._abc classes: GH#2338
3+
sphinx >= 1.7.0, < 3.4
4+
# jinja2-3.1 causes importerror with sphinx<4.0
5+
jinja2 < 3.1
36
sphinx_rtd_theme
47
sphinxcontrib-trio
58
towncrier
@@ -13,6 +16,7 @@ async_generator >= 1.9
1316
idna
1417
outcome
1518
sniffio
19+
exceptiongroup >= 1.0.0rc9
1620

1721
# See note in test-requirements.in
1822
immutables >= 0.6

docs-requirements.txt

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.7
33
# To update, run:
44
#
5-
# pip-compile --output-file docs-requirements.txt docs-requirements.in
5+
# pip-compile docs-requirements.in
66
#
77
alabaster==0.7.12
88
# via sphinx
99
async-generator==1.10
1010
# via -r docs-requirements.in
11-
attrs==21.4.0
11+
attrs==22.1.0
1212
# via
1313
# -r docs-requirements.in
1414
# outcome
15-
babel==2.9.1
15+
babel==2.11.0
1616
# via sphinx
17-
certifi==2022.5.18.1
17+
certifi==2022.9.24
1818
# via requests
19-
charset-normalizer==2.0.12
19+
charset-normalizer==2.1.1
2020
# via requests
2121
click==8.1.3
2222
# via
@@ -28,35 +28,38 @@ docutils==0.17.1
2828
# via
2929
# sphinx
3030
# sphinx-rtd-theme
31-
idna==3.3
31+
exceptiongroup==1.0.1
32+
# via -r docs-requirements.in
33+
idna==3.4
3234
# via
3335
# -r docs-requirements.in
3436
# requests
35-
imagesize==1.3.0
37+
imagesize==1.4.1
3638
# via sphinx
37-
immutables==0.18
39+
immutables==0.19
3840
# via -r docs-requirements.in
39-
incremental==21.3.0
41+
incremental==22.10.0
4042
# via towncrier
4143
jinja2==3.0.3
4244
# via
45+
# -r docs-requirements.in
4346
# sphinx
4447
# towncrier
4548
markupsafe==2.1.1
4649
# via jinja2
47-
outcome==1.1.0
50+
outcome==1.2.0
4851
# via -r docs-requirements.in
4952
packaging==21.3
5053
# via sphinx
51-
pygments==2.10.0
54+
pygments==2.12.0
5255
# via sphinx
5356
pyparsing==3.0.9
5457
# via packaging
55-
pytz==2022.1
58+
pytz==2022.4
5659
# via babel
57-
requests==2.27.1
60+
requests==2.28.1
5861
# via sphinx
59-
sniffio==1.2.0
62+
sniffio==1.3.0
6063
# via -r docs-requirements.in
6164
snowballstemmer==2.2.0
6265
# via sphinx
@@ -67,7 +70,7 @@ sphinx==3.3.1
6770
# -r docs-requirements.in
6871
# sphinx-rtd-theme
6972
# sphinxcontrib-trio
70-
sphinx-rtd-theme==1.0.0
73+
sphinx-rtd-theme==1.1.1
7174
# via -r docs-requirements.in
7275
sphinxcontrib-applehelp==1.0.2
7376
# via sphinx
@@ -85,7 +88,10 @@ sphinxcontrib-trio==1.1.2
8588
# via -r docs-requirements.in
8689
tomli==2.0.1
8790
# via towncrier
88-
towncrier==21.9.0
91+
towncrier==22.8.0
8992
# via -r docs-requirements.in
90-
urllib3==1.26.9
93+
urllib3==1.26.12
9194
# via requests
95+
96+
# The following packages are considered to be unsafe in a requirements file:
97+
# setuptools

docs/source/code-of-conduct.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Examples of unacceptable behavior by participants include:
7878
electronic address, without explicit permission. This includes any
7979
sort of "outing" of any aspect of someone's identity without their
8080
consent.
81-
- Publishing private screenshots or quotes of interactions in the
81+
- Publishing screenshots or quotes of private interactions in the
8282
context of this project without all quoted users' *explicit* consent.
8383
- Publishing of private communication that doesn't have to do with
8484
reporting harassment.

docs/source/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ def setup(app):
8484
'local_customization',
8585
]
8686

87+
# FIXME: change the "python" link back to /3 when Python 3.11 is released
8788
intersphinx_mapping = {
88-
"python": ('https://docs.python.org/3', None),
89+
"python": ('https://docs.python.org/3.11', None),
8990
"outcome": ('https://outcome.readthedocs.io/en/latest/', None),
91+
"pyopenssl": ('https://www.pyopenssl.org/en/stable/', None),
9092
}
9193

9294
autodoc_member_order = "bysource"

docs/source/design.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -461,15 +461,9 @@ of our public APIs without having to modify Trio internals.
461461
Inside ``trio._core``
462462
~~~~~~~~~~~~~~~~~~~~~
463463

464-
There are two notable sub-modules that are largely independent of
465-
the rest of Trio, and could (possibly should?) be extracted into their
466-
own independent packages:
467-
468-
* ``_multierror.py``: Implements :class:`MultiError` and associated
469-
infrastructure.
470-
471-
* ``_ki.py``: Implements the core infrastructure for safe handling of
472-
:class:`KeyboardInterrupt`.
464+
The ``_ki.py`` module implements the core infrastructure for safe handling
465+
of :class:`KeyboardInterrupt`. It's largely independent of the rest of Trio,
466+
and could (possibly should?) be extracted into its own independent package.
473467

474468
The most important submodule, where everything is integrated, is
475469
``_run.py``. (This is also by far the largest submodule; it'd be nice

docs/source/history.rst

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,54 @@ Release history
55

66
.. towncrier release notes start
77
8+
Trio 0.22.0 (2022-09-28)
9+
------------------------
10+
11+
Headline features
12+
~~~~~~~~~~~~~~~~~
13+
14+
- ``MultiError`` has been deprecated in favor of the standard :exc:`BaseExceptionGroup`
15+
(introduced in :pep:`654`). On Python versions below 3.11, this exception and its
16+
derivative :exc:`ExceptionGroup` are provided by the backport_. Trio still raises
17+
``MultiError``, but it has been refactored into a subclass of :exc:`BaseExceptionGroup`
18+
which users should catch instead of ``MultiError``. Uses of the ``MultiError.filter()``
19+
class method should be replaced with :meth:`BaseExceptionGroup.split`. Uses of the
20+
``MultiError.catch()`` class method should be replaced with either ``except*`` clauses
21+
(on Python 3.11+) or the ``exceptiongroup.catch()`` context manager provided by the
22+
backport_.
23+
24+
See the :ref:`updated documentation <exceptiongroups>` for details.
25+
(`#2211 <https://github.com/python-trio/trio/issues/2211>`__)
26+
27+
.. _backport: https://pypi.org/project/exceptiongroup/
28+
29+
30+
Features
31+
~~~~~~~~
32+
33+
- Added support for `Datagram TLS
34+
<https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security>`__,
35+
for secure communication over UDP. Currently requires `PyOpenSSL
36+
<https://pypi.org/p/pyopenssl>`__. (`#2010 <https://github.com/python-trio/trio/issues/2010>`__)
37+
38+
39+
Trio 0.21.0 (2022-06-07)
40+
----------------------------
41+
42+
Features
43+
~~~~~~~~
44+
45+
- Trio now supports Python 3.11. (`#2270
46+
<https://github.com/python-trio/trio/issues/2270>`__, `#2318
47+
<https://github.com/python-trio/trio/issues/2318>`__, `#2319
48+
<https://github.com/python-trio/trio/issues/2319>`__)
49+
50+
Deprecations and Removals
51+
~~~~~~~~~~~~~~~~~~~~~~~~~
52+
53+
- Remove support for Python 3.6. (`#2210 <https://github.com/python-trio/trio/issues/2210>`__)
54+
55+
856
Trio 0.20.0 (2022-02-21)
957
------------------------
1058

@@ -31,8 +79,8 @@ Features
3179
Bugfixes
3280
~~~~~~~~
3381

34-
- Trio now avoids creating cyclic garbage when a `MultiError` is generated and filtered,
35-
including invisibly within the cancellation system. This means errors raised
82+
- Trio now avoids creating cyclic garbage when a ``MultiError`` is generated and
83+
filtered, including invisibly within the cancellation system. This means errors raised
3684
through nurseries and cancel scopes should result in less GC latency. (`#2063 <https://github.com/python-trio/trio/issues/2063>`__)
3785
- Trio now deterministically cleans up file descriptors that were opened before
3886
subprocess creation fails. Previously, they would remain open until the next run of
@@ -271,9 +319,9 @@ Bugfixes
271319
- On Ubuntu systems, the system Python includes a custom
272320
unhandled-exception hook to perform `crash reporting
273321
<https://wiki.ubuntu.com/Apport>`__. Unfortunately, Trio wants to use
274-
the same hook to print nice `MultiError` tracebacks, causing a
322+
the same hook to print nice ``MultiError`` tracebacks, causing a
275323
conflict. Previously, Trio would detect the conflict, print a warning,
276-
and you just wouldn't get nice `MultiError` tracebacks. Now, Trio has
324+
and you just wouldn't get nice ``MultiError`` tracebacks. Now, Trio has
277325
gotten clever enough to integrate its hook with Ubuntu's, so the two
278326
systems should Just Work together. (`#1065 <https://github.com/python-trio/trio/issues/1065>`__)
279327
- Fixed an over-strict test that caused failures on Alpine Linux.
@@ -475,7 +523,7 @@ Features
475523
violated. (One common source of such violations is an async generator
476524
that yields within a cancel scope.) The previous behavior was an
477525
inscrutable chain of TrioInternalErrors. (`#882 <https://github.com/python-trio/trio/issues/882>`__)
478-
- MultiError now defines its ``exceptions`` attribute in ``__init__()``
526+
- ``MultiError`` now defines its ``exceptions`` attribute in ``__init__()``
479527
to better support linters and code autocompletion. (`#1066 <https://github.com/python-trio/trio/issues/1066>`__)
480528
- Use ``__slots__`` in more places internally, which should make Trio slightly faster. (`#984 <https://github.com/python-trio/trio/issues/984>`__)
481529

@@ -496,7 +544,7 @@ Bugfixes
496544
:meth:`~trio.Path.cwd`, are now async functions. Previously, a bug
497545
in the forwarding logic meant :meth:`~trio.Path.cwd` was synchronous
498546
and :meth:`~trio.Path.home` didn't work at all. (`#960 <https://github.com/python-trio/trio/issues/960>`__)
499-
- An exception encapsulated within a :class:`MultiError` doesn't need to be
547+
- An exception encapsulated within a ``MultiError`` doesn't need to be
500548
hashable anymore.
501549

502550
.. note::
@@ -1287,7 +1335,7 @@ Other changes
12871335
interfering with direct use of
12881336
:func:`~trio.testing.wait_all_tasks_blocked` in the same test.
12891337

1290-
* :meth:`MultiError.catch` now correctly preserves ``__context__``,
1338+
* ``MultiError.catch()`` now correctly preserves ``__context__``,
12911339
despite Python's best attempts to stop us (`#165
12921340
<https://github.com/python-trio/trio/issues/165>`__)
12931341

0 commit comments

Comments
 (0)