Skip to content

Commit

Permalink
Remove pkg_resources for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Neraste committed Jul 28, 2024
1 parent 3f19fbf commit 315556c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dakara_server/internal/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from django.conf import settings
from pkg_resources import parse_version
from packaging.version import parse

logger = logging.getLogger("django")

Expand All @@ -12,6 +12,6 @@ def check_version():
logger.info("Dakara server %s (%s)", settings.VERSION, settings.DATE)

# check version is a release
version = parse_version(settings.VERSION)
version = parse(settings.VERSION)
if version.is_prerelease:
logger.warning("You are running a dev version, use it at your own risks!")
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Django>=3.2.16,<3.3.0
djangorestframework>=3.13.0,<3.14.0
Markdown>=3.3.0,<3.3.4; python_version < "3.8"
Markdown>=3.4.1,<3.5.0; python_version >= "3.8"
packaging>=21.3,<22.0
Pygments>=2.13.0,<2.14.0
python-decouple>=3.6,<3.7
setuptools>=68

0 comments on commit 315556c

Please sign in to comment.