This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: FastPath.zip_children can give duplicate results on Python 3.8
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jaraco Nosy List: barry, jaraco
Priority: normal Keywords: patch

Created on 2020-09-24 20:30 by jaraco, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 22403 closed jaraco, 2020-09-24 20:43
PR 22404 merged jaraco, 2020-09-24 22:17
Messages (3)
msg377461 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2020-09-24 20:30
Scott J. reports in an e-mail:

When upgrading to Python 3.8.2, we noticed two issues in
importlib.metadata which are not present in importlib_metadata.

1.  FastPath.zip_children() is very slow for large zips. Python 3.8.3
    > already has a fix for this
    > ([[bug]{.ul}](,
    > [[changelog]{.ul}](,
    > which includes merging in importlib_metadata 1.5.0.

2.  FastPath.zip_children() can give duplicate results, causing
    > duplicate results in entry_points(). This issue was reported in
    > importlib_metadata in March
    > ([[link]{.ul}](
    > and fixed in importlib_metadata 1.5.2
    > ([[changelog]{.ul}](

In June, importlib_metadata 1.6.1 (including the fix for \#2) was merged
into Python
and backported to 3.9
However, the backport for Python 3.8 was **not** merged
Jason said:

> Of course this can\'t backport to 3.8; importlib.resources.files
> doesn\'t exist there. No problem. Bug fixes will need to be backported
> specially if needed.

As far as I can tell, no version of importlib_metadata newer than 1.5.0
has ever been merged into Python 3.8, and so bug \#2 is still present
(tested in 3.8.6rc1). This seems like it falls under the \"bug fixes if
needed\" category. We just need to fix the duplicate entries, as
reported in importlib_metadata. This should be trivial. The diff in
python 3.9 is
msg377462 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2020-09-24 20:31
The relevant commit is already present in importlib_metadata as [079ca1cb701a5f4aab0a9cb00b0782c7ea8fb70b](
msg378699 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2020-10-15 21:05
New changeset 967fddae2fe48f297563c358bdbdde1e2cfed4ee by Jason R. Coombs in branch '3.8':
[3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (#22404)
Date User Action Args
2022-04-11 14:59:36adminsetgithub: 86021
2021-05-27 01:12:30jaracosetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-15 21:05:20jaracosetmessages: + msg378699
2020-09-24 22:17:54jaracosetpull_requests: + pull_request21444
2020-09-24 20:43:10jaracosetkeywords: + patch
stage: patch review
pull_requests: + pull_request21443
2020-09-24 20:31:51jaracosetmessages: + msg377462
components: + Library (Lib)
2020-09-24 20:30:47jaracocreate