Sync from SUSE:SLFO:Main python-nest-asyncio revision 15bd2e0418a03bd552a04dedb6956b3e

This commit is contained in:
Adrian Schröter 2024-05-03 21:37:36 +02:00
commit 4bb61879b8
4 changed files with 131 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
nest_asyncio-1.5.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,37 @@
-------------------------------------------------------------------
Sun Oct 16 17:58:59 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.5.6:
* Add Python 3.11 support
-------------------------------------------------------------------
Sun May 29 20:19:38 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.5.5:
* Patch asyncio.get_event_loop to not require a running loop
* Potential fix for issue #65
-------------------------------------------------------------------
Mon Dec 13 05:53:15 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.5.4:
* No release notes
-------------------------------------------------------------------
Fri Jun 25 11:19:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to 1.5.1
* no release notes
* update required by jupyter_client 6.2
-------------------------------------------------------------------
Mon Jul 20 15:06:01 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Update to 1.4.0
* Propagate KeyboardInterrupt / SystemExit encountered when running handle
* set loop back when loop end
-------------------------------------------------------------------
Tue Jun 9 08:54:06 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Initial commit, needed by nbclient

68
python-nest-asyncio.spec Normal file
View File

@ -0,0 +1,68 @@
#
# spec file for package python-nest-asyncio
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-nest-asyncio
Version: 1.5.6
Release: 0
Summary: Patch asyncio to allow nested event loops
License: BSD-2-Clause
URL: https://github.com/erdewit/nest_asyncio
Source: https://files.pythonhosted.org/packages/source/n/nest_asyncio/nest_asyncio-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
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``.
%prep
%setup -q -n nest_asyncio-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest -v tests.nest_test
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/nest_asyncio.py*
%pycache_only %{python_sitelib}/__pycache__/nest_asyncio*.pyc
%{python_sitelib}/nest_asyncio-%{version}*-info
%changelog