Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nest-asyncio for 
openSUSE:Factory checked in at 2021-12-16 21:19:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nest-asyncio (Old)
 and      /work/SRC/openSUSE:Factory/.python-nest-asyncio.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nest-asyncio"

Thu Dec 16 21:19:18 2021 rev:4 rq:940135 version:1.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nest-asyncio/python-nest-asyncio.changes  
2021-06-26 21:26:00.127386013 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-nest-asyncio.new.2520/python-nest-asyncio.changes
        2021-12-16 21:20:08.842540305 +0100
@@ -1,0 +2,6 @@
+Mon Dec 13 05:53:15 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Update to 1.5.4:
+  * No release notes 
+
+-------------------------------------------------------------------

Old:
----
  nest_asyncio-1.5.1.tar.gz

New:
----
  nest_asyncio-1.5.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-nest-asyncio.spec ++++++
--- /var/tmp/diff_new_pack.f3bD7a/_old  2021-12-16 21:20:09.270540468 +0100
+++ /var/tmp/diff_new_pack.f3bD7a/_new  2021-12-16 21:20:09.274540470 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-nest-asyncio
-Version:        1.5.1
+Version:        1.5.4
 Release:        0
 Summary:        Patch asyncio to allow nested event loops
 License:        BSD-2-Clause

++++++ nest_asyncio-1.5.1.tar.gz -> nest_asyncio-1.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/PKG-INFO 
new/nest_asyncio-1.5.4/PKG-INFO
--- old/nest_asyncio-1.5.1/PKG-INFO     2021-01-27 16:43:32.017318000 +0100
+++ new/nest_asyncio-1.5.4/PKG-INFO     2021-12-01 20:45:00.502221800 +0100
@@ -1,73 +1,11 @@
 Metadata-Version: 2.1
 Name: nest_asyncio
-Version: 1.5.1
+Version: 1.5.4
 Summary: Patch asyncio to allow nested event loops
 Home-page: https://github.com/erdewit/nest_asyncio
 Author: Ewald R. de Wit
 Author-email: ewald.de....@gmail.com
 License: BSD
-Description: |Build| |Status| |PyPiVersion| |License| |Downloads|
-        
-        Introduction
-        ------------
-        
-        By design asyncio `does not allow 
<https://bugs.python.org/issue22239>`_
-        its event loop to be nested. This presents a practical problem:
-        When in an environment where the event loop is
-        already running it's impossible to run tasks and wait
-        for the result. Trying to do so will give the error
-        "``RuntimeError: This event loop is already running``".
-        
-        The issue pops up in various environments, such as web servers,
-        GUI applications and in Jupyter notebooks.
-        
-        This module patches asyncio to allow nested use of ``asyncio.run`` and
-        ``loop.run_until_complete``.
-        
-        Installation
-        ------------
-        
-        .. code-block::
-        
-            pip3 install nest_asyncio
-        
-        Python 3.5 or higher is required.
-        
-        Usage
-        -----
-        
-        .. code-block:: python
-        
-            import nest_asyncio
-            nest_asyncio.apply()
-        
-        Optionally the specific loop that needs patching can be given
-        as argument to ``apply``, otherwise the current event loop is used.
-        An event loop can be patched whether it is already running
-        or not. Only event loops from asyncio can be patched;
-        Loops from other projects, such as uvloop or quamash,
-        generally can't be patched.
-        
-        
-        .. |Build| image:: 
https://github.com/erdewit/nest_asyncio/workflows/Test/badge.svg?branche=master
-           :alt: Build
-           :target: https://github.com/erdewit/nest_asyncio/actions
-        
-        .. |PyPiVersion| image:: https://img.shields.io/pypi/v/nest_asyncio.svg
-           :alt: PyPi
-           :target: https://pypi.python.org/pypi/nest_asyncio
-        
-        .. |Status| image:: 
https://img.shields.io/badge/status-stable-green.svg
-           :alt:
-        
-        .. |License| image:: https://img.shields.io/badge/license-BSD-blue.svg
-           :alt:
-        
-        .. |Downloads| image:: https://pepy.tech/badge/nest-asyncio/month
-           :alt: Number of downloads
-           :target: https://pepy.tech/project/nest-asyncio
-        
-        
 Keywords: asyncio,nested,eventloop
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
@@ -78,6 +16,73 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Framework :: AsyncIO
 Requires-Python: >=3.5
 Description-Content-Type: text/x-rst
