From 340a01d3486251e28467b9546dbda31dd35d717b Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 23 May 2022 10:29:11 +0200 Subject: [PATCH] Replace importlib with pkg_resources with. Readthedoc uses Python3.7 Revert a30c8bbfc0a11e510005f80abc3c67cf62226510 --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2a4c7b4..dc3dc71 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,7 +9,7 @@ import os import sys from datetime import date -from importlib.metadata import version +from pkg_resources import get_distribution # -- Path setup -------------------------------------------------------------- @@ -32,7 +32,7 @@ project = "django-auditlog" author = "Jan-Jelle Kester and contributors" copyright = f"2013-{date.today().year}, {author}" -release = version("django-auditlog") +release = get_distribution('django-auditlog').version # for example take major/minor version = ".".join(release.split(".")[:2])