From a30c8bbfc0a11e510005f80abc3c67cf62226510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Magimel?= Date: Wed, 19 Jan 2022 11:16:42 +0100 Subject: [PATCH] docs(conf): replace pkg_resources with importlib The doc is build with python 3.8, which includes the `importlib` API to get the package version. Its use is recommended by `setuptools-scm` for the doc. --- 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 9f3c37f..2ab654b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,7 +9,7 @@ import os import sys from datetime import date -from pkg_resources import get_distribution +from importlib.metadata import version # -- Path setup -------------------------------------------------------------- @@ -31,7 +31,7 @@ project = 'django-auditlog' author = 'Jan-Jelle Kester and contributors' copyright = f'2013-{date.today().year}, {author}' -release = get_distribution('django-auditlog').version +release = version('django-auditlog') # for example take major/minor version = '.'.join(release.split('.')[:2])