+License-File: LICENSE
+
+|Build| |Status| |PyPiVersion| |License| |Downloads|
+
+Introduction
+------------
+
+By design asyncio `does not allow <https://bugs.python.org/issue22239>`_
+its event loop to be nested. This presents a practical problem:
+When in an environment where the event loop is
+already running it's impossible to run tasks and wait
+for the result. Trying to do so will give the error
+"``RuntimeError: This event loop is already running``".
+
+The issue pops up in various environments, such as web servers,
+GUI applications and in Jupyter notebooks.
+
+This module patches asyncio to allow nested use of ``asyncio.run`` and
+``loop.run_until_complete``.
+
+Installation
+------------
+
+.. code-block::
+
+    pip3 install nest_asyncio
+
+Python 3.5 or higher is required.
+
+Usage
+-----
+
+.. code-block:: python
+
+    import nest_asyncio
+    nest_asyncio.apply()
+
+Optionally the specific loop that needs patching can be given
+as argument to ``apply``, otherwise the current event loop is used.
+An event loop can be patched whether it is already running
+or not. Only event loops from asyncio can be patched;
+Loops from other projects, such as uvloop or quamash,
+generally can't be patched.
+
+
+.. |Build| image:: 
https://github.com/erdewit/nest_asyncio/workflows/Test/badge.svg?branche=master
+   :alt: Build
+   :target: https://github.com/erdewit/nest_asyncio/actions
+
+.. |PyPiVersion| image:: https://img.shields.io/pypi/v/nest_asyncio.svg
+   :alt: PyPi
+   :target: https://pypi.python.org/pypi/nest_asyncio
+
+.. |Status| image:: https://img.shields.io/badge/status-stable-green.svg
+   :alt:
+
+.. |License| image:: https://img.shields.io/badge/license-BSD-blue.svg
+   :alt:
+
+.. |Downloads| image:: https://pepy.tech/badge/nest-asyncio/month
+   :alt: Number of downloads
+   :target: https://pepy.tech/project/nest-asyncio
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/nest_asyncio.egg-info/PKG-INFO 
new/nest_asyncio-1.5.4/nest_asyncio.egg-info/PKG-INFO
--- old/nest_asyncio-1.5.1/nest_asyncio.egg-info/PKG-INFO       2021-01-27 
16:43:31.000000000 +0100
+++ new/nest_asyncio-1.5.4/nest_asyncio.egg-info/PKG-INFO       2021-12-01 
20:45:00.000000000 +0100
@@ -1,73 +1,11 @@
 Metadata-Version: 2.1
 Name: nest-asyncio
-Version: 1.5.1
+Version: 1.5.4
 Summary: Patch asyncio to allow nested event loops
 Home-page: https://github.com/erdewit/nest_asyncio
 Author: Ewald R. de Wit
 Author-email: ewald.de....@gmail.com
 License: BSD
-Description: |Build| |Status| |PyPiVersion| |License| |Downloads|
-        
-        Introduction
-        ------------
-        
-        By design asyncio `does not allow 
<https://bugs.python.org/issue22239>`_
-        its event loop to be nested. This presents a practical problem:
-        When in an environment where the event loop is
-        already running it's impossible to run tasks and wait
-        for the result. Trying to do so will give the error
-        "``RuntimeError: This event loop is already running``".
-        
-        The issue pops up in various environments, such as web servers,
-        GUI applications and in Jupyter notebooks.
-        
-        This module patches asyncio to allow nested use of ``asyncio.run`` and
-        ``loop.run_until_complete``.
-        
-        Installation
-        ------------
-        
-        .. code-block::
-        
-            pip3 install nest_asyncio
-        
-        Python 3.5 or higher is required.
-        
-        Usage
-        -----
-        
-        .. code-block:: python
-        
-            import nest_asyncio
-            nest_asyncio.apply()
-        
-        Optionally the specific loop that needs patching can be given
-        as argument to ``apply``, otherwise the current event loop is used.
-        An event loop can be patched whether it is already running
-        or not. Only event loops from asyncio can be patched;
-        Loops from other projects, such as uvloop or quamash,
-        generally can't be patched.
-        
-        
-        .. |Build| image:: 
https://github.com/erdewit/nest_asyncio/workflows/Test/badge.svg?branche=master
-           :alt: Build
-           :target: https://github.com/erdewit/nest_asyncio/actions
-        
-        .. |PyPiVersion| image:: https://img.shields.io/pypi/v/nest_asyncio.svg
-           :alt: PyPi
-           :target: https://pypi.python.org/pypi/nest_asyncio
-        
-        .. |Status| image:: 
https://img.shields.io/badge/status-stable-green.svg
-           :alt:
-        
-        .. |License| image:: https://img.shields.io/badge/license-BSD-blue.svg
-           :alt:
-        
-        .. |Downloads| image:: https://pepy.tech/badge/nest-asyncio/month
-           :alt: Number of downloads
-           :target: https://pepy.tech/project/nest-asyncio
-        
-        
 Keywords: asyncio,nested,eventloop
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
@@ -78,6 +16,73 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3 :: Only
+Classifier: Framework :: AsyncIO
 Requires-Python: >=3.5
 Description-Content-Type: text/x-rst
