From bb2664b9f81904dc2a91a4050643c84884a5b7a431e603a31589b3fa5b5bf1e7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 31 Oct 2023 16:23:38 +0000 Subject: [PATCH] - Update to 0.22.2: * Fix PermissionError when importing trio due to trying to access pthread. * Breaking change: Timeout functions now raise ValueError if passed math.nan. This includes trio.sleep, trio.sleep_until, trio.move_on_at, trio.move_on_after, trio.fail_at and trio.fail_after. * Added support for naming threads created with trio.to_thread.run_sync, requires pthreads so is only available on POSIX platforms with glibc installed. * trio.socket.socket now prints the address it tried to connect to upon failure. * Fixed a crash that can occur when running Trio within an embedded Python interpreter, by handling the TypeError that is raised when trying to (re-)install a C signal handler. * Fix sniffio.current_async_library() when Trio tasks are spawned from a non-Trio context (such as when using trio-asyncio). Previously, a regular Trio task would inherit the non-Trio library name, and spawning a system task would cause the non-Trio caller to start thinking it was Trio. * Documented that Nursery.start_soon does not guarantee task ordering. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-trio?expand=0&rev=38 --- _multibuild | 3 +++ python-trio.changes | 26 ++++++++++++++++++++++++++ python-trio.spec | 44 +++++++++++++++++++++++++++++--------------- trio-0.22.0.tar.gz | 3 --- trio-0.22.2.tar.gz | 3 +++ 5 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 _multibuild delete mode 100644 trio-0.22.0.tar.gz create mode 100644 trio-0.22.2.tar.gz diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-trio.changes b/python-trio.changes index 6148e92..d9a1ceb 100644 --- a/python-trio.changes +++ b/python-trio.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Tue Oct 31 15:56:49 UTC 2023 - Matej Cepl + +- Update to 0.22.2: + * Fix PermissionError when importing trio due to trying to + access pthread. + * Breaking change: Timeout functions now raise ValueError if + passed math.nan. This includes trio.sleep, trio.sleep_until, + trio.move_on_at, trio.move_on_after, trio.fail_at and + trio.fail_after. + * Added support for naming threads created with + trio.to_thread.run_sync, requires pthreads so is only + available on POSIX platforms with glibc installed. + * trio.socket.socket now prints the address it tried to connect + to upon failure. + * Fixed a crash that can occur when running Trio within an + embedded Python interpreter, by handling the TypeError that + is raised when trying to (re-)install a C signal handler. + * Fix sniffio.current_async_library() when Trio tasks are + spawned from a non-Trio context (such as when using + trio-asyncio). Previously, a regular Trio task would inherit + the non-Trio library name, and spawning a system task would + cause the non-Trio caller to start thinking it was Trio. + * Documented that Nursery.start_soon does not guarantee task + ordering. + ------------------------------------------------------------------- Tue Sep 19 14:51:16 UTC 2023 - Dirk Müller diff --git a/python-trio.spec b/python-trio.spec index 6648c53..2cdeec1 100644 --- a/python-trio.spec +++ b/python-trio.spec @@ -1,5 +1,5 @@ # -# spec file for package python-trio +# spec file # # Copyright (c) 2023 SUSE LLC # @@ -17,16 +17,29 @@ %{?sle15_python_module_pythons} -Name: python-trio -Version: 0.22.0 +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-trio%{psuffix} +Version: 0.22.2 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} +%if %{with test} BuildRequires: %{python_module astor >= 0.8} BuildRequires: %{python_module async_generator >= 1.9} -BuildRequires: %{python_module attrs >= 19.2.0} BuildRequires: %{python_module base >= 3.7} %if 0%{?suse_version} > 1500 BuildRequires: %{python_module exceptiongroup >= 1.0.0~rc9 if %python-base < 3.11} @@ -35,25 +48,22 @@ BuildRequires: %{python_module idna} BuildRequires: %{python_module outcome} BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pytest >= 5.0} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module trio = %{version}} # for protocol specifications BuildRequires: %{python_module sniffio} -BuildRequires: %{python_module sortedcontainers} BuildRequires: %{python_module trustme} BuildRequires: %{python_module yapf >= 0.27.0} +%endif BuildRequires: fdupes BuildRequires: netcfg BuildRequires: python-rpm-macros Requires: python-async_generator >= 1.9 Requires: python-attrs >= 19.2.0 -%if 0%{?python_version_nodots} < 311 -Requires: python-exceptiongroup >= 1.0.0~rc9 -%endif Requires: python-idna Requires: python-outcome Requires: python-sniffio Requires: python-sortedcontainers -BuildArch: noarch +Requires: (python-exceptiongroup if python-base < 3.11) %python_subpackages %description @@ -71,26 +81,30 @@ has an obsessive focus on usability and correctness. sed -i '1{/^#!/d}' trio/_tools/gen_exports.py %build -%python_build +%pyproject_wheel %install -%python_install -%{python_expand rm -r %{buildroot}%{$python_sitelib}/trio/{,_core/}tests/ -%fdupes %{buildroot}%{$python_sitelib} -} +%if %{without test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} # test_static_tool_sees_all_symbols uses jedi/pylint for static analysis, # pointless for us. # test_SSLStream_generic deadlocks in OBS # test_close_at_bad_time_for_send_all fails on PPC https://github.com/python-trio/trio/issues/1753 # test_local_address_real fails on qemu_linux_user targets %pytest -k 'not (test_static_tool_sees_all_symbols or test_SSLStream_generic or test_close_at_bad_time_for_send_all or test_local_address_real)' +%endif +%if %{without test} %files %{python_files} %doc README.rst %license LICENSE LICENSE.APACHE2 LICENSE.MIT %{python_sitelib}/trio %{python_sitelib}/trio-%{version}*-info +%endif %changelog diff --git a/trio-0.22.0.tar.gz b/trio-0.22.0.tar.gz deleted file mode 100644 index 1a949a5..0000000 --- a/trio-0.22.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce68f1c5400a47b137c5a4de72c7c901bd4e7a24fbdebfe9b41de8c6c04eaacf -size 472205 diff --git a/trio-0.22.2.tar.gz b/trio-0.22.2.tar.gz new file mode 100644 index 0000000..221b038 --- /dev/null +++ b/trio-0.22.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3887cf18c8bcc894433420305468388dac76932e9668afa1c49aa3806b6accb3 +size 487602