Add py-nest-asyncio 1.4.3

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.

WWW: https://github.com/erdewit/nest_asyncio
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2020-12-19 20:04:01 +00:00
parent cd0615dcd0
commit 2dc879fcd2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=558474
4 changed files with 38 additions and 0 deletions

View file

@ -4644,6 +4644,7 @@
SUBDIR += py-nbconvert
SUBDIR += py-nbdime
SUBDIR += py-nbformat
SUBDIR += py-nest-asyncio
SUBDIR += py-node-semver
SUBDIR += py-nodeenv
SUBDIR += py-nose

View file

@ -0,0 +1,22 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= nest-asyncio
PORTVERSION= 1.4.3
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= nest_asyncio-${PORTVERSION}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Patch asyncio to allow nested event loops
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python:3.5+
USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1608366070
SHA256 (nest_asyncio-1.4.3.tar.gz) = eaa09ef1353ebefae19162ad423eef7a12166bcc63866f8bff8f3635353cd9fa
SIZE (nest_asyncio-1.4.3.tar.gz) = 5996

View file

@ -0,0 +1,12 @@
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.
WWW: https://github.com/erdewit/nest_asyncio