Skip to content

Commit e5e17ef

Browse files
committed
Bump version to 0.28.0
1 parent 8a28c55 commit e5e17ef

14 files changed

+66
-43
lines changed

docs/source/history.rst

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

66
.. towncrier release notes start
77
8+
Trio 0.28.0 (2024-12-25)
9+
------------------------
10+
11+
Bugfixes
12+
~~~~~~~~
13+
14+
- :func:`inspect.iscoroutinefunction` and the like now give correct answers when
15+
called on KI-protected functions. (`#2670 <https://github.com/python-trio/trio/issues/2670>`__)
16+
- Rework KeyboardInterrupt protection to track code objects, rather than frames,
17+
as protected or not. The new implementation no longer needs to access
18+
``frame.f_locals`` dictionaries, so it won't artificially extend the lifetime of
19+
local variables. Since KeyboardInterrupt protection is now imposed statically
20+
(when a protected function is defined) rather than each time the function runs,
21+
its previously-noticeable performance overhead should now be near zero.
22+
The lack of a call-time wrapper has some other benefits as well:
23+
24+
* :func:`inspect.iscoroutinefunction` and the like now give correct answers when
25+
called on KI-protected functions.
26+
27+
* Calling a synchronous KI-protected function no longer pushes an additional stack
28+
frame, so tracebacks are clearer.
29+
30+
* A synchronous KI-protected function invoked from C code (such as a weakref
31+
finalizer) is now guaranteed to start executing; previously there would be a brief
32+
window in which KeyboardInterrupt could be raised before the protection was
33+
established.
34+
35+
One minor drawback of the new approach is that multiple instances of the same
36+
closure share a single KeyboardInterrupt protection state (because they share a
37+
single code object). That means that if you apply
38+
`@enable_ki_protection <trio.lowlevel.enable_ki_protection>` to some of them
39+
and not others, you won't get the protection semantics you asked for. See the
40+
documentation of `@enable_ki_protection <trio.lowlevel.enable_ki_protection>`
41+
for more details and a workaround. (`#3108 <https://github.com/python-trio/trio/issues/3108>`__)
42+
- Rework foreign async generator finalization to track async generator
43+
ids rather than mutating ``ag_frame.f_locals``. This fixes an issue
44+
with the previous implementation: locals' lifetimes will no longer be
45+
extended by materialization in the ``ag_frame.f_locals`` dictionary that
46+
the previous finalization dispatcher logic needed to access to do its work. (`#3112 <https://github.com/python-trio/trio/issues/3112>`__)
47+
- Ensure that Pyright recognizes our underscore prefixed attributes for attrs classes. (`#3114 <https://github.com/python-trio/trio/issues/3114>`__)
48+
- Fix `trio.testing.RaisesGroup`'s typing. (`#3141 <https://github.com/python-trio/trio/issues/3141>`__)
49+
50+
51+
Improved documentation
52+
~~~~~~~~~~~~~~~~~~~~~~
53+
54+
- Improve error message when run after gevent's monkey patching. (`#3087 <https://github.com/python-trio/trio/issues/3087>`__)
55+
- Document that :func:`trio.sleep_forever` is guaranteed to raise an exception now. (`#3113 <https://github.com/python-trio/trio/issues/3113>`__)
56+
57+
58+
Removals without deprecations
59+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60+
61+
- Remove workaround for OpenSSL 1.1.1 DTLS ClientHello bug. (`#3097 <https://github.com/python-trio/trio/issues/3097>`__)
62+
- Drop support for Python 3.8. (`#3104 <https://github.com/python-trio/trio/issues/3104>`__) (`#3106 <https://github.com/python-trio/trio/issues/3106>`__)
63+
64+
65+
Miscellaneous internal changes
66+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67+
68+
- Switch to using PEP570 for positional-only arguments for `~trio.socket.SocketType`'s methods. (`#3094 <https://github.com/python-trio/trio/issues/3094>`__)
69+
- Improve type annotations in several places by removing `Any` usage. (`#3121 <https://github.com/python-trio/trio/issues/3121>`__)
70+
- Get and enforce 100% coverage (`#3159 <https://github.com/python-trio/trio/issues/3159>`__)
71+
72+
873
Trio 0.27.0 (2024-10-17)
974
------------------------
1075

newsfragments/2670.bugfix.rst

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

newsfragments/3087.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3094.misc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3097.removal.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3106.removal.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3108.bugfix.rst

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

newsfragments/3112.bugfix.rst

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

newsfragments/3113.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3114.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3121.misc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3141.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/3159.misc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/trio/_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 parsed by setuptools
22

3-
__version__ = "0.27.0+dev"
3+
__version__ = "0.28.0"

0 commit comments

Comments
 (0)