File tree 2 files changed +18
-1
lines changed 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
* #80: Now raise a ``DeprecationWarning `` for all legacy
5
5
functions. Instead, users should rely on the ``files() ``
6
- API introduced in importlib_resources 1.3.
6
+ API introduced in importlib_resources 1.3. See
7
+ `Migrating from Legacy <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy >`_
8
+ for guidance on avoiding the deprecated functions.
7
9
8
10
v5.2.3
9
11
======
Original file line number Diff line number Diff line change @@ -163,6 +163,21 @@ manager.
163
163
Both relative and absolute paths work for Python 3.7 and newer.
164
164
165
165
166
+ Migrating from Legacy
167
+ =====================
168
+
169
+ Starting with Python 3.9 and ``importlib_resources `` 1.4, this package
170
+ introduced the ``files() `` API, to be preferred over the legacy API,
171
+ i.e. the functions ``open_binary ``, ``open_text ``, ``path ``,
172
+ ``contents ``, ``read_text ``, ``read_binary ``, and ``is_resource ``.
173
+
174
+ To port to the ``files() `` API, refer to the
175
+ `_legacy module <https://github.com/python/importlib_resources/blob/66ea2dc7eb12b1be2322b7ad002cefb12d364dff/importlib_resources/_legacy.py >`_
176
+ to see simple wrappers that enable drop-in replacement based on the
177
+ preferred API, and either copy those or adapt the usage to utilize the
178
+ ``files `` and ``Traversable `` interfaces directly.
179
+
180
+
166
181
Extending
167
182
=========
168
183
You can’t perform that action at this time.
0 commit comments