Skip to content

Python: Bug: Please stop using deprecated/archived nest_asyncio package #13090

Closed

Description

Describe the bug
nest_asyncio has been archived by the owner for over a year now.

This has created problems with asyncio support in newer versions of Python and other packages which depend on these newer features. Specifically Python 3.12+ added an optional loop_factory parameter, however the patched version of asyncio.run from nest_asyncio's patched run method doesn't pass-through this keyword argument resulting in errors like:

> asyncio_run(amain(), loop_factory=get_loop_factory())
E TypeError: _patch_asyncio.<locals>.run() got an unexpected keyword argument 'loop_factory'

To Reproduce
Attempt to use newer asyncio features

Expected behavior
Don't patch the stdlib

Screenshots
N/A

Platform

Additional context
N/A

Activity

  1. changed the title [-]Bug: Please stop using deprecated/archived `nest_asyncio` package[/-] [+]Python: Bug: Please stop using deprecated/archived `nest_asyncio` package[/+] on Sep 8, 2025
  2. eavanvalkenburg commented on Sep 10, 2025

    @eavanvalkenburg
    Member

    Unfortunately we currently can't do without it for the Handlebars templates, so we either remove those, or we would need a new handlebars package that can call async functions.

  3. Chaoses-Ib commented on Nov 20, 2025

    @Chaoses-Ib

    I've made a fork of nest-asyncio to fix support for Python 3.12 and 3.14: nest-asyncio2. Since it's also used in my own project, I'm going to maintain it for a long time. There is no behavior change on Python < 3.12, and it's already tested with ipykernel, https://github.com/NVIDIA/NeMo-Agent-Toolkit, https://github.com/pyvista/pyvista, https://github.com/Chaoses-Ib/ComfyScript, so it should be a safe replacement.

  4. github-actions commented on Feb 27, 2026

    @github-actions
    Contributor

    This issue is stale because it has been open for 90 days with no activity.

  5. added
    staleIssue is stale because it has been open for a while and has no activity
    on Feb 27, 2026
  6. github-actions commented on Mar 13, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingpythonPull requests for the Python Semantic KernelstaleIssue is stale because it has been open for a while and has no activity

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions