diff --git a/src/sphinxcontrib/hep/pdgref/__init__.py b/src/sphinxcontrib/hep/pdgref/__init__.py index 83229b5..c789a6a 100644 --- a/src/sphinxcontrib/hep/pdgref/__init__.py +++ b/src/sphinxcontrib/hep/pdgref/__init__.py @@ -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))