I am the author of the pythonizer perl to python converter. I'm trying to bootstrap the latest version of it, and it's hanging in the re module. I ran it with -mtrace -t and it froze solid here:
Perlscan.py(449): if py == "'.pl'":
Perlscan.py(454): term = "'"
Perlscan.py(456): print('py: ', len(py), py)
py: 140 '\U0001f60e\U0001f941\U0001f3b9\U0001f3a4\U0001f3b8\U0001f49c\U0001f55b\U0001f385\U0001f3fb\u274c\u2b55\ufe0f\U0001f4af\U0001f1fa\U0001f1f8'
Perlscan.py(457): if _m := re.search(
Perlscan.py(458): r"""^(f?(?:'''|""\"|'|")(?:[A-Za-z]:)?)((?:(?:[\\/])?(?:[{][^}]+[}])*|[A-Za-z0-9_.-]*)*)[.]pl\b(.*)$""", py
Perlscan.py(457): if _m := re.search(
--- modulename: re, funcname: search
re.py(200): return _compile(pattern, flags).search(string)
--- modulename: re, funcname: _compile
re.py(290): if isinstance(flags, RegexFlag):
re.py(292): try:
re.py(293): return _cache[type(pattern), pattern, flags]
Terminated
The "Terminated" message is me killing the stuck process using a kill
command. Of course, I can't seem to reproduce this issue in a small program. Here is the snippet of source code that causes the program to freeze:
print('py: ', len(py), py)
if _m := re.search(
r"""^(f?(?:'''|""\"|'|")(?:[A-Za-z]:)?)((?:(?:[\\/])?(?:[{][^}]+[}])*|[A-Za-z0-9_.-]*)*)[.]pl\b(.*)$""", py
):
I'm using python 3.10.