Skip to content

Commit 6c8b805

Browse files
committed
Run towncrier, copyedit README/docs, and bump version to 0.14.0 for release
1 parent 4f39416 commit 6c8b805

File tree

10 files changed

+60
-45
lines changed

10 files changed

+60
-45
lines changed

README.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
.. image:: https://img.shields.io/pypi/v/trio-asyncio.svg
2+
:target: https://pypi.org/project/trio-asyncio
3+
:alt: Latest PyPI version
4+
15
.. image:: https://img.shields.io/badge/chat-join%20now-blue.svg
26
:target: https://gitter.im/python-trio/general
37
:alt: Join chatroom
48

59
.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg
610
:target: https://trio-asyncio.readthedocs.io/en/latest/?badge=latest
7-
:alt: Documentation Status
8-
9-
.. image:: https://travis-ci.org/python-trio/trio-asyncio.svg?branch=master
10-
:target: https://travis-ci.org/python-trio/trio-asyncio
11-
:alt: Automated test status (Linux and MacOS)
11+
:alt: Documentation status
1212

13-
.. image:: https://ci.appveyor.com/api/projects/status/github/python-trio/trio-asyncio?svg=true;branch=master
14-
:target: https://ci.appveyor.com/project/python-trio/trio-asyncio/history
15-
:alt: Automated test status (Windows)
13+
.. image:: https://github.com/python-trio/trio-asyncio/actions/workflows/ci.yml/badge.svg
14+
:target: https://github.com/python-trio/trio-asyncio/actions/workflows/ci.yml
15+
:alt: Automated test status
1616

1717
.. image:: https://codecov.io/gh/python-trio/trio-asyncio/branch/master/graph/badge.svg
1818
:target: https://codecov.io/gh/python-trio/trio-asyncio
@@ -26,8 +26,8 @@
2626
**trio-asyncio** is a re-implementation of the ``asyncio`` mainloop on top of
2727
Trio.
2828

29-
Trio-Asyncio requires at least Python 3.7. It is tested on recent versions of
30-
3.7 through 3.11, plus 3.12-dev.
29+
trio-asyncio requires at least Python 3.8. It is tested on recent versions of
30+
3.8 through 3.12.
3131

3232
+++++++++++
3333
Rationale

docs/source/history.rst

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

66
.. towncrier release notes start
77
8+
trio-asyncio 0.14.0 (2024-02-07)
9+
--------------------------------
10+
11+
Features
12+
~~~~~~~~
13+
14+
- trio-asyncio now implements its :ref:`synchronous event loop <asyncio-loop>`
15+
(which is used when the top-level of your program is an asyncio call such as
16+
:func:`asyncio.run`, rather than a Trio call such as :func:`trio.run`)
17+
using the ``greenlet`` library rather than a separate thread. This provides
18+
some better theoretical grounding and fixes various edge cases around signal
19+
handling and other integrations; in particular, recent versions of IPython
20+
will no longer crash when importing trio-asyncio. Synchronous event loops have
21+
been un-deprecated with this change, though we still recommend using an
22+
async loop (``async with trio_asyncio.open_loop():`` from inside a Trio run)
23+
where possible. (`#137 <https://github.com/python-trio/trio-asyncio/issues/137>`__)
24+
- trio-asyncio now better respects cancellation semantics for
25+
asyncio-to-Trio transitions. The asyncio caller now will not propagate
26+
cancellation until the Trio callee actually terminates, and only if
27+
the Trio callee terminates by cancellation (rather than, for example,
28+
finishing normally because the cancel arrived too late). Additionally,
29+
we no longer immediately cancel all Trio tasks started from asyncio
30+
context if the entire :func:`open_loop` is cancelled; they only become
31+
cancelled when their asyncio caller is cancelled, or when the body of
32+
the :func:`open_loop` terminates. (`#140 <https://github.com/python-trio/trio-asyncio/issues/140>`__)
33+
34+
35+
Bugfixes
36+
~~~~~~~~
37+
38+
- trio-asyncio no longer applies a limit to the maximum number of
39+
asyncio callbacks (including new task creations) that can be enqueued
40+
near-simultaneously. Previously the default limit was 10,000. A limit
41+
may still be requested using the *queue_len* parameter to
42+
:func:`open_loop`, but this is discouraged because there is no way
43+
to fail gracefully upon exceeding the limit; it will most likely just
44+
crash your program. (`#130 <https://github.com/python-trio/trio-asyncio/issues/130>`__)
45+
- Fix an issue where a call to ``TrioEventLoop.call_exception_handler()`` after
46+
the loop was closed would attempt to call a method on ``None``. This pattern
47+
can be encountered if an ``aiohttp`` session is garbage-collected without being
48+
properly closed, for example. (`#134 <https://github.com/python-trio/trio-asyncio/issues/134>`__)
49+
50+
851
trio-asyncio 0.13.0 (2023-12-01)
952
--------------------------------
1053

docs/source/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ In such cases, you can instead keep the old approach (``get_event_loop()`` +
130130
(and not changed the asyncio event loop policy) you'll still be able to use
131131
:func:`~trio_asyncio.trio_as_aio` to run Trio code from within your
132132
asyncio-flavored functions. This is referred to internally as a "sync loop"
133-
(``SyncTripEventLoop``), as contrasted with the "async loop" that you use
133+
(``SyncTrioEventLoop``), as contrasted with the "async loop" that you use
134134
when you start from an existing Trio run. The sync loop is implemented using
135135
the ``greenlet`` library to switch out of a Trio run that has not yet completed,
136136
so it is less well-supported than the approach where you start in Trio.

newsfragments/130.bugfix.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

newsfragments/134.bugfix.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

newsfragments/137.feature.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

newsfragments/140.feature.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
code (asyncio: ~8000) but passes the complete Python 3.6 test suite with no
4444
errors.
4545
46-
``trio_asyncio`` requires Python 3.7 or better.
46+
``trio_asyncio`` requires Python 3.8 or later.
4747
4848
Author
4949
======

trio_asyncio/_base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ class BaseTrioEventLoop(asyncio.SelectorEventLoop):
108108
Arguments:
109109
queue_len:
110110
The maximum length of the internal event queue.
111-
The default is 1000. Use more for large programs,
112-
or when running benchmarks.
111+
The default of None means unlimited. A limit should be specified
112+
only if you would rather crash your program than use too
113+
much memory, because it's not feasible to enforce graceful
114+
backpressure here.
113115
"""
114116

115117
# This code implements a semi-efficient way to run asyncio code within Trio.

trio_asyncio/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This file is imported from __init__.py and exec'd from setup.py
22

3-
__version__ = "0.13.0+dev"
3+
__version__ = "0.14.0"

0 commit comments

Comments
 (0)