SHA256
1
0
forked from pool/python-trio

Accepting request 940542 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/940542
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-trio?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2021-12-16 20:18:53 +00:00 committed by Git OBS Bridge
commit 7d35b48c3c
5 changed files with 96 additions and 16 deletions

View File

@ -1,3 +1,48 @@
-------------------------------------------------------------------
Sun Dec 12 18:53:24 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 0.19.0
* Trio now supports Python 3.10. (#1921)
* Use slots for `~.lowlevel.Task` which should make them slightly
smaller and faster. (#1927)
* Make `~.Event` more lightweight by using less objects (about 2
rather than 5, including a nested ParkingLot and attribute
dicts) and simpler structures (set rather than OrderedDict).
This may benefit applications that create a large number of
event instances, such as with the "replace event object on
every set()" idiom. (#1948)
* The event loop now holds on to references of coroutine frames
for only the minimum necessary period of time. (#1864)
* The `~.lowlevel.TrioToken` class can now be used as a target of
a weak reference. (#1924)
- Release 0.18.0
* Add synchronous .close() methods and context manager (with x)
support for .MemorySendChannel and .MemoryReceiveChannel.
(#1797)
* Previously, on Windows, Trio programs using thousands of
sockets at the same time could trigger extreme slowdowns in the
Windows kernel. Now, Trio works around this issue, so you
should be able to use as many sockets as you want. (#1280)
* `trio.from_thread.run` no longer crashes the Trio run if it is
executed after the system nursery has been closed but before
the run has finished. Calls made at this time will now raise
trio.RunFinishedError. This fixes a regression introduced in
Trio 0.17.0. The window in question is only one scheduler tick
long in most cases, but may be longer if async generators need
to be cleaned up. (#1738)
* Fix a crash in pypy-3.7 (#1765)
* Trio now avoids creating cyclic garbage as often. This should
have a minimal impact on most programs, but can slightly reduce
how often the cycle collector GC runs on CPython, which can
reduce latency spikes. (#1770)
* Remove deprecated max_refill_bytes from `SSLStream`. (#959)
* Remove the deprecated tiebreaker argument to
trio.testing.wait_all_tasks_blocked. (#1558)
* Remove the deprecated trio.hazmat module. (#1722)
* Stop allowing subclassing public classes. This behavior was
deprecated in 0.15.0. (#1726)
- Add trio-pr2043-py310ssl-deprecationwarnings.patch
-------------------------------------------------------------------
Fri Jan 8 15:30:04 UTC 2021 - Markéta Machová <mmachova@suse.com>

View File

@ -16,15 +16,17 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-trio
Version: 0.17.0
Version: 0.19.0
Release: 0
Summary: Python async/await-native I/O library
License: MIT OR Apache-2.0
License: Apache-2.0 OR MIT
URL: https://github.com/python-trio/trio
Source: https://github.com/python-trio/trio/archive/v%{version}.tar.gz#/trio-%{version}.tar.gz
#PATCH-FIX-UPSTREAM trio-pr2043-py310ssl-deprecationwarnings.patch -- gh#python-trio/trio#2043
Patch0: https://github.com/python-trio/trio/pull/2043.patch#/trio-pr2043-py310ssl-deprecationwarnings.patch
BuildRequires: %{python_module astor >= 0.8}
BuildRequires: %{python_module async_generator >= 1.9}
BuildRequires: %{python_module attrs >= 19.2.0}
@ -36,6 +38,7 @@ BuildRequires: %{python_module pytest >= 5.0}
BuildRequires: %{python_module setuptools}
# for protocol specifications
BuildRequires: %{python_module sniffio}
BuildRequires: %{python_module contextvars >= 2.1 if %python-base < 3.7}
BuildRequires: %{python_module sortedcontainers}
BuildRequires: %{python_module trustme}
BuildRequires: %{python_module yapf >= 0.27.0}
@ -48,13 +51,10 @@ Requires: python-idna
Requires: python-outcome
Requires: python-sniffio
Requires: python-sortedcontainers
%if 0%{?python_version_nodots} < 37
Requires: python-contextvars >= 2.1
%endif
BuildArch: noarch
%if "%{python_flavor}" < "3.7"
BuildRequires: %{python_module contextvars >= 2.1}
%endif
%if "%{python_flavor}" < "3.7"
Recommends: python-contextvars >= 2.1
%endif
%python_subpackages
%description
@ -68,7 +68,7 @@ monitoring multiple subprocesses. Compared to other libraries, Trio
has an obsessive focus on usability and correctness.
%prep
%setup -q -n trio-%{version}
%autosetup -p1 -n trio-%{version}
sed -i '1{/^#!/d}' trio/_tools/gen_exports.py
%build
@ -85,12 +85,12 @@ sed -i '1{/^#!/d}' trio/_tools/gen_exports.py
# 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_fallback_when_no_hook_claims_it is incompatible with pytest 6.2 https://github.com/python-trio/trio/issues/1843
%pytest -k 'not (test_static_tool_sees_all_symbols or test_SSLStream_generic or test_close_at_bad_time_for_send_all or test_fallback_when_no_hook_claims_it)'
%pytest -k 'not (test_static_tool_sees_all_symbols or test_SSLStream_generic or test_close_at_bad_time_for_send_all)'
%files %{python_files}
%doc README.rst
%license LICENSE LICENSE.APACHE2 LICENSE.MIT
%{python_sitelib}/*
%{python_sitelib}/trio
%{python_sitelib}/trio-%{version}*-info
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:295044f9b62232b1f918891e1076ab34045cd1d85e5e577fc97ab74cd93d955c
size 488878

3
trio-0.19.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:453afdf9a9b128f271d7d89626c060af475cd8297b4c7d7730f0e377c359244e
size 486036

View File

@ -0,0 +1,35 @@
From 0639f87e58bae400070c5642f6fb339c7bb6e704 Mon Sep 17 00:00:00 2001
From: Kyle Altendorf <sda@fstab.net>
Date: Tue, 22 Jun 2021 11:33:12 -0400
Subject: [PATCH] update tests for SSL related deprecations in 3.10
---
trio/tests/test_ssl.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/trio/tests/test_ssl.py b/trio/tests/test_ssl.py
index 75f99df13..933e0be47 100644
--- a/trio/tests/test_ssl.py
+++ b/trio/tests/test_ssl.py
@@ -80,7 +80,10 @@ def client_ctx(request):
if request.param in ["default", "tls13"]:
return ctx
elif request.param == "tls12":
- ctx.options |= ssl.OP_NO_TLSv1_3
+ if sys.version_info >= (3, 7):
+ ctx.maximum_version = ssl.TLSVersion.TLSv1_2
+ else:
+ ctx.options |= ssl.OP_NO_TLSv1_3
return ctx
else: # pragma: no cover
assert False
@@ -1200,7 +1203,8 @@ async def test_selected_npn_protocol_before_handshake(client_ctx):
@pytest.mark.filterwarnings(
- r"ignore: ssl module. NPN is deprecated, use ALPN instead:UserWarning"
+ r"ignore: ssl module. NPN is deprecated, use ALPN instead:UserWarning",
+ r"ignore:ssl NPN is deprecated, use ALPN instead:DeprecationWarning",
)
async def test_selected_npn_protocol_when_not_set(client_ctx):
# NPN protocol still returns None when it's not set,