[issue30722] Tools/demo/redemo.py broken
New submission from Christoph Sarnowski: In Python 3.6, the flags in the "re" module became members of an enum.IntFlag, whereas before they were just ints. This breaks the regex demo in Tools/demo/redemo.py. To fix this, in line 86 of redemo.py, getattr(re, name) has to be replaced by getattr(re, name).value Also, the checkbox for "LOCALE" can be removed (or fixed), as re.LOCALE is invalid for str patterns. -- components: Regular Expressions messages: 296530 nosy: Christoph Sarnowski2, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Tools/demo/redemo.py broken type: behavior versions: Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue30722> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30722] Tools/demo/redemo.py broken
Christoph Sarnowski added the comment: Hi, sorry for forgetting steps to reproduce the bug. Easiest way to see it is to start redemo.py from a console (important on windows), so you can see stdout/stderr. Then just a click on any of those flag checkboxes leads to an exception backtrace printed on the console. And to demonstrate that the flag checkbox does not work, enter ".*" (without quotes) as the pattern, and any multiline string as the string to search, and activate the checkbox "MULTILINE". Correct behaviour: no exception, all lines of the string get highlighted as the first match Erroneous (actual) behaviour: An exception traceback gets printed: '_tkinter.TclError: expected integer but got "RegexFlag.MULTILINE"' and only the first line is highlighted as first match, demonstrating that the MULTILINE flag is in fact not active. When it comes to a pull request, I could do that for the change that I proposed. But regarding the "LOCALE" flag, the better solution (in my opinion) would be to make it work instead of just removing it, but that is a more elaborate change that I am not able to spend time on. What would you suggest? a) I provide a pull request, leaving "LOCALE" flag behaviour broken b) I provide a pull request, removing "LOCALE" flag (to be introduced again when someone is willing to fix it) -- ___ Python tracker <http://bugs.python.org/issue30722> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30722] Tools/demo/redemo.py broken
Christoph Sarnowski added the comment: By the way, I confused the flags, in my error-reproduction steps, instead of the re.MULTILINE flag, it is the re.DOTALL flag that should lead to all lines being matched by ".*". -- ___ Python tracker <http://bugs.python.org/issue30722> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)
Changes by Christoph Sarnowski : -- nosy: +Christoph Sarnowski ___ Python tracker <http://bugs.python.org/issue20160> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com