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

fix: Fixed dictionary keys changed during iteration" error in PoetryPyprojectHandler.set_path_dependencies_to_version() which seems to be caused by tomlkit even when modifying an existing key but setting it to a different value/type #223

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

NiklasRosenstein
Copy link
Contributor

@NiklasRosenstein NiklasRosenstein commented Mar 15, 2024

It seems tomlkit containers behave a bit differently in that you can't even update an existing key's value during iteration. The following snippet demonstrates what caused this bug:

import tomlkit

data = tomlkit.loads("""
[package]
version = "1.0"
""")

for key in data.keys():
    data[key] = "bar"

NiklasRosenstein and others added 2 commits March 15, 2024 12:12
…PyprojectHandler.set_path_dependencies_to_version()` which seems to be caused by `tomlkit` even when modifying an existing key but setting it to a different value/type
@NiklasRosenstein NiklasRosenstein merged commit 0d6348a into develop Mar 15, 2024
12 of 16 checks passed
@NiklasRosenstein NiklasRosenstein deleted the nr/fix-changed-size branch March 15, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant