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 2022-05-31 15:46:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nest-asyncio (Old)
and /work/SRC/openSUSE:Factory/.python-nest-asyncio.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nest-asyncio"
Tue May 31 15:46:50 2022 rev:5 rq:979750 version:1.5.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nest-asyncio/python-nest-asyncio.changes
2021-12-16 21:20:08.842540305 +0100
+++
/work/SRC/openSUSE:Factory/.python-nest-asyncio.new.1548/python-nest-asyncio.changes
2022-05-31 15:46:55.463969980 +0200
@@ -1,0 +2,7 @@
+Sun May 29 20:19:38 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 1.5.5:
+ * Patch asyncio.get_event_loop to not require a running loop
+ * Potential fix for issue #65
+
+-------------------------------------------------------------------
Old:
----
nest_asyncio-1.5.4.tar.gz
New:
----
nest_asyncio-1.5.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-nest-asyncio.spec ++++++
--- /var/tmp/diff_new_pack.r6Yx4E/_old 2022-05-31 15:46:56.007970341 +0200
+++ /var/tmp/diff_new_pack.r6Yx4E/_new 2022-05-31 15:46:56.007970341 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-nest-asyncio
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-nest-asyncio
-Version: 1.5.4
+Version: 1.5.5
Release: 0
Summary: Patch asyncio to allow nested event loops
License: BSD-2-Clause
++++++ nest_asyncio-1.5.4.tar.gz -> nest_asyncio-1.5.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/.github/FUNDING.yml
new/nest_asyncio-1.5.5/.github/FUNDING.yml
--- old/nest_asyncio-1.5.4/.github/FUNDING.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/nest_asyncio-1.5.5/.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.5.4/.github/workflows/test.yml
new/nest_asyncio-1.5.5/.github/workflows/test.yml
--- old/nest_asyncio-1.5.4/.github/workflows/test.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/.github/workflows/test.yml 2021-08-20
17:04:34.000000000 +0200
@@ -0,0 +1,33 @@
+name: Test
+
+on: [ push, pull_request ]
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}-latest
+ strategy:
+ matrix:
+ os: [ubuntu, macos, windows]
+ python-version: [ 3.6, 3.7, 3.8, 3.9, pypy-3.7 ]
+ exclude:
+ - os: windows
+ python-version: pypy-3.7
+ include:
+ - os: ubuntu
+ python-version: '3.10.0-alpha - 3.10.0'
+ deps: newest-deps
+ experimental: true
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install dependencies
+ run: pip install .
+
+ - name: Unit tests
+ run: python tests/nest_test.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/.gitignore
new/nest_asyncio-1.5.5/.gitignore
--- old/nest_asyncio-1.5.4/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/.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.5.4/.travis.yml
new/nest_asyncio-1.5.5/.travis.yml
--- old/nest_asyncio-1.5.4/.travis.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/.travis.yml 2020-11-03 12:29:33.000000000 +0100
@@ -0,0 +1,14 @@
+language: python
+sudo: false
+python:
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "3.9"
+ - "nightly"
+install:
+ - pip install .
+script:
+ - python3 tests/nest_test.py
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/PKG-INFO
new/nest_asyncio-1.5.5/PKG-INFO
--- old/nest_asyncio-1.5.4/PKG-INFO 2021-12-01 20:45:00.502221800 +0100
+++ new/nest_asyncio-1.5.5/PKG-INFO 2022-04-02 20:39:10.192274800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: nest_asyncio
-Version: 1.5.4
+Version: 1.5.5
Summary: Patch asyncio to allow nested event loops
Home-page: https://github.com/erdewit/nest_asyncio
Author: Ewald R. de Wit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/dist.sh
new/nest_asyncio-1.5.5/dist.sh
--- old/nest_asyncio-1.5.4/dist.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/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.5.4/nest_asyncio.egg-info/PKG-INFO
new/nest_asyncio-1.5.5/nest_asyncio.egg-info/PKG-INFO
--- old/nest_asyncio-1.5.4/nest_asyncio.egg-info/PKG-INFO 2021-12-01
20:45:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/nest_asyncio.egg-info/PKG-INFO 2022-04-02
20:39:10.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: nest-asyncio
-Version: 1.5.4
+Version: 1.5.5
Summary: Patch asyncio to allow nested event loops
Home-page: https://github.com/erdewit/nest_asyncio
Author: Ewald R. de Wit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/nest_asyncio.egg-info/SOURCES.txt
new/nest_asyncio-1.5.5/nest_asyncio.egg-info/SOURCES.txt
--- old/nest_asyncio-1.5.4/nest_asyncio.egg-info/SOURCES.txt 2021-12-01
20:45:00.000000000 +0100
+++ new/nest_asyncio-1.5.5/nest_asyncio.egg-info/SOURCES.txt 2022-04-02
20:39:10.000000000 +0200
@@ -1,10 +1,15 @@
+.gitignore
+.travis.yml
LICENSE
MANIFEST.in
README.rst
+dist.sh
nest_asyncio.py
pyproject.toml
setup.cfg
setup.py
+.github/FUNDING.yml
+.github/workflows/test.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.5.4/nest_asyncio.py
new/nest_asyncio-1.5.5/nest_asyncio.py
--- old/nest_asyncio-1.5.4/nest_asyncio.py 2021-12-01 20:36:44.000000000
+0100
+++ new/nest_asyncio-1.5.5/nest_asyncio.py 2022-04-02 20:24:14.000000000
+0200
@@ -9,17 +9,13 @@
def apply(loop=None):
"""Patch asyncio to make its event loop reentrant."""
- loop = loop or asyncio.get_event_loop()
- if not isinstance(loop, asyncio.BaseEventLoop):
- raise ValueError('Can\'t patch loop of type %s' % type(loop))
- if getattr(loop, '_nest_patched', None):
- # already patched
- return
_patch_asyncio()
- _patch_loop(loop)
_patch_task()
_patch_tornado()
+ loop = loop or asyncio.get_event_loop()
+ _patch_loop(loop)
+
def _patch_asyncio():
"""
@@ -27,10 +23,11 @@
use module level _current_tasks, all_tasks and patch run method.
"""
def run(main, *, debug=False):
- loop = events._get_running_loop()
- if not loop:
- loop = events.new_event_loop()
- events.set_event_loop(loop)
+ try:
+ loop = asyncio.get_event_loop()
+ except RuntimeError:
+ loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(loop)
_patch_loop(loop)
loop.set_debug(debug)
task = asyncio.ensure_future(main)
@@ -42,6 +39,14 @@
with suppress(asyncio.CancelledError):
loop.run_until_complete(task)
+ def _get_event_loop(stacklevel=3):
+ loop = events._get_running_loop()
+ if loop is None:
+ loop = events.get_event_loop_policy().get_event_loop()
+ return loop
+
+ if hasattr(asyncio, '_nest_patched'):
+ return
if sys.version_info >= (3, 6, 0):
asyncio.Task = asyncio.tasks._CTask = asyncio.tasks.Task = \
asyncio.tasks._PyTask
@@ -50,9 +55,12 @@
if sys.version_info < (3, 7, 0):
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
+ if sys.version_info >= (3, 9, 0):
+ events._get_event_loop = events.get_event_loop = \
+ asyncio.get_event_loop = _get_event_loop
+ _get_event_loop
+ asyncio.run = run
+ asyncio._nest_patched = True
def _patch_loop(loop):
@@ -160,18 +168,22 @@
"""Do not throw exception if loop is already running."""
pass
+ if hasattr(loop, '_nest_patched'):
+ return
+ if not isinstance(loop, asyncio.BaseEventLoop):
+ raise ValueError('Can\'t patch loop of type %s' % type(loop))
cls = loop.__class__
cls.run_forever = run_forever
cls.run_until_complete = run_until_complete
cls._run_once = _run_once
cls._check_running = _check_running
cls._check_runnung = _check_running # typo in Python 3.7 source
- cls._nest_patched = True
cls._num_runs_pending = 0
cls._is_proactorloop = (
os.name == 'nt' and issubclass(cls, asyncio.ProactorEventLoop))
if sys.version_info < (3, 7, 0):
cls._set_coroutine_origin_tracking = cls._set_coroutine_wrapper
+ cls._nest_patched = True
def _patch_task():
@@ -188,6 +200,8 @@
curr_tasks[task._loop] = curr_task
Task = asyncio.Task
+ if hasattr(Task, '_nest_patched'):
+ return
if sys.version_info >= (3, 7, 0):
def enter_task(loop, task):
@@ -205,6 +219,7 @@
curr_tasks = Task._current_tasks
step_orig = Task._step
Task._step = step
+ Task._nest_patched = True
def _patch_tornado():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nest_asyncio-1.5.4/setup.cfg
new/nest_asyncio-1.5.5/setup.cfg
--- old/nest_asyncio-1.5.4/setup.cfg 2021-12-01 20:45:00.502221800 +0100
+++ new/nest_asyncio-1.5.5/setup.cfg 2022-04-02 20:39:10.193274700 +0200
@@ -1,6 +1,6 @@
[metadata]
name = nest_asyncio
-version = 1.5.4
+version = 1.5.5
author = Ewald R. de Wit
author_email = [email protected]
license = BSD