This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new aabf05220 convert to a copy before looping, just in case of dictionary
modification errors while looping
aabf05220 is described below
commit aabf052206253944c24faf35876431b897c0ae2c
Author: Guillermo Cruz <[email protected]>
AuthorDate: Thu May 25 10:37:45 2023 -0600
convert to a copy before looping, just in case of dictionary modification
errors while looping
---
Allura/allura/lib/plugin.py | 2 +-
Allura/allura/lib/project_create_helpers.py | 2 +-
Allura/allura/lib/search.py | 2 +-
Allura/allura/lib/spam/akismetfilter.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 7fb0357d9..949051ca4 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -1085,7 +1085,7 @@ class ProjectRegistrationProvider:
for i, tool in enumerate(project_template['tools'].keys()):
tool_config = project_template['tools'][tool]
tool_options = tool_config.get('options', {})
- for k, v in tool_options.items():
+ for k, v in list(tool_options.items()):
if isinstance(v, str):
tool_options[k] = \
string.Template(v).safe_substitute(
diff --git a/Allura/allura/lib/project_create_helpers.py
b/Allura/allura/lib/project_create_helpers.py
index fa02e8523..650058f89 100644
--- a/Allura/allura/lib/project_create_helpers.py
+++ b/Allura/allura/lib/project_create_helpers.py
@@ -273,7 +273,7 @@ def create_project_with_attrs(p, nbhd, update=False,
ensure_tools=False):
if project.app_instance(tool_config['mount_point']):
continue
tool_options = tool_config.get('options', {})
- for k, v in tool_options.items():
+ for k, v in list(tool_options.items()):
if isinstance(v, str):
tool_options[k] = string.Template(v).safe_substitute(
project.root_project.__dict__.get('root_project', {}))
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index b422b2cef..27a29f738 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -106,7 +106,7 @@ class SearchIndexable:
# convert some date/time field types to str
# from
https://github.com/django-haystack/pysolr/blob/1a8887cb2ce1c30ef9d6570704254b4520f8a959/pysolr.py#L692
- for k, value in doc.items():
+ for k, value in list(doc.items()):
if hasattr(value, "strftime"):
if hasattr(value, "hour"):
offset = value.utcoffset()
diff --git a/Allura/allura/lib/spam/akismetfilter.py
b/Allura/allura/lib/spam/akismetfilter.py
index 2f5b3f9c0..1ed46ed10 100644
--- a/Allura/allura/lib/spam/akismetfilter.py
+++ b/Allura/allura/lib/spam/akismetfilter.py
@@ -96,7 +96,7 @@ class AkismetSpamFilter(SpamFilter):
log.debug("couldn't get Snapshot for this artifact %s",
artifact)
# kw will be urlencoded, need to utf8-encode
- for k, v in kw.items():
+ for k, v in list(kw.items()):
kw[k] = h.really_unicode(v).encode('utf8')
return kw