+License-File: LICENSE
+
+|Build| |Status| |PyPiVersion| |License| |Downloads|
+
+Introduction
+------------
+
+By design asyncio `does not allow <https://bugs.python.org/issue22239>`_
+its event loop to be nested. This presents a practical problem:
+When in an environment where the event loop is
+already running it's impossible to run tasks and wait
+for the result. Trying to do so will give the error
+"``RuntimeError: This event loop is already running``".
+
+The issue pops up in various environments, such as web servers,
+GUI applications and in Jupyter notebooks.
+
+This module patches asyncio to allow nested use of ``asyncio.run`` and
+``loop.run_until_complete``.
+
+Installation
+------------
+
+.. code-block::
+
+    pip3 install nest_asyncio
+
+Python 3.5 or higher is required.
+
+Usage
+-----
+
+.. code-block:: python
+
+    import nest_asyncio
+    nest_asyncio.apply()
+
+Optionally the specific loop that needs patching can be given
+as argument to ``apply``, otherwise the current event loop is used.
+An event loop can be patched whether it is already running
+or not. Only event loops from asyncio can be patched;
+Loops from other projects, such as uvloop or quamash,
+generally can't be patched.
+
+
+.. |Build| image:: 
https://github.com/erdewit/nest_asyncio/workflows/Test/badge.svg?branche=master
+   :alt: Build
+   :target: https://github.com/erdewit/nest_asyncio/actions
+
+.. |PyPiVersion| image:: https://img.shields.io/pypi/v/nest_asyncio.svg
+   :alt: PyPi
+   :target: https://pypi.python.org/pypi/nest_asyncio
+
+.. |Status| image:: https://img.shields.io/badge/status-stable-green.svg
+   :alt:
+
+.. |License| image:: https://img.shields.io/badge/license-BSD-blue.svg
+   :alt:
+
+.. |Downloads| image:: https://pepy.tech/badge/nest-asyncio/month
+   :alt: Number of downloads
+   :target: https://pepy.tech/project/nest-asyncio
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/nest_asyncio.egg-info/SOURCES.txt 
new/nest_asyncio-1.5.4/nest_asyncio.egg-info/SOURCES.txt
--- old/nest_asyncio-1.5.1/nest_asyncio.egg-info/SOURCES.txt    2021-01-27 
16:43:31.000000000 +0100
+++ new/nest_asyncio-1.5.4/nest_asyncio.egg-info/SOURCES.txt    2021-12-01 
20:45:00.000000000 +0100
@@ -2,6 +2,7 @@
 MANIFEST.in
 README.rst
 nest_asyncio.py
+pyproject.toml
 setup.cfg
 setup.py
 nest_asyncio.egg-info/PKG-INFO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/nest_asyncio.py 
new/nest_asyncio-1.5.4/nest_asyncio.py
--- old/nest_asyncio-1.5.1/nest_asyncio.py      2021-01-27 16:39:44.000000000 
+0100
+++ new/nest_asyncio-1.5.4/nest_asyncio.py      2021-12-01 20:36:44.000000000 
+0100
@@ -3,7 +3,7 @@
 import os
 import sys
 import threading
-from contextlib import contextmanager
+from contextlib import contextmanager, suppress
 from heapq import heappop
 
 
