-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[lit] Use raw strings for backslash escapes to fix SyntaxWarnings #70907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (`\\`). Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`: ``` llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out) ``` Other such warning present in 17.0.x were already fixed in 7ed0f5b.
@llvm/pr-subscribers-testing-tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Regarding who should be code owner I'm not sure, generally I would say it should be whoever is also owner for the tests as the file's content has more to do with the tests than lit in terms of why it's there. Since it might affect NVPTX tests, maybe some NVPTX backend owner.
I don't have rights to merge here, could someone push the button? |
Gentle ping @llvm/pr-subscribers-testing-tools |
Sorry about that. Merged. |
no worries, thanks for merging! |
…vm#70907) Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (`\\`). Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`: ``` llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out) ``` Other such warning present in 17.0.x were already fixed in 7ed0f5b.
…vm#70907) Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (`\\`). Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`: ``` llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out) ``` Other such warning present in 17.0.x were already fixed in 7ed0f5b.
Local branch amd-gfx bedf99a Merged main:3f743fd3a319 into amd-gfx:fa9cd7924a4e Remote branch main 43af73f [lit] Use raw strings for backslash escapes to fix SyntaxWarnings (llvm#70907)
…vm#70907) Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (`\\`). Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`: ``` llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out) ``` Other such warning present in 17.0.x were already fixed in 7ed0f5b.
…vm#70907) Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (`\\`). Use raw strings in `llvm/test/lit.cfg.py` to avoid a `SyntaxWarning`: ``` llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out) ``` Other such warning present in 17.0.x were already fixed in 7ed0f5b.
Unless specified as a "raw" string, Python will try to interpret backslashes, which means they don't get passed on correctly to the underlying regex-engine, unless escaped manually (
\\
).Use raw strings in
llvm/test/lit.cfg.py
to avoid aSyntaxWarning
:Other such warning present in 17.0.x were already fixed in 7ed0f5b.