Skip to content

Fixed Pythonwin's editor failing due to invalid regex import#2419

Merged
Avasam merged 3 commits intomhammond:mainfrom
Avasam:Fix-old-Python-1-regex
Oct 25, 2024
Merged

Fixed Pythonwin's editor failing due to invalid regex import#2419
Avasam merged 3 commits intomhammond:mainfrom
Avasam:Fix-old-Python-1-regex

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Oct 23, 2024

I found it odd that pywin32 depends on a third-party regex package. Looking up regex.symcomp and the history of stdlib regex package being renamed re, it seems this has been invalid since Python 2 ! Is this entire thing all just dead code ?

There's not even any issue mentioning AttributeError: module 'regex' has no attribute 'symcomp' or No module named 'regex'. The only somewhat related mention is in #1467 where the user string-searched, not import.

Comment thread CHANGES.txt Outdated
# Group(1) is the filename, group(2) is the lineno.
# regexGrepResult=regex.compile(r"^\([a-zA-Z]:.*\)(\([0-9]+\))")
# regexGrep=re.compile(r"^([a-zA-Z]:[^(]*)\((\d+)\)")
# regexGrep = re.compile(r"^([a-zA-Z]:[^(]*)\((\d+)\)")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's the point of this line. Debugging?

Suggested change
# regexGrep = re.compile(r"^([a-zA-Z]:[^(]*)\((\d+)\)")

@Avasam Avasam merged commit 30e3a75 into mhammond:main Oct 25, 2024
@Avasam Avasam deleted the Fix-old-Python-1-regex branch October 25, 2024 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants