Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastPath.zip_children can give duplicate results on Python 3.8 #86021

Closed
jaraco opened this issue Sep 24, 2020 · 3 comments
Closed

FastPath.zip_children can give duplicate results on Python 3.8 #86021

jaraco opened this issue Sep 24, 2020 · 3 comments
Assignees
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@jaraco
Copy link
Member

jaraco commented Sep 24, 2020

BPO 41855
Nosy @warsaw, @jaraco
PRs
  • (merge after 3.8.6 final) [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() #22403
  • [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() #22404
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/jaraco'
    closed_at = <Date 2021-05-27.01:12:30.519>
    created_at = <Date 2020-09-24.20:30:47.380>
    labels = ['3.8', 'type-bug', 'library']
    title = 'FastPath.zip_children can give duplicate results on Python 3.8'
    updated_at = <Date 2021-05-27.01:12:30.519>
    user = 'https://github.com/jaraco'

    bugs.python.org fields:

    activity = <Date 2021-05-27.01:12:30.519>
    actor = 'jaraco'
    assignee = 'jaraco'
    closed = True
    closed_date = <Date 2021-05-27.01:12:30.519>
    closer = 'jaraco'
    components = ['Library (Lib)']
    creation = <Date 2020-09-24.20:30:47.380>
    creator = 'jaraco'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41855
    keywords = ['patch']
    message_count = 3.0
    messages = ['377461', '377462', '378699']
    nosy_count = 2.0
    nosy_names = ['barry', 'jaraco']
    pr_nums = ['22403', '22404']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41855'
    versions = ['Python 3.8']

    @jaraco
    Copy link
    Member Author

    jaraco commented Sep 24, 2020

    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
    ([bug]{.ul},
    [PR]{.ul})
    and backported to 3.9
    ([PR]{.ul}).
    However, the backport for Python 3.8 was **not** merged
    ([PR]{.ul}).
    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
    [here]{.ul}.

    @jaraco jaraco added the 3.8 only security fixes label Sep 24, 2020
    @jaraco jaraco self-assigned this Sep 24, 2020
    @jaraco jaraco added type-bug An unexpected behavior, bug, or error 3.8 only security fixes labels Sep 24, 2020
    @jaraco jaraco self-assigned this Sep 24, 2020
    @jaraco jaraco added the type-bug An unexpected behavior, bug, or error label Sep 24, 2020
    @jaraco
    Copy link
    Member Author

    jaraco commented Sep 24, 2020

    The relevant commit is already present in importlib_metadata as 079ca1cb701a5f4aab0a9cb00b0782c7ea8fb70b.

    @jaraco jaraco added stdlib Python modules in the Lib dir labels Sep 24, 2020
    @jaraco
    Copy link
    Member Author

    jaraco commented Oct 15, 2020

    New changeset 967fdda by Jason R. Coombs in branch '3.8':
    [3.8] bpo-41855: Fix duplicate results in FastPath.zip_children() (bpo-22404)
    967fdda

    @jaraco jaraco closed this as completed May 27, 2021
    @jaraco jaraco closed this as completed May 27, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant