fix: Update references from 'nest_asyncio' to 'nest-asyncio2' across the codebase

This commit is contained in:
hlohaus
2026-01-27 11:29:43 +01:00
parent f03c08d66f
commit e1b7471f9f
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import asyncio import asyncio
try: try:
import nest_asyncio import nest_asyncio2 as nest_asyncio
has_nest_asyncio = True has_nest_asyncio = True
except: except:
has_nest_asyncio = False has_nest_asyncio = False
+1 -1
View File
@@ -49,7 +49,7 @@ class MissingRequirementsError(G4FError):
class NestAsyncioError(MissingRequirementsError): class NestAsyncioError(MissingRequirementsError):
"""Raised when 'nest_asyncio' is missing.""" """Raised when 'nest_asyncio2' is missing."""
pass pass
+2 -2
View File
@@ -7,7 +7,7 @@ from typing import Optional, Callable, AsyncIterator, Iterator
from ..errors import NestAsyncioError from ..errors import NestAsyncioError
try: try:
import nest_asyncio import nest_asyncio2 as nest_asyncio
has_nest_asyncio = True has_nest_asyncio = True
except ImportError: except ImportError:
has_nest_asyncio = False has_nest_asyncio = False
@@ -28,7 +28,7 @@ def get_running_loop(check_nested: bool) -> Optional[AbstractEventLoop]:
if has_nest_asyncio: if has_nest_asyncio:
nest_asyncio.apply(loop) nest_asyncio.apply(loop)
elif check_nested: elif check_nested:
raise NestAsyncioError('Install "nest_asyncio" package | pip install -U nest_asyncio') raise NestAsyncioError('Install "nest-asyncio2" package | pip install -U nest-asyncio2')
return loop return loop
except RuntimeError: except RuntimeError:
pass pass
+1 -1
View File
@@ -2,4 +2,4 @@ requests
aiohttp aiohttp
brotli brotli
pycryptodome pycryptodome
nest_asyncio nest-asyncio2
+1 -1
View File
@@ -3,7 +3,7 @@ pycryptodome
curl_cffi>=0.6.2 curl_cffi>=0.6.2
aiohttp aiohttp
certifi certifi
nest_asyncio nest-asyncio2
werkzeug werkzeug
pillow pillow
fastapi fastapi
+1 -1
View File
@@ -4,7 +4,7 @@ curl_cffi>=0.6.2
aiohttp aiohttp
certifi certifi
browser_cookie3 browser_cookie3
nest_asyncio nest-asyncio2
werkzeug werkzeug
pillow pillow
platformdirs platformdirs
+1 -1
View File
@@ -14,7 +14,7 @@ INSTALL_REQUIRE = [
"aiohttp", "aiohttp",
"brotli", "brotli",
"pycryptodome", "pycryptodome",
"nest_asyncio", "nest-asyncio2",
] ]
EXTRA_REQUIRE = { EXTRA_REQUIRE = {