diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-05-31 16:19:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 16:19:42 (GMT) |
commit | c34ed08d975fb7daa7b329f7c631647782290393 (patch) | |
tree | 6f6456952acac2ba522a559fae2570e769c322b4 /Misc | |
parent | 410b70d39d9d77384f8b8597560f6731530149ca (diff) | |
download | cpython-c34ed08d975fb7daa7b329f7c631647782290393.zip cpython-c34ed08d975fb7daa7b329f7c631647782290393.tar.gz cpython-c34ed08d975fb7daa7b329f7c631647782290393.tar.bz2 |
bpo-44246: Restore compatibility in entry_points (GH-26468)
* bpo-44246: Entry points performance improvements.
From importlib_metadata 4.3.1.
* bpo-44246: Sync with importlib_metadata 4.4
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2021-05-31-11-34-56.bpo-44246.yHAkF0.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-05-31-11-34-56.bpo-44246.yHAkF0.rst b/Misc/NEWS.d/next/Library/2021-05-31-11-34-56.bpo-44246.yHAkF0.rst new file mode 100644 index 0000000..b93f8b0 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-05-31-11-34-56.bpo-44246.yHAkF0.rst @@ -0,0 +1,7 @@ +In ``importlib.metadata``, restore compatibility in the result from +``Distribution.entry_points`` (``EntryPoints``) to honor expectations in +older implementations and issuing deprecation warnings for these cases: A. ``EntryPoints`` objects are once again mutable, allowing for ``sort()`` +and other list-based mutation operations. Avoid deprecation warnings by +casting to a mutable sequence (e.g. ``list(dist.entry_points).sort()``). B. ``EntryPoints`` results once again allow for access by index. To avoid +deprecation warnings, cast the result to a Sequence first (e.g. +``tuple(dist.entry_points)[0]``). |