Skip to content

contrib/sync-places: filter tags during creation #1651

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bryanbrattlof
Copy link

@bryanbrattlof bryanbrattlof commented May 6, 2025

Description
In older versions of python, when iterating over a dictionary, a copy would be created allowing us to modify the dictionary while we're iterating over it. Newer versions however do not make this copy and now raise runtime errors when the keys change while we're iterating over them.

Transform the key/values during creation of the 'tags' dictionary to avoid having to delete keys afterwards.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

Fixes #1312

Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.8%. Comparing base (6d8febb) to head (b8dd4c9).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1651   +/-   ##
======================================
  Coverage    55.8%   55.8%           
======================================
  Files         170     170           
  Lines       13388   13388           
======================================
  Hits         7472    7472           
  Misses       5916    5916           
Flag Coverage Δ
3.10 55.8% <ø> (ø)
3.11 55.8% <ø> (ø)
3.12 55.8% <ø> (ø)
3.13 55.7% <ø> (ø)
3.9 55.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Emantor Emantor force-pushed the sync-places-fix branch from 92968ff to 588258a Compare May 7, 2025 08:02
In older versions of python, when iterating over a dictionary, a copy
would be created allowing us to modify the dictionary while we're
iterating over it. Newer versions however do not make this copy and now
raise runtime errors when the keys change while we're iterating over
them.

Transform the key/values during creation of the 'tags' dictionary to
avoid having to delete keys afterwards.

Signed-off-by: Bryan Brattlof <[email protected]>
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.

1 participant