Fix warning in test suite

This commit is contained in:
Ofek Lev 2024-05-01 09:18:57 -04:00
parent 245649b3e2
commit eb357884ad
4 changed files with 15 additions and 4 deletions

View file

@ -17,10 +17,15 @@
# -- Project information -----------------------------------------------------
import sys
import pkg_resources
import sphinx_rtd_theme
if sys.version_info >= (3, 8):
from importlib.metadata import Distribution
else:
from importlib_metadata import Distribution
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
@ -30,7 +35,7 @@ copyright = "Will McGugan"
author = "Will McGugan"
# The full version, including alpha/beta/rc tags
release = pkg_resources.get_distribution("rich").version
release = Distribution.from_name("rich").version
# -- General configuration ---------------------------------------------------