From 7e452c2b286bd406ab956cccbc0f7a2af9e52b3de4eeb3a98a0592326da12e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Sep 2024 16:26:43 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-trio revision dd3fa087216f82fb0cd09c691aa909d4 --- _multibuild | 3 ++ python-trio.changes | 110 ++++++++++++++++++++++++++++++++++++++++++++ python-trio.spec | 78 ++++++++++++++++++------------- trio-0.22.0.tar.gz | 3 -- trio-0.25.1.tar.gz | 3 ++ 5 files changed, 161 insertions(+), 36 deletions(-) create mode 100644 _multibuild delete mode 100644 trio-0.22.0.tar.gz create mode 100644 trio-0.25.1.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..02c3432 100644 --- a/python-trio.changes +++ b/python-trio.changes @@ -1,3 +1,113 @@ +------------------------------------------------------------------- +Mon Jun 17 08:23:15 UTC 2024 - Dirk Müller + +- update to 0.25.1: + * Fix crash when importing trio in embedded Python on Windows, + and other installs that remove docstrings. + +------------------------------------------------------------------- +Fri Mar 22 09:37:15 UTC 2024 - Markéta Machová + +- Update to 0.25.0 + * New helper classes: RaisesGroup and Matcher. + * MultiError has been fully removed, and all relevant trio + functions now raise ExceptionGroups instead. + * The strict_exception_groups parameter now defaults to True + in trio.run and trio.lowlevel.start_guest_run. + * Add trio.testing.wait_all_threads_completed, which blocks + until no threads are running tasks. + * Path is now a subclass of pathlib.PurePath, allowing it to + interoperate with other standard pathlib types. + +------------------------------------------------------------------- +Thu Jan 11 10:56:14 UTC 2024 - Ben Greiner + +- We don't need isort for the tests: Avoid it for Ring1 +- Clean dependencies + +------------------------------------------------------------------- +Wed Jan 3 10:35:04 UTC 2024 - Dirk Müller + +- update to 0.23.2: + * TypeVarTuple is now used to fully type + :meth:`nursery.start_soon() `, + :func:`trio.run()`, :func:`trio.to_thread.run_sync()`, and + other similar functions accepting (func, *args). This means + type checkers will be able to verify types are used + correctly. :meth:`nursery.start() ` is + not fully typed yet however. (#2881) + * Make pyright recognize :func:`open_memory_channel` as + generic. (#2873) + backlink Unknown interpreted text role "func". + * Make pyright recognize :func:`open_memory_channel` as + generic. + * Unknown interpreted text role "func". + * Moved the metadata into PEP 621-compliant + :file:`pyproject.toml`. (#2860) + +------------------------------------------------------------------- +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 + +- 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..01c53f0 100644 --- a/python-trio.spec +++ b/python-trio.spec @@ -1,7 +1,7 @@ # # spec file for package python-trio # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,44 +16,47 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %{?sle15_python_module_pythons} -Name: python-trio -Version: 0.22.0 +Name: python-trio%{psuffix} +Version: 0.25.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 -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} -%endif -BuildRequires: %{python_module idna} -BuildRequires: %{python_module outcome} -BuildRequires: %{python_module pyOpenSSL} -BuildRequires: %{python_module pytest >= 5.0} +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} -# for protocol specifications -BuildRequires: %{python_module sniffio} -BuildRequires: %{python_module sortedcontainers} -BuildRequires: %{python_module trustme} -BuildRequires: %{python_module yapf >= 0.27.0} +BuildRequires: %{python_module wheel} 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-attrs >= 20.1.0 Requires: python-idna Requires: python-outcome -Requires: python-sniffio +Requires: python-sniffio >= 1.3.0 Requires: python-sortedcontainers BuildArch: noarch +%if 0%{?python_version_nodots} < 311 +Requires: python-exceptiongroup +%endif +%if %{with test} +BuildRequires: %{python_module astor >= 0.8} +BuildRequires: %{python_module async_generator >= 1.9} +BuildRequires: %{python_module pyOpenSSL} +BuildRequires: %{python_module pytest >= 5.0} +BuildRequires: %{python_module trio = %{version}} +BuildRequires: %{python_module trustme} +BuildRequires: %{python_module yapf >= 0.27.0} +%endif %python_subpackages %description @@ -68,29 +71,38 @@ has an obsessive focus on usability and correctness. %prep %autosetup -p1 -n trio-%{version} -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. +donttest="test_static_tool_sees_all_symbols" # test_SSLStream_generic deadlocks in OBS +donttest+=" or test_SSLStream_generic" # test_close_at_bad_time_for_send_all fails on PPC https://github.com/python-trio/trio/issues/1753 +donttest+=" or test_close_at_bad_time_for_send_all" # 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)' +donttest+=" or test_local_address_real" +# Don't run lint tests +donttest+=" or run_black or run_ruff or lint_failure or test_process" +%pytest -m 'not redistributors_should_skip' -k "not ($donttest)" --pyargs trio -p trio._tests.pytest_plugin --skip-optional-imports +%endif +%if %{without test} %files %{python_files} %doc README.rst %license LICENSE LICENSE.APACHE2 LICENSE.MIT %{python_sitelib}/trio -%{python_sitelib}/trio-%{version}*-info +%{python_sitelib}/trio-%{version}.dist-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.25.1.tar.gz b/trio-0.25.1.tar.gz new file mode 100644 index 0000000..81119cd --- /dev/null +++ b/trio-0.25.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f5314f014ea3af489e77b001861c535005c3858d38ec46b6b071ebfa339d7fb +size 553970