@@ -77,7 +77,7 @@ asyncio.run(main())
7777```
7878
7979## Known issues
80- ### Leaked loop
80+ ### Leaked event loop
8181> [ !TIP]
8282> TL;DR: Usually you don't need to worry about this.
8383> The biggest side effect is a ` ResourceWarning: unclosed event loop ` at exit on Python 3.12+ that is hidden by default.
@@ -107,11 +107,11 @@ Or pass `loop_factory` to `asyncio.run()` on Python 3.12+:
107107asyncio.run(... , loop_factory = asyncio.new_event_loop)
108108```
109109
110- ` nest-asyncio2 ` v2 may change ` run_close_loop ` to be enalbed by default.
110+ ` nest-asyncio2 ` v2 may change ` run_close_loop ` to be enabled by default.
111111
112112## Comparison with ` nest_asyncio `
113113` nest-asyncio2 ` is a fork of the unmaintained [ ` nest_asyncio ` ] ( https://github.com/erdewit/nest_asyncio ) , with the following changes:
114- - Support setting ` run_close_loop ` to avoid [ leaked loop] ( #leaked-loop )
114+ - Support setting ` run_close_loop ` to avoid [ leaked event loop] ( #leaked-event- loop ) .
115115- Python 3.12 support
116116 - ` loop_factory ` parameter support
117117<!--
@@ -122,5 +122,14 @@ asyncio.run(..., loop_factory=asyncio.new_event_loop)
122122- Python 3.14 support
123123 - Fix broken ` asyncio.current_task() ` and others
124124 - Fix ` DeprecationWarning: 'asyncio.get_event_loop_policy' is deprecated and slated for removal in Python 3.16 `
125+ - To avoid potential bugs,
126+ ` apply() ` will warn if ` asyncio ` is already patched
127+ by ` nest_asyncio ` on Python 3.12+.
128+
129+ You can also set ` error_on_mispatched=True ` to
130+ turn the warning into a ` RuntimeError ` , regardless of the Python version.
131+ See [ #1 ] ( https://github.com/Chaoses-Ib/nest-asyncio2/issues/1 ) for details.
132+
133+ There is no behavior change on Python < 3.12.
125134
126135All interfaces are kept as they are. To migrate, you just need to change the package and module name to ` nest_asyncio2 ` .
0 commit comments