Skip to content

Commit

Permalink
Provide references to relevant docs and protocol definition for ease-…
Browse files Browse the repository at this point in the history
…of-use.
  • Loading branch information
jaraco committed Oct 18, 2021
1 parent ed3b2d3 commit 239ae6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ To port to the ``files()`` API, refer to the
`_legacy module <https://github.com/python/importlib_resources/blob/66ea2dc7eb12b1be2322b7ad002cefb12d364dff/importlib_resources/_legacy.py>`_
to see simple wrappers that enable drop-in replacement based on the
preferred API, and either copy those or adapt the usage to utilize the
``files`` and ``Traversable`` interfaces directly.
``files`` and
`Traversable <https://github.com/python/importlib_resources/blob/b665a3ea907d93b1b6457217f34e1bfc06f51fe6/importlib_resources/abc.py#L49-L114>`_
interfaces directly.


Extending
Expand Down
4 changes: 3 additions & 1 deletion importlib_resources/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def deprecated(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
warnings.warn(
f"{func.__name__} is deprecated. Use files() instead.",
f"{func.__name__} is deprecated. Use files() instead. "
"Refer to https://importlib-resources.readthedocs.io"
"/en/latest/using.html#migrating-from-legacy for migration advice.",
DeprecationWarning,
stacklevel=2,
)
Expand Down

0 comments on commit 239ae6d

Please sign in to comment.