Sync from SUSE:SLFO:Main python-trio revision dd3fa087216f82fb0cd09c691aa909d4

This commit is contained in:
Adrian Schröter 2024-09-13 16:26:43 +02:00
parent bcc73518c3
commit 7e452c2b28
5 changed files with 161 additions and 36 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,113 @@
-------------------------------------------------------------------
Mon Jun 17 08:23:15 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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á <mmachova@suse.com>
- 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 <code@bnavigator.de>
- 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 <dmueller@suse.com>
- update to 0.23.2:
* TypeVarTuple is now used to fully type
:meth:`nursery.start_soon() <trio.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() <trio.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 <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>
- 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 <dmueller@suse.com>

View File

@ -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

BIN
trio-0.22.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
trio-0.25.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.