## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name nest_asyncio Name: python-nest-asyncio Version: 1.6.0 Release: %autorelease Summary: Patch asyncio to allow nested event loops License: BSD-2-Clause URL: https://github.com/erdewit/nest_asyncio Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %description By design asyncio does not allow 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. %package -n python3-nest-asyncio Summary: %{summary} # This package used to be called python3-nest_asyncio Obsoletes: python3-nest_asyncio < 1.4.3-100 %py_provides python3-nest_asyncio %description -n python3-nest-asyncio By design asyncio does not allow 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 %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check PYTHONPATH=%{buildroot}%{python3_sitelib} %python3 tests/nest_test.py %files -n python3-nest-asyncio -f %{pyproject_files} %doc README.rst %changelog * Mon Jan 22 2024 Lumir Balhar - 1.6.0-1 - Update to 1.6.0 (rhbz#2259425) * Mon Jan 22 2024 Fedora Release Engineering - 1.5.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 15 2024 Lumir Balhar - 1.5.9-1 - Update to 1.5.9 (rhbz#2258480) * Tue Sep 19 2023 Lumír Balhar - 1.5.8-1 - Update to 1.5.8 (rhbz#2239318) * Tue Aug 01 2023 Lumír Balhar - 1.5.7-1 - Update to 1.5.7 (rhbz#2227197) * Fri Jul 21 2023 Fedora Release Engineering - 1.5.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 1.5.6-3 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 1.5.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Oct 03 2022 Lumír Balhar - 1.5.6-1 - Update to 1.5.6 Resolves: rhbz#2131173 * Fri Jul 22 2022 Fedora Release Engineering - 1.5.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 1.5.5-2 - Rebuilt for Python 3.11 * Mon Apr 04 2022 Lumír Balhar - 1.5.5-1 - Update to 1.5.5 Resolves: rhbz#2071300 * Fri Jan 21 2022 Fedora Release Engineering - 1.5.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 02 2021 Lumír Balhar - 1.5.4-1 - Update to 1.5.4 Resolves: rhbz#2028135 * Tue Oct 05 2021 Lumír Balhar - 1.5.1-2 - Obsolete and provide nest_asyncio package Resolves: rhbz#2007799 * Tue Aug 31 2021 Lumír Balhar - 1.5.1-1 - Initial package