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

Avoid RuntimeError in module detection #13765

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

kenodegard
Copy link
Contributor

Description

If modules are loaded (e.g. lazily loaded modules) while iterating over sys.modules a RuntimeError is thrown. We avoid this by creating a copy of the module.

Resolves #13754

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@kenodegard kenodegard requested a review from a team as a code owner April 4, 2024 19:17
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Apr 4, 2024
Copy link

codspeed-hq bot commented Apr 4, 2024

CodSpeed Performance Report

Merging #13765 will not alter performance

Comparing kenodegard:sys.modules-RuntimeError (f7feeae) with main (2aafc98)

Summary

✅ 21 untouched benchmarks

@kenodegard kenodegard merged commit c063c08 into conda:main Apr 5, 2024
68 checks passed
@kenodegard kenodegard deleted the sys.modules-RuntimeError branch April 5, 2024 16:31
ifitchet pushed a commit to ifitchet/conda that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

RuntimeError: dictionary changed size during iteration with Conda 24.3
3 participants