Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: switch to importlib_metadata to remove pkg_resources deprecation warning #610

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -245,4 +245,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",
]
Loading