Skip to content

Commit 239ae6d

Browse files
committed
Provide references to relevant docs and protocol definition for ease-of-use.
1 parent ed3b2d3 commit 239ae6d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/using.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ To port to the ``files()`` API, refer to the
175175
`_legacy module <https://github.com/python/importlib_resources/blob/66ea2dc7eb12b1be2322b7ad002cefb12d364dff/importlib_resources/_legacy.py>`_
176176
to see simple wrappers that enable drop-in replacement based on the
177177
preferred API, and either copy those or adapt the usage to utilize the
178-
``files`` and ``Traversable`` interfaces directly.
178+
``files`` and
179+
`Traversable <https://github.com/python/importlib_resources/blob/b665a3ea907d93b1b6457217f34e1bfc06f51fe6/importlib_resources/abc.py#L49-L114>`_
180+
interfaces directly.
179181

180182

181183
Extending

importlib_resources/_legacy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def deprecated(func):
1616
@functools.wraps(func)
1717
def wrapper(*args, **kwargs):
1818
warnings.warn(
19-
f"{func.__name__} is deprecated. Use files() instead.",
19+
f"{func.__name__} is deprecated. Use files() instead. "
20+
"Refer to https://importlib-resources.readthedocs.io"
21+
"/en/latest/using.html#migrating-from-legacy for migration advice.",
2022
DeprecationWarning,
2123
stacklevel=2,
2224
)

0 commit comments

Comments
 (0)