Skip to content

Commit

Permalink
➕ Require tomli for Python < 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Jan 10, 2025
1 parent 6d9ce13 commit 74d94df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies = [
"semver",
"spython>=0.3.0",
"tabulate>=0.8.6",
"tomli; python_version < '3.11'",
"tornado",
"websocket-client"
]
Expand Down
7 changes: 6 additions & 1 deletion src/cpac/helpers/store_optional_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
from itertools import chain
from pathlib import Path
from pickle import dump, load
import tomllib
from typing import cast

from packaging.requirements import Requirement

try:
import tomllib
except ImportError:
# Python < 3.11
import tomli as tomllib

PICKLE_PATH = Path(__file__).parents[1] / "optional_dependencies.pkl"


Expand Down

0 comments on commit 74d94df

Please sign in to comment.