Skip to content

Commit

Permalink
Use tomli for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmaxwell committed Nov 13, 2024
1 parent 8ca622b commit cf470d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ description = "A blog application for Django sites, inspired by classic WordPres
readme = "README.md"
requires-python = ">=3.10"
authors = [{ name = "Stuart Maxwell", email = "[email protected]" }]
dependencies = ["django>=4.2.0", "markdown>=3.7"]
dependencies = [
"django>=4.2.0",
"markdown>=3.7",
"tomli>=2.1.0 ; python_full_version < '3.11'",
]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 3 - Alpha",
Expand Down
5 changes: 4 additions & 1 deletion src/djpress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from pathlib import Path

import tomllib
try:
import tomllib
except ImportError:
import tomli as tomllib

# Define the path to pyproject.toml
pyproject_path = Path(__file__).parent.parent.parent / "pyproject.toml"
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

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

0 comments on commit cf470d3

Please sign in to comment.