| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
Changes in deps/v8 need to be upstreamed to the V8 project first. |
Sorry, something went wrong.
|
OK, so please upstream it, whatever it means ;-) |
Sorry, something went wrong.
|
@nodejs/python |
Sorry, something went wrong.
@josusky thanks for this contribution, the meaning is you need to get the change into v8 (following their contribution guide), then if the change is accepted it will automatically be pulled into node |
Sorry, something went wrong.
For clarity: That only applies to the change to deps/v8/tools/gen-postmortem-metadata.py. The changes in the other three files can be submitted in this PR. |
Sorry, something went wrong.
|
I do not understand the reason for this pull request. Regex loves raw strings in Python. They are recommended in Python docs.
Why change from one string to another If two strings are equal to each other? >>> r'\s*=.*' == '\s*=.*' True >>> r'\\s*=.*' == '\\s*=.*' False Please provide example code and a stack trace for where each of these raw strings generates a Python SyntaxError. |
Sorry, something went wrong.
There was a problem hiding this comment.
Please provide example code and a stack trace for where each of these raw strings generates a Python SyntaxError.
Sorry, something went wrong.
|
The point is that in your code you sometimes do not use raw strings. Just look at the code that I have changed. If your python is old enough or not set to report all errors you may not notice the problem, but sooner or later, the deprecated constructions like '\s' will stop working. Just try the following code: test_string = '\s' and run it like this python3 -Werror test.py File "/home/jano/test.py", line 1
test_string = '\s'
^^^^
SyntaxError: invalid escape sequence '\s'
|
Sorry, something went wrong.
|
Pull request was landed without a full CI run or metadata in the commit message. I force-pushed main to cancel it. Unfortunately we cannot reopen a merged PR. @josusky can you please open a new one? |
Sorry, something went wrong.
|
@targos I am a bit lost. I can certainly create a new PR with the same code change but what should be then the difference to this one? |
Sorry, something went wrong.
|
This one was already merged, so we cannot merge it again. |
Sorry, something went wrong.
|
Fair enough, the new PR is #46649 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
tools: fix regex strings in Python tools
Strings used to construct regular expressions shall be marked as raw
otherwise newer versions of Python throw "SyntaxError" because of
invalid escape sequences.