Xqt triaged this task as "High" priority.
Xqt added a comment.
I can't reproduce it:
C:\pwb\GIT\core>pwb replace -page:user:xqt/Test a b -simulate -log
The summary message for the command line replacements will be something
like: Bot: Automatisierte Textersetzung (-a +b)
Press Enter to use this automatic message, or enter a description of the
changes your bot will make:
Retrieving 1 pages from wikipedia:de.
>>> Benutzer:Xqt/Test <<<
@@ -1 +1 @@
- Foo\nbar<code>&</code>
+ Foo\nbbr<code>&bmp;</code>
Do you want to accept these changes? ([y]es, [N]o, [e]dit original, edit
[l]atest, open in [b]rowser, [m]ore context, [a]ll, [q]uit): y
Edit summary: Bot: Automatisierte Textersetzung (-a +b)
SIMULATION: edit action blocked.
Page [[Benutzer:Xqt/Test]] saved
Anyway this is strange because I've no glue where/when the sys.modules dict
is changed. We only have:
for module in sys.modules.values():
filename = version.get_module_filename(module)
if not filename:
continue
param = {'sep': ' '}
if PYTHON_VERSION >= (3, 6, 0):
param['timespec'] = 'seconds'
mtime = version.get_module_mtime(module).isoformat(**param)
with
def get_module_filename(module) -> Optional[str]:
if hasattr(module, '__file__'):
filename = module.__file__
if not filename or not os.path.exists(filename):
return None
program_dir = _get_program_dir()
if filename[:len(program_dir)] == program_dir:
return filename
return None
and
def get_module_mtime(module):
filename = get_module_filename(module)
if filename:
return datetime.datetime.fromtimestamp(os.stat(filename).st_mtime)
return None
It is obvious that this will fail:
x = {1:1, 2:2, 3:3}
for i in x.values():
print(i)
if i == 2:
x[4] = 5
1
2
Traceback (most recent call last):
File "<pyshell#13>", line 1, in <module>
for i in x.values():
RuntimeError: dictionary changed size during iteration
TASK DETAIL
https://phabricator.wikimedia.org/T302774
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Xqt, Aklapper, matej_suchanek, pywikibot-bugs-list, Jyoo1011, JohnsonLee01,
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont,
JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]