14
0
forked from pool/python-trio

- update to 0.23.1:

* Don't crash on import in Anaconda interpreters.
  * Add type hints.
  * When exiting a nursery block, the parent task always waits
    for child tasks to exit. This wait cannot be cancelled. However,
    previously, if you tried to cancel it, it *would* inject a
    `Cancelled` exception, even though it wasn't cancelled.
    Most users probably never noticed either way, but injecting a
    `Cancelled` here is not really useful, and in some rare cases
    caused confusion or problems, so Trio no longer does that.
  * If called from a thread spawned by `trio.to_thread.run_sync`,
    `trio.from_thread.run` and `trio.from_thread.run_sync` now
    reuse the task and cancellation status of the host task;
  * this means that context variables and cancel scopes naturally
    propagate 'through' threads spawned by Trio. You can also use
    `trio.from_thread.check_cancelled`
    to efficiently check for cancellation without reentering the
    Trio thread.
  * :func:`trio.lowlevel.start_guest_run` now does a bit more
    setup of the guest run before it returns to its caller,
    so that the caller can immediately make calls to
    :func:`trio.current_time`,
    :func:`trio.lowlevel.spawn_system_task`,
    :func:`trio.lowlevel.current_trio_token`, etc.
  * When a starting function raises before calling
    :func:`trio.TaskStatus.started`,
    :func:`trio.Nursery.start` will no longer wrap the exception
    in an undocumented :exc:`ExceptionGroup`.
  * To better reflect the underlying thread handling semantics,
    the keyword argument for `trio.to_thread.run_sync` that was

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-trio?expand=0&rev=39
This commit is contained in:
2023-11-07 15:09:46 +00:00
committed by Git OBS Bridge
parent bb2664b9f8
commit 1c941389e3
4 changed files with 58 additions and 22 deletions

View File

@@ -1,3 +1,40 @@
-------------------------------------------------------------------
Tue Nov 7 15:06:29 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 0.23.1:
* Don't crash on import in Anaconda interpreters.
* Add type hints.
* When exiting a nursery block, the parent task always waits
for child tasks to exit. This wait cannot be cancelled. However,
previously, if you tried to cancel it, it *would* inject a
`Cancelled` exception, even though it wasn't cancelled.
Most users probably never noticed either way, but injecting a
`Cancelled` here is not really useful, and in some rare cases
caused confusion or problems, so Trio no longer does that.
* If called from a thread spawned by `trio.to_thread.run_sync`,
`trio.from_thread.run` and `trio.from_thread.run_sync` now
reuse the task and cancellation status of the host task;
* this means that context variables and cancel scopes naturally
propagate 'through' threads spawned by Trio. You can also use
`trio.from_thread.check_cancelled`
to efficiently check for cancellation without reentering the
Trio thread.
* :func:`trio.lowlevel.start_guest_run` now does a bit more
setup of the guest run before it returns to its caller,
so that the caller can immediately make calls to
:func:`trio.current_time`,
:func:`trio.lowlevel.spawn_system_task`,
:func:`trio.lowlevel.current_trio_token`, etc.
* When a starting function raises before calling
:func:`trio.TaskStatus.started`,
:func:`trio.Nursery.start` will no longer wrap the exception
in an undocumented :exc:`ExceptionGroup`.
* To better reflect the underlying thread handling semantics,
the keyword argument for `trio.to_thread.run_sync` that was
previously called ``cancellable`` is now named
``abandon_on_cancel``.
* The old ``cancellable`` name is now deprecated.
-------------------------------------------------------------------
Tue Oct 31 15:56:49 UTC 2023 - Matej Cepl <mcepl@cepl.eu>