XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

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

e1b7471f
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

7 个文件 +8 -8
Modified etc/unittest/asyncio.py +1 -1
@@ -1,6 +1,6 @@
1 1 import asyncio
2 2 try:
3 import nest_asyncio
3 import nest_asyncio2 as nest_asyncio
4 4 has_nest_asyncio = True
5 5 except:
6 6 has_nest_asyncio = False
Modified g4f/errors.py +1 -1
@@ -49,7 +49,7 @@ class MissingRequirementsError(G4FError):
49 49
50 50
51 51 class NestAsyncioError(MissingRequirementsError):
52 """Raised when 'nest_asyncio' is missing."""
52 """Raised when 'nest_asyncio2' is missing."""
53 53 pass
54 54
55 55
Modified g4f/providers/asyncio.py +2 -2
@@ -7,7 +7,7 @@ from typing import Optional, Callable, AsyncIterator, Iterator
7 7 from ..errors import NestAsyncioError
8 8
9 9 try:
10 import nest_asyncio
10 import nest_asyncio2 as nest_asyncio
11 11 has_nest_asyncio = True
12 12 except ImportError:
13 13 has_nest_asyncio = False
@@ -28,7 +28,7 @@ def get_running_loop(check_nested: bool) -> Optional[AbstractEventLoop]:
28 28 if has_nest_asyncio:
29 29 nest_asyncio.apply(loop)
30 30 elif check_nested:
31 raise NestAsyncioError('Install "nest_asyncio" package | pip install -U nest_asyncio')
31 raise NestAsyncioError('Install "nest-asyncio2" package | pip install -U nest-asyncio2')
32 32 return loop
33 33 except RuntimeError:
34 34 pass
Modified requirements-min.txt +1 -1
@@ -2,4 +2,4 @@ requests
2 2 aiohttp
3 3 brotli
4 4 pycryptodome
5 nest_asyncio
5 nest-asyncio2
Modified requirements-slim.txt +1 -1
@@ -3,7 +3,7 @@ pycryptodome
3 3 curl_cffi>=0.6.2
4 4 aiohttp
5 5 certifi
6 nest_asyncio
6 nest-asyncio2
7 7 werkzeug
8 8 pillow
9 9 fastapi
Modified requirements.txt +1 -1
@@ -4,7 +4,7 @@ curl_cffi>=0.6.2
4 4 aiohttp
5 5 certifi
6 6 browser_cookie3
7 nest_asyncio
7 nest-asyncio2
8 8 werkzeug
9 9 pillow
10 10 platformdirs
Modified setup.py +1 -1
@@ -14,7 +14,7 @@ INSTALL_REQUIRE = [
14 14 "aiohttp",
15 15 "brotli",
16 16 "pycryptodome",
17 "nest_asyncio",
17 "nest-asyncio2",
18 18 ]
19 19
20 20 EXTRA_REQUIRE = {