{% set name = "nest-asyncio" %}
{% set nameUnderscore = "nest_asyncio" %}
{% set version = "1.5.6" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: https://pypi.io/packages/source/{{ nameUnderscore[0] }}/{{ nameUnderscore }}/{{ nameUnderscore }}-{{ version }}.tar.gz
sha256: d267cc1ff794403f7df692964d1d2a3fa9418ffea2a3f6859a439ff482fef290
build:
skip: True # [py<35]
number: 0
script: {{ PYTHON }} -m pip install --no-deps . -vv
requirements:
host:
- python
- pip
- setuptools
- setuptools_scm
- toml
- wheel
run:
- python
test:
imports:
- nest_asyncio
requires:
- pip
commands:
- pip check
about:
home: https://github.com/erdewit/nest_asyncio
license: BSD-2-Clause
license_family: BSD
license_file: LICENSE
summary: Patch asyncio to allow nested event loops
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.
doc_url: https://github.com/erdewit/nest_asyncio/blob/master/README.rst
dev_url: https://github.com/erdewit/nest_asyncio
extra:
recipe-maintainers:
- yehoshuadimarsky
- SylvainCorlay
- dhirschfeld