From 1c941389e3b41bf5d66f4989b43f55b8fa3c06d238bab04c64b0aea92a796dc0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 7 Nov 2023 15:09:46 +0000 Subject: [PATCH] - 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 --- python-trio.changes | 37 +++++++++++++++++++++++++++++++++++++ python-trio.spec | 37 ++++++++++++++++++------------------- trio-0.22.2.tar.gz | 3 --- trio-0.23.1.tar.gz | 3 +++ 4 files changed, 58 insertions(+), 22 deletions(-) delete mode 100644 trio-0.22.2.tar.gz create mode 100644 trio-0.23.1.tar.gz diff --git a/python-trio.changes b/python-trio.changes index d9a1ceb..fd5ab89 100644 --- a/python-trio.changes +++ b/python-trio.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Tue Nov 7 15:06:29 UTC 2023 - Dirk Müller + +- 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 diff --git a/python-trio.spec b/python-trio.spec index 2cdeec1..84ea27c 100644 --- a/python-trio.spec +++ b/python-trio.spec @@ -16,7 +16,6 @@ # -%{?sle15_python_module_pythons} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -25,45 +24,45 @@ %define psuffix %{nil} %bcond_with test %endif +%{?sle15_python_module_pythons} Name: python-trio%{psuffix} -Version: 0.22.2 +Version: 0.23.1 Release: 0 Summary: Python async/await-native I/O library License: Apache-2.0 OR MIT URL: https://github.com/python-trio/trio Source: https://files.pythonhosted.org/packages/source/t/trio/trio-%{version}.tar.gz -BuildArch: noarch BuildRequires: %{python_module attrs >= 20.1.0} BuildRequires: %{python_module pip} BuildRequires: %{python_module sortedcontainers} BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: netcfg +BuildRequires: python-rpm-macros +Requires: python-attrs >= 19.2.0 +Requires: python-idna +Requires: python-outcome +Requires: python-sniffio >= 1.3.0 +Requires: python-sortedcontainers +Requires: (python-exceptiongroup if python-base < 3.11) +BuildArch: noarch %if %{with test} BuildRequires: %{python_module astor >= 0.8} BuildRequires: %{python_module async_generator >= 1.9} -BuildRequires: %{python_module base >= 3.7} -%if 0%{?suse_version} > 1500 -BuildRequires: %{python_module exceptiongroup >= 1.0.0~rc9 if %python-base < 3.11} -%endif +BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module idna} BuildRequires: %{python_module outcome} BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pytest >= 5.0} -BuildRequires: %{python_module trio = %{version}} # for protocol specifications -BuildRequires: %{python_module sniffio} +BuildRequires: %{python_module sniffio >= 1.3.0} +BuildRequires: %{python_module trio = %{version}} BuildRequires: %{python_module trustme} BuildRequires: %{python_module yapf >= 0.27.0} +%if 0%{?suse_version} > 1500 +BuildRequires: %{python_module exceptiongroup >= 1.0.0~rc9 if %{python}-base < 3.11} +%endif %endif -BuildRequires: fdupes -BuildRequires: netcfg -BuildRequires: python-rpm-macros -Requires: python-async_generator >= 1.9 -Requires: python-attrs >= 19.2.0 -Requires: python-idna -Requires: python-outcome -Requires: python-sniffio -Requires: python-sortedcontainers -Requires: (python-exceptiongroup if python-base < 3.11) %python_subpackages %description diff --git a/trio-0.22.2.tar.gz b/trio-0.22.2.tar.gz deleted file mode 100644 index 221b038..0000000 --- a/trio-0.22.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3887cf18c8bcc894433420305468388dac76932e9668afa1c49aa3806b6accb3 -size 487602 diff --git a/trio-0.23.1.tar.gz b/trio-0.23.1.tar.gz new file mode 100644 index 0000000..13170fa --- /dev/null +++ b/trio-0.23.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16f89f7dcc8f7b9dcdec1fcd863e0c039af6d0f9a22f8dfd56f75d75ec73fd48 +size 535860