Closed gilch closed 1 month ago
Hi,
Enso source code itself does not contain deprecated regexses, they all were fixed. This error most likely originates when some dynamically evaluated codes interprets a path as a regex (I have only one such warning on my setup). If you have more, this is probably the case. It is very hard to debug this.
C:\Users\micro\AppData\Roaming\Enso Launcher\commands\web_search.py:81: SyntaxWarning: invalid escape sequence '\:'
re.compile("(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~/|/)?(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?"),
C:\Users\micro\AppData\Roaming\Enso Launcher\commands\web_search.py:311: SyntaxWarning: invalid escape sequence '\w'
There's my output, if it helps.
Strangely, there is some odd string, probably from the previous version. the correct one is:
re.compile(r"(?#Protocol)(?:(?:ht|f)tp(?:s?):\/\/|~/|/)?(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?"),
If you have overwritten the existing installation I'd recommend a clean install, because line 311 in web_search.py seems is pretty innocent in the v1.1.
Yeah, I installed 1.1 without uninstalling 1.0 first. That usually works with most application upgrades and the installer didn't complain. If I use the 1.1 uninstaller, would that uninstall cleanly? I can certainly check the install folder for stray files, but if I have to manually clean up the registry, I wouldn't know where to look.
The warning seems to have disappeared with a reinstall. It used to pop up immediately. The only issue remaining is that the installer didn't catch it or recommend uninstalling first. Not too serious.
Actually it recommends, but this was added only in recent versions. It may not work with older ones. So, I close the issue then.
I only noticed this after upgrading to version 1.1 when using
debug.bat
for investigating an unrelated issue.In case you weren't aware, If I run Enso using the
debug.bat
, I get a couple ofSyntaxWarning
s about invalid escape sequences inweb_search.py
. I don't think the invalid escapes per se will cause any errors currently on Python 3.12, but it's expected that deprecated syntax will eventually stop working on future Python versions.The presence of these warnings means it's also possible that the regex wasn't written correctly and isn't working as intended. That's why the invalid escapes were deprecated in the first place. It can help uncover subtle bugs that might otherwise go unnoticed.