Skip to content

Commit

Permalink
docs: switch to importlib_metadata to remove pkg_resources deprecat…
Browse files Browse the repository at this point in the history
…ion warning (#610)

Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
  • Loading branch information
behnazh-w authored Jan 22, 2024
1 parent 7d283dc commit 2d6a5c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import datetime
import os
import sys

import pkg_resources
from importlib import metadata as importlib_metadata

# Path to source.
sys.path.insert(0, os.path.abspath("../../src"))
Expand All @@ -22,7 +21,7 @@

project = "Macaron"
copyright = f"{year}, Oracle and/or its affiliates. " + "All rights reserved" # noqa: A001
version = pkg_resources.get_distribution("macaron").version
version = importlib_metadata.version("macaron")
html_logo = "assets/macaron.svg"
author = "Macaron"

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,5 @@ filterwarnings = [
# https://docs.pytest.org/en/latest/how-to/failures.html#warning-about-unraisable-exceptions-and-unhandled-thread-exceptions
"error::pytest.PytestUnraisableExceptionWarning",
"error::pytest.PytestUnhandledThreadExceptionWarning",
"error::DeprecationWarning:pkg_resources",
]

0 comments on commit 2d6a5c8

Please sign in to comment.