Hello community,
here is the log from the commit of package python-nest-asyncio for
openSUSE:Factory checked in at 2020-07-20 21:09:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nest-asyncio (Old)
and /work/SRC/openSUSE:Factory/.python-nest-asyncio.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nest-asyncio"
Mon Jul 20 21:09:12 2020 rev:2 rq:821959 version:1.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nest-asyncio/python-nest-asyncio.changes
2020-06-10 00:50:16.727237351 +0200
+++
/work/SRC/openSUSE:Factory/.python-nest-asyncio.new.3592/python-nest-asyncio.changes
2020-07-20 21:11:24.165703163 +0200
@@ -1,0 +2,7 @@
+Mon Jul 20 15:06:01 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- Update to 1.4.0
+ * Propagate KeyboardInterrupt / SystemExit encountered when running handle
+ * set loop back when loop end
+
+-------------------------------------------------------------------
Old:
----
nest_asyncio-1.3.3.tar.gz
New:
----
nest_asyncio-1.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-nest-asyncio.spec ++++++
--- /var/tmp/diff_new_pack.rkgIzf/_old 2020-07-20 21:11:25.125704136 +0200
+++ /var/tmp/diff_new_pack.rkgIzf/_new 2020-07-20 21:11:25.129704141 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-nest-asyncio
-Version: 1.3.3
+Version: 1.4.0
Release: 0
Summary: Patch asyncio to allow nested event loops
License: BSD-2-Clause
++++++ nest_asyncio-1.3.3.tar.gz -> nest_asyncio-1.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/.github/FUNDING.yml
new/nest_asyncio-1.4.0/.github/FUNDING.yml
--- old/nest_asyncio-1.3.3/.github/FUNDING.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/nest_asyncio-1.4.0/.github/FUNDING.yml 2020-03-29 16:38:24.000000000
+0200
@@ -0,0 +1,2 @@
+github: erdewit
+custom: www.paypal.me/erdewit
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/.gitignore
new/nest_asyncio-1.4.0/.gitignore
--- old/nest_asyncio-1.3.3/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.4.0/.gitignore 2018-09-28 23:35:37.000000000 +0200
@@ -0,0 +1,107 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# dotenv
+.env
+
+# virtualenv
+.venv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+
+.vscode
+.project
+.pydevproject
+.settings/
+.idea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/.travis.yml
new/nest_asyncio-1.4.0/.travis.yml
--- old/nest_asyncio-1.3.3/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.4.0/.travis.yml 2019-12-07 10:12:47.000000000 +0100
@@ -0,0 +1,13 @@
+language: python
+sudo: false
+python:
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "nightly"
+install:
+ - pip install .
+script:
+ - python3 tests/nest_test.py
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/PKG-INFO
new/nest_asyncio-1.4.0/PKG-INFO
--- old/nest_asyncio-1.3.3/PKG-INFO 2020-05-03 13:30:34.580841500 +0200
+++ new/nest_asyncio-1.4.0/PKG-INFO 2020-07-17 13:14:09.707323600 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nest_asyncio
-Version: 1.3.3
+Version: 1.4.0
Summary: Patch asyncio to allow nested event loops
Home-page: https://github.com/erdewit/nest_asyncio
Author: Ewald R. de Wit
@@ -67,7 +67,7 @@
:target: https://pepy.tech/project/nest-asyncio
-Keywords: asyncio nested eventloop
+Keywords: asyncio,nested,eventloop
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
@@ -78,3 +78,4 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/dist.sh
new/nest_asyncio-1.4.0/dist.sh
--- old/nest_asyncio-1.3.3/dist.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.4.0/dist.sh 2018-09-07 17:13:20.000000000 +0200
@@ -0,0 +1,4 @@
+rm -rf dist build
+python3 setup.py sdist bdist_wheel
+python3 -m twine upload dist/*
+rm -rf dist build *.egg-info
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/nest_asyncio.egg-info/PKG-INFO
new/nest_asyncio-1.4.0/nest_asyncio.egg-info/PKG-INFO
--- old/nest_asyncio-1.3.3/nest_asyncio.egg-info/PKG-INFO 2020-05-03
13:30:34.000000000 +0200
+++ new/nest_asyncio-1.4.0/nest_asyncio.egg-info/PKG-INFO 2020-07-17
13:14:09.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.2
+Metadata-Version: 2.1
Name: nest-asyncio
-Version: 1.3.3
+Version: 1.4.0
Summary: Patch asyncio to allow nested event loops
Home-page: https://github.com/erdewit/nest_asyncio
Author: Ewald R. de Wit
@@ -67,7 +67,7 @@
:target: https://pepy.tech/project/nest-asyncio
-Keywords: asyncio nested eventloop
+Keywords: asyncio,nested,eventloop
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
@@ -78,3 +78,4 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.5
+Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/nest_asyncio.egg-info/SOURCES.txt
new/nest_asyncio-1.4.0/nest_asyncio.egg-info/SOURCES.txt
--- old/nest_asyncio-1.3.3/nest_asyncio.egg-info/SOURCES.txt 2020-05-03
13:30:34.000000000 +0200
+++ new/nest_asyncio-1.4.0/nest_asyncio.egg-info/SOURCES.txt 2020-07-17
13:14:09.000000000 +0200
@@ -1,9 +1,14 @@
+.gitignore
+.travis.yml
LICENSE
MANIFEST.in
README.rst
+dist.sh
nest_asyncio.py
+pyproject.toml
setup.cfg
setup.py
+.github/FUNDING.yml
nest_asyncio.egg-info/PKG-INFO
nest_asyncio.egg-info/SOURCES.txt
nest_asyncio.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/nest_asyncio.py
new/nest_asyncio-1.4.0/nest_asyncio.py
--- old/nest_asyncio-1.3.3/nest_asyncio.py 2020-05-03 13:20:21.000000000
+0200
+++ new/nest_asyncio-1.4.0/nest_asyncio.py 2020-07-16 16:25:07.000000000
+0200
@@ -1,6 +1,7 @@
import asyncio
import asyncio.events as events
import sys
+import threading
from heapq import heappop
@@ -16,6 +17,7 @@
_patch_loop(loop)
_patch_task()
_patch_handle()
+ _patch_tornado()
def _patch_asyncio():
@@ -44,19 +46,55 @@
def _patch_loop(loop):
"""Patch loop to make it reentrent."""
- def run_until_complete(self, future):
+ def run_forever(self):
+ if sys.version_info >= (3, 7, 0):
+ set_coro_tracking = self._set_coroutine_origin_tracking
+ else:
+ set_coro_tracking = self._set_coroutine_wrapper
+
self._check_closed()
- events._set_running_loop(self)
- f = asyncio.ensure_future(future, loop=self)
- if f is not future:
- f._log_destroy_pending = False
- while not f.done():
- self._run_once()
- if self._stopping:
- break
- if not f.done():
- raise RuntimeError('Event loop stopped before Future completed.')
- return f.result()
+ old_thread_id = self._thread_id
+ old_running_loop = events._get_running_loop()
+ set_coro_tracking(self._debug)
+ self._thread_id = threading.get_ident()
+
+ if self._asyncgens is not None:
+ old_agen_hooks = sys.get_asyncgen_hooks()
+ sys.set_asyncgen_hooks(
+ firstiter=self._asyncgen_firstiter_hook,
+ finalizer=self._asyncgen_finalizer_hook)
+ try:
+ events._set_running_loop(self)
+ while True:
+ self._run_once()
+ if self._stopping:
+ break
+ finally:
+ self._stopping = False
+ self._thread_id = old_thread_id
+ events._set_running_loop(old_running_loop)
+ set_coro_tracking(False)
+ if self._asyncgens is not None:
+ sys.set_asyncgen_hooks(*old_agen_hooks)
+
+ def run_until_complete(self, future):
+ old_running_loop = events._get_running_loop()
+ try:
+ self._check_closed()
+ events._set_running_loop(self)
+ f = asyncio.ensure_future(future, loop=self)
+ if f is not future:
+ f._log_destroy_pending = False
+ while not f.done():
+ self._run_once()
+ if self._stopping:
+ break
+ if not f.done():
+ raise RuntimeError(
+ 'Event loop stopped before Future completed.')
+ return f.result()
+ finally:
+ events._set_running_loop(old_running_loop)
def _run_once(self):
"""
@@ -92,6 +130,8 @@
cls = loop.__class__
cls._run_once_orig = cls._run_once
cls._run_once = _run_once
+ cls._run_forever_orig = cls.run_forever
+ cls.run_forever = run_forever
cls._run_until_complete_orig = cls.run_until_complete
cls.run_until_complete = run_until_complete
cls._check_running = _check_running
@@ -119,7 +159,7 @@
curr_tasks[loop] = task
def leave_task(loop, task):
- del curr_tasks[loop]
+ curr_tasks.pop(loop, None)
asyncio.tasks._enter_task = enter_task
asyncio.tasks._leave_task = leave_task
@@ -150,7 +190,9 @@
ctx.run(self._callback, *self._args)
if ctx:
self._context.run(update_from_context, ctx)
- except Exception as exc:
+ except (SystemExit, KeyboardInterrupt):
+ raise
+ except BaseException as exc:
cb = format_helpers._format_callback_source(
self._callback, self._args)
msg = 'Exception in callback {}'.format(cb)
@@ -167,3 +209,15 @@
if sys.version_info >= (3, 7, 0):
from asyncio import format_helpers
events.Handle._run = run
+
+
+def _patch_tornado():
+ """
+ If tornado is imported before nest_asyncio, make tornado aware of
+ the pure-Python asyncio Future.
+ """
+ if 'tornado' in sys.modules:
+ import tornado.concurrent as tc
+ tc.Future = asyncio.Future
+ if asyncio.Future not in tc.FUTURES:
+ tc.FUTURES += (asyncio.Future,)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/pyproject.toml
new/nest_asyncio-1.4.0/pyproject.toml
--- old/nest_asyncio-1.3.3/pyproject.toml 1970-01-01 01:00:00.000000000
+0100
+++ new/nest_asyncio-1.4.0/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.3.3/setup.cfg
new/nest_asyncio-1.4.0/setup.cfg
--- old/nest_asyncio-1.3.3/setup.cfg 2020-05-03 13:30:34.580841500 +0200
+++ new/nest_asyncio-1.4.0/setup.cfg 2020-07-17 13:14:09.708323500 +0200
@@ -1,5 +1,28 @@
[metadata]
+name = nest_asyncio
+version = 1.4.0
+author = Ewald R. de Wit
+author_email = [email protected]
+license = BSD
license_files = LICENSE
+description = Patch asyncio to allow nested event loops
+keywords = asyncio, nested, eventloop
+url = https://github.com/erdewit/nest_asyncio
+long_description = file: README.rst
+long_description_content_type = text/x-rst
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ License :: OSI Approved :: BSD License
+ Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3 :: Only
+
+[options]
+py_modules = nest_asyncio
+python_requires = >=3.5
[egg_info]
tag_build =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/setup.py
new/nest_asyncio-1.4.0/setup.py
--- old/nest_asyncio-1.3.3/setup.py 2020-05-03 13:20:35.000000000 +0200
+++ new/nest_asyncio-1.4.0/setup.py 2020-07-16 12:39:56.000000000 +0200
@@ -1,33 +1,5 @@
-import codecs
-import os
-
from setuptools import setup
-here = os.path.abspath(os.path.dirname(__file__))
-with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
- long_description = f.read()
-setup(
- name='nest_asyncio',
- version='1.3.3',
- description='Patch asyncio to allow nested event loops',
- long_description=long_description,
- url='https://github.com/erdewit/nest_asyncio',
- author='Ewald R. de Wit',
- author_email='[email protected]',
- license='BSD',
- python_requires='>=3.5',
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3 :: Only',
- ],
- keywords='asyncio nested eventloop',
- py_modules=['nest_asyncio'],
- test_suite="tests"
-)
+if __name__ == "__main__":
+ setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.3.3/tests/nest_test.py
new/nest_asyncio-1.4.0/tests/nest_test.py
--- old/nest_asyncio-1.3.3/tests/nest_test.py 2020-03-09 21:42:07.000000000
+0100
+++ new/nest_asyncio-1.4.0/tests/nest_test.py 2020-07-16 11:16:40.000000000
+0200
@@ -18,6 +18,7 @@
self.loop.set_exception_handler(exception_handler)
def tearDown(self):
+ self.assertIsNone(asyncio._get_running_loop())
self.loop.close()
del self.loop