Skip to content

gyp: list(dict) so we can del dict[key] while iterating #2009

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Dec 31, 2019

Fixes #1998

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

@cclauss cclauss changed the title gyp: list(dict) so we can del dict(key) while iterating gyp: list(dict) so we can del dict[key] while iterating Dec 31, 2019
@rvagg
Copy link
Member

rvagg commented Jan 1, 2020

@cclauss any idea why this doesn't show up in our tests & linting and doesn't appear to be a widespread problem? Is it likely just some specific thing that an addon is doing with gyp that we're not covering that's hitting this code that's not normally hit?

@cclauss
Copy link
Contributor Author

cclauss commented Jan 1, 2020

Agreed. It is a situation that must be happening rarely in the wild and not covered in our test cases.

rvagg pushed a commit that referenced this pull request Jan 6, 2020
Fixes #1998

Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: #2009
@rvagg
Copy link
Member

rvagg commented Jan 6, 2020

landed 14f2a07

@rvagg rvagg closed this Jan 6, 2020
@rvagg rvagg deleted the list(dict) branch January 6, 2020 03:20
rvagg pushed a commit that referenced this pull request Jan 6, 2020
Fixes #1998

Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: #2009
rvagg pushed a commit that referenced this pull request Feb 3, 2020
Fixes #1998

Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: #2009
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting a key from a dictionary while iterating over it raises an exception in Python 3
2 participants