Skip to content

Commit

Permalink
BREAK: add package name deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Sep 28, 2023
1 parent fb1edfa commit f2384bb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sphinxcontrib/hep/pdgref/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
"""Link to PDG reviews and listings in Sphinx documentation."""

from typing import Any, Dict
from warnings import warn

from sphinx.application import Sphinx

from .role import URLPattern, pdgref

warn(
(
"The sphinxcontrib.hep.pdgref package is deprecated. Please install the"
" [sphinx-hep-pdgref](https://pypi.org/project/sphinx-hep-pdgref) package and"
" import `sphinx_hep_pdg` instead."
),
category=DeprecationWarning,
stacklevel=2,
)


def setup(app: Sphinx) -> Dict[str, Any]:
app.add_role("pdg-listing", role=pdgref(pattern=URLPattern.LISTING))
Expand Down

0 comments on commit f2384bb

Please sign in to comment.