@@ -26,10 +26,21 @@
     Patch asyncio module to use pure Python tasks and futures,
     use module level _current_tasks, all_tasks and patch run method.
     """
-    def run(future, *, debug=False):
-        loop = asyncio.get_event_loop()
+    def run(main, *, debug=False):
+        loop = events._get_running_loop()
+        if not loop:
+            loop = events.new_event_loop()
+            events.set_event_loop(loop)
+            _patch_loop(loop)
         loop.set_debug(debug)
-        return loop.run_until_complete(future)
+        task = asyncio.ensure_future(main)
+        try:
+            return loop.run_until_complete(task)
+        finally:
+            if not task.done():
+                task.cancel()
+                with suppress(asyncio.CancelledError):
+                    loop.run_until_complete(task)
 
     if sys.version_info >= (3, 6, 0):
         asyncio.Task = asyncio.tasks._CTask = asyncio.tasks.Task = \
@@ -37,8 +48,8 @@
         asyncio.Future = asyncio.futures._CFuture = asyncio.futures.Future = \
             asyncio.futures._PyFuture
     if sys.version_info < (3, 7, 0):
-        asyncio.tasks._current_tasks = asyncio.tasks.Task._current_tasks  # 
noqa
-        asyncio.all_tasks = asyncio.tasks.Task.all_tasks  # noqa
+        asyncio.tasks._current_tasks = asyncio.tasks.Task._current_tasks
+        asyncio.all_tasks = asyncio.tasks.Task.all_tasks
     if not hasattr(asyncio, '_run_orig'):
         asyncio._run_orig = getattr(asyncio, 'run', None)
         asyncio.run = run
@@ -74,7 +85,6 @@
         Simplified re-implementation of asyncio's _run_once that
         runs handles as they become ready.
         """
-        now = self.time()
         ready = self._ready
         scheduled = self._scheduled
         while scheduled and scheduled[0]._cancelled:
@@ -82,7 +92,8 @@
 
         timeout = (
             0 if ready or self._stopping
-            else min(max(scheduled[0]._when - now, 0), 86400) if scheduled
+            else min(max(
+                scheduled[0]._when - self.time(), 0), 86400) if scheduled
             else None)
         event_list = self._selector.select(timeout)
         self._process_events(event_list)
@@ -129,6 +140,9 @@
 
     @contextmanager
     def manage_asyncgens(self):
+        if not hasattr(sys, 'get_asyncgen_hooks'):
+            # Python version is too old.
+            return
         old_agen_hooks = sys.get_asyncgen_hooks()
         try:
             self._set_coroutine_origin_tracking(self._debug)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/pyproject.toml 
new/nest_asyncio-1.5.4/pyproject.toml
--- old/nest_asyncio-1.5.1/pyproject.toml       1970-01-01 01:00:00.000000000 
+0100
+++ new/nest_asyncio-1.5.4/pyproject.toml       2020-07-16 12:39:43.000000000 
+0200
@@ -0,0 +1,5 @@
+[build-system]
+requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.3"]
+build-backend = "setuptools.build_meta"
+
+[tool.setuptools_scm]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/setup.cfg 
new/nest_asyncio-1.5.4/setup.cfg
--- old/nest_asyncio-1.5.1/setup.cfg    2021-01-27 16:43:32.017318000 +0100
+++ new/nest_asyncio-1.5.4/setup.cfg    2021-12-01 20:45:00.502221800 +0100
@@ -1,6 +1,6 @@
 [metadata]
 name = nest_asyncio
-version = 1.5.1
+version = 1.5.4
 author = Ewald R. de Wit
 author_email = ewald.de....@gmail.com
 license = BSD
@@ -19,7 +19,9 @@
        Programming Language :: Python :: 3.7
        Programming Language :: Python :: 3.8
        Programming Language :: Python :: 3.9
+       Programming Language :: Python :: 3.10
        Programming Language :: Python :: 3 :: Only
+       Framework :: AsyncIO
 
 [options]
 py_modules = nest_asyncio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nest_asyncio-1.5.1/tests/nest_test.py 
new/nest_asyncio-1.5.4/tests/nest_test.py
--- old/nest_asyncio-1.5.1/tests/nest_test.py   2021-01-24 15:23:35.000000000 
+0100
+++ new/nest_asyncio-1.5.4/tests/nest_test.py   2021-08-20 12:09:56.000000000 
+0200
@@ -84,7 +84,7 @@
             return 2
 
         result = self.loop.run_until_complete(
-            asyncio.gather(f1(), f2(), loop=self.loop))
+            asyncio.gather(f1(), f2()))
         self.assertEqual(result, [4, 2])
 
     @unittest.skipIf(sys.version_info < (3, 7, 0), 'No contextvars module')

Reply via email to