🌐 AI搜索 & 代理 主页
Skip to content

Commit 7ef6f09

Browse files
committed
Release 0.16.0
1 parent ffb1b12 commit 7ef6f09

File tree

10 files changed

+63
-35
lines changed

10 files changed

+63
-35
lines changed

docs/source/history.rst

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

66
.. towncrier release notes start
77
8+
Trio 0.16.0 (2020-06-10)
9+
------------------------
10+
11+
Headline features
12+
~~~~~~~~~~~~~~~~~
13+
14+
- If you want to use Trio, but are stuck with some other event loop like
15+
Qt or PyGame, then good news: now you can have both. For details, see:
16+
:ref:`guest-mode`. (`#399 <https://github.com/python-trio/trio/issues/399>`__)
17+
18+
19+
Features
20+
~~~~~~~~
21+
22+
- To speed up `trio.to_thread.run_sync`, Trio now caches and re-uses
23+
worker threads.
24+
25+
And in case you have some exotic use case where you need to spawn
26+
threads manually, but want to take advantage of Trio's cache, you can
27+
do that using the new `trio.lowlevel.start_thread_soon`. (`#6 <https://github.com/python-trio/trio/issues/6>`__)
28+
- Tasks spawned with `nursery.start() <trio.Nursery.start>` aren't treated as
29+
direct children of their nursery until they call ``task_status.started()``.
30+
This is visible through the task tree introspection attributes such as
31+
`Task.parent_nursery <trio.lowlevel.Task.parent_nursery>`. Sometimes, though,
32+
you want to know where the task is going to wind up, even if it hasn't finished
33+
initializing yet. To support this, we added a new attribute
34+
`Task.eventual_parent_nursery <trio.lowlevel.Task.eventual_parent_nursery>`.
35+
For a task spawned with :meth:`~trio.Nursery.start` that hasn't yet called
36+
``started()``, this is the nursery that the task was nominally started in,
37+
where it will be running once it finishes starting up. In all other cases,
38+
it is ``None``. (`#1558 <https://github.com/python-trio/trio/issues/1558>`__)
39+
40+
41+
Bugfixes
42+
~~~~~~~~
43+
44+
- Added a helpful error message if an async function is passed to `trio.to_thread.run_sync`. (`#1573 <https://github.com/python-trio/trio/issues/1573>`__)
45+
46+
47+
Deprecations and removals
48+
~~~~~~~~~~~~~~~~~~~~~~~~~
49+
50+
- Remove ``BlockingTrioPortal``: it was deprecated in 0.12.0. (`#1574 <https://github.com/python-trio/trio/issues/1574>`__)
51+
- The ``tiebreaker`` argument to `trio.testing.wait_all_tasks_blocked`
52+
has been deprecated. This is a highly obscure feature that was
53+
probably never used by anyone except `trio.testing.MockClock`, and
54+
`~trio.testing.MockClock` doesn't need it anymore. (`#1587 <https://github.com/python-trio/trio/issues/1587>`__)
55+
- Remove the deprecated ``trio.ssl`` and ``trio.subprocess`` modules. (`#1594 <https://github.com/python-trio/trio/issues/1594>`__)
56+
57+
58+
Miscellaneous internal changes
59+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60+
61+
- We refactored `trio.testing.MockClock` so that it no longer needs to
62+
run an internal task to manage autojumping. This should be mostly
63+
invisible to users, but there is one semantic change: the interaction
64+
between `trio.testing.wait_all_tasks_blocked` and the autojump clock
65+
was fixed. Now, the autojump will always wait until after all
66+
`~trio.testing.wait_all_tasks_blocked` calls have finished before
67+
firing, instead of it depending on which threshold values you passed. (`#1587 <https://github.com/python-trio/trio/issues/1587>`__)
68+
69+
870
Trio 0.15.1 (2020-05-22)
971
------------------------
1072

newsfragments/1558.feature.rst

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

newsfragments/1573.bugfix.rst

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

newsfragments/1574.deprecated.rst

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

newsfragments/1587.deprecated.rst

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

newsfragments/1587.misc.rst

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

newsfragments/1594.deprecated.rst

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

newsfragments/399.headline.rst

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

newsfragments/6.feature.rst

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

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 exec'd from setup.py
22

3-
__version__ = "0.15.1+dev"
3+
__version__ = "0.16.0"

0 commit comments

Comments
 (0)