Skip to content

list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration #84507

@mmohrhard

Description

@mmohrhard
mannequin
BPO 40327
Nosy @rhettinger, @nirs, @serhiy-storchaka, @miss-islington, @mmohrhard
PRs
  • bpo-40327: Improve atomicity speed and memory efficiency of the items() loop #19628
  • [3.8] bpo-40327: Improve atomicity, speed, and memory efficiency of the items() loop (GH-19628) #19640
  • 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 = None
    closed_at = <Date 2020-05-22.23:15:10.063>
    created_at = <Date 2020-04-19.08:24:06.095>
    labels = ['extension-modules', 'type-bug', '3.7']
    title = 'list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration'
    updated_at = <Date 2021-08-26.00:30:48.133>
    user = 'https://github.com/mmohrhard'

    bugs.python.org fields:

    activity = <Date 2021-08-26.00:30:48.133>
    actor = 'Andrew Nelson'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-22.23:15:10.063>
    closer = 'rhettinger'
    components = ['Extension Modules']
    creation = <Date 2020-04-19.08:24:06.095>
    creator = 'Markus Mohrhard'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40327
    keywords = ['patch']
    message_count = 8.0
    messages = ['366762', '366798', '366804', '366854', '366952', '369660', '373399', '400301']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'nirs', 'serhiy.storchaka', 'miss-islington', 'Markus Mohrhard', 'Andrew Nelson']
    pr_nums = ['19628', '19640']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40327'
    versions = ['Python 3.7']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifeextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions