ujson is now optional
This commit is contained in:
parent
0f39f6158e
commit
dc760a8b67
@ -2,7 +2,11 @@ from pathlib import Path
|
||||
from typing import Any, Union
|
||||
|
||||
import aiofiles
|
||||
from ujson import dumps, loads
|
||||
|
||||
try:
|
||||
from ujson import dumps, loads
|
||||
except ImportError:
|
||||
from json import dumps, loads
|
||||
|
||||
from libbot.sync import nested_set
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
from pathlib import Path
|
||||
from typing import Any, Union
|
||||
|
||||
from ujson import dumps, loads
|
||||
try:
|
||||
from ujson import dumps, loads
|
||||
except ImportError:
|
||||
from json import dumps, loads
|
||||
|
||||
|
||||
def json_read(path: Union[str, Path]) -> Any:
|
||||
|
@ -23,11 +23,12 @@ classifiers = [
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Topic :: Utilities",
|
||||
]
|
||||
dependencies = ["aiofiles~=23.1.0", "ujson==5.7.0"]
|
||||
dependencies = ["aiofiles~=23.1.0"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
pycord = ["py-cord>=2.0.0"]
|
||||
pyrogram = ["pyrogram>=2.0.0"]
|
||||
speed = ["ujson==5.7.0"]
|
||||
|
||||
[project.urls]
|
||||
Source = "https://git.end-play.xyz/profitroll/LibBotUniversal"
|
||||
|
Loading…
Reference in New Issue
Block a user