Skip to main content
info:

monkey patch asyncio modules for expected behaviour

https://img.shields.io/travis/wikibusiness/asyncio_monkey.svg https://img.shields.io/pypi/v/asyncio_monkey.svg

Installation

pip install asyncio_monkey

Usage

# it must be done before any import asyncio statement, once per project
# best place is __init__.py of You'r application
from asyncio_monkey import patch_all  # noqa isort:skip
patch_all()

or call the one you need

# it must be done before any import asyncio statement, once per project
# best place is __init__.py of You'r application
import asyncio_monkey  # noqa isort:skip

asyncio_monkey.patch_gather()
asyncio_monkey.patch_log_destroy_pending()
asyncio_monkey.patch_get_event_loop()
asyncio_monkey.patch_lock()

Features

  • Cancel pending tasks gather if any task fails, source

  • Disables get_event_loop returns currently running loop, even if MainThread loop is None, docs , source

  • Disables silent destroying futures inside asyncio.gather source

  • Prevents asyncio.Lock deadlock after cancellation source

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncio_monkey-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file asyncio_monkey-0.1.1.tar.gz.

File metadata

File hashes

Hashes for asyncio_monkey-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0743e7852edc3f854eff2c1f3591d965a09e252c587b7d3fe19b5d56b256237e
MD5 e18c213f1aa98992b2cb0e82e9215289
BLAKE2b-256 ec6abf58745119e289cfb399113357b8073d76e150e601c80921621f1729731c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1.0

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page