Skip to content

Commit

Permalink
fix: check major version at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Feb 12, 2023
1 parent b37bcf0 commit 547b4b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions mafic/__libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ def dumps(obj: Any) -> str:

except ImportError:
from json import dumps, loads


if version_info.major != 2:
raise RuntimeError(f"Mafic requires version 2 of {library}.")
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ python = "^3.8"
aiohttp = "^3.6.0"
orjson = {version = "^3.8.0", optional = true}
yarl = "^1.0.0"
nextcord = {version = "^2.0.0", optional = true}
disnake = {version = "^2.0.0", optional = true}
py-cord = {version = "^2.0.0", optional = true}
"discord.py" = {version = "^2.0.0", optional = true}

[tool.poetry.extras]
speedups = ["orjson"]

[tool.poetry.group.dev.dependencies]
pyright = "1.1.289"
Expand Down

0 comments on commit 547b4b4

Please sign in to comment.