#3 Backport Python 3.10+ compatibility
Merged 3 years ago by churchyard. Opened 3 years ago by churchyard.
rpms/ churchyard/python-uvloop python3.10  into  master

file added
+56
@@ -0,0 +1,56 @@ 

+ From 2870219558eba983813aeab249e08371266ab524 Mon Sep 17 00:00:00 2001

+ From: jack1142 <6032823+jack1142@users.noreply.github.com>

+ Date: Tue, 31 Mar 2020 02:37:38 +0200

+ Subject: [PATCH] Stop using `loop` kwarg in `asyncio.wait()` call

+  (DeprecationWarning) (#327)

+ 

+ ---

+  uvloop/handles/process.pyx | 2 +-

+  uvloop/loop.pyx            | 7 +++----

+  2 files changed, 4 insertions(+), 5 deletions(-)

+ 

+ diff --git a/uvloop/handles/process.pyx b/uvloop/handles/process.pyx

+ index 13360d5..f2e0f58 100644

+ --- a/uvloop/handles/process.pyx

+ +++ b/uvloop/handles/process.pyx

+ @@ -604,7 +604,7 @@ cdef class UVProcessTransport(UVProcess):

+  

+          if handle._init_futs:

+              handle._stdio_ready = 0

+ -            init_fut = aio_gather(*handle._init_futs, loop=loop)

+ +            init_fut = aio_gather(*handle._init_futs)

+              init_fut.add_done_callback(

+                  ft_partial(handle.__stdio_inited, waiter))

+          else:

+ diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx

+ index c865fed..a368c52 100644

+ --- a/uvloop/loop.pyx

+ +++ b/uvloop/loop.pyx

+ @@ -1682,7 +1682,7 @@ cdef class Loop:

+                                      uv.SOCK_STREAM, 0, flags,

+                                      0) for host in hosts]

+  

+ -            infos = await aio_gather(*fs, loop=self)

+ +            infos = await aio_gather(*fs)

+  

+              completed = False

+              sock = None

+ @@ -1908,7 +1908,7 @@ cdef class Loop:

+                      lai = &lai_static

+  

+              if len(fs):

+ -                await aio_wait(fs, loop=self)

+ +                await aio_wait(fs)

+  

+              if rai is NULL:

+                  ai_remote = f1.result()

+ @@ -3095,8 +3095,7 @@ cdef class Loop:

+  

+          shutdown_coro = aio_gather(

+              *[ag.aclose() for ag in closing_agens],

+ -            return_exceptions=True,

+ -            loop=self)

+ +            return_exceptions=True)

+  

+          results = await shutdown_coro

+          for result, agen in zip(results, closing_agens):

file modified
+8 -1
@@ -2,13 +2,16 @@ 

  

  Name:           python-%{modname}

  Version:        0.14.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Ultra fast implementation of asyncio event loop on top of libuv

  

  License:        MIT or ASL 2.0

  URL:            https://github.com/MagicStack/uvloop

  Source0:        %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz

  

+ # Stop using `loop` kwarg in `asyncio.wait()` call (Python 3.10+)

+ Patch1:         %{url}/commit/2870219558.patch

+ 

  BuildRequires:  gcc

  BuildRequires:  libuv-devel

  
@@ -58,6 +61,10 @@ 

  %{python3_sitearch}/%{modname}/

  

  %changelog

+ * Thu Jan 07 2021 Miro Hrončok <mhroncok@redhat.com> - 0.14.0-3

+ - Backport Python 3.10+ compatibility

+ - Fixes: rhbz#1913435

+ 

  * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild