Skip to content

os.environ raises RuntimeError: dictionary changed size during iteration #74626

@osantana

Description

@osantana
mannequin
BPO 30441
Nosy @mdickinson, @pitrou, @vadmium, @serhiy-storchaka, @osantana, @JelleZijlstra
PRs
  • bpo-30441: Fix bug when modifying os.environ while iterating over it #2409
  • [3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). #2556
  • [3.5] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). #2557
  • Files
  • fix_os_environ_iteration_issue.diff: patch with fix and test
  • fix_os_environ_iter_issue_low_level_thread_lock.diff: (use this) use _thread.allocate_lock() as lock provider
  • fix_os_environ_iter_issue_threading_lock.diff
  • fix_os_environ_iter_issue_low_level_thread_lock_2.diff
  • 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 2017-07-04.05:19:33.068>
    created_at = <Date 2017-05-23.14:35:50.699>
    labels = ['3.7', 'type-bug', 'library']
    title = 'os.environ raises RuntimeError: dictionary changed size during iteration'
    updated_at = <Date 2017-07-05.03:46:48.399>
    user = 'https://github.com/osantana'

    bugs.python.org fields:

    activity = <Date 2017-07-05.03:46:48.399>
    actor = 'osantana'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-07-04.05:19:33.068>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2017-05-23.14:35:50.699>
    creator = 'osantana'
    dependencies = []
    files = ['46889', '46896', '46897', '46902']
    hgrepos = []
    issue_num = 30441
    keywords = ['patch']
    message_count = 27.0
    messages = ['294250', '294257', '294261', '294352', '294354', '294398', '294406', '294407', '294444', '294445', '294452', '294453', '294456', '294457', '294459', '294460', '294467', '294468', '294498', '296122', '296847', '296904', '297486', '297625', '297626', '297627', '297695']
    nosy_count = 7.0
    nosy_names = ['mark.dickinson', 'pitrou', 'martin.panter', 'serhiy.storchaka', 'osantana', 'JelleZijlstra', 'Danilo Shiga']
    pr_nums = ['2409', '2556', '2557']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue30441'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions