FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-40335: Correctly handle multi-line strings in tokenize error scenarios by pablogsal · Pull Request #19619 · python/cpython · GitHub

Repository navigation

bpo-40335: Correctly handle multi-line strings in tokenize error scenarios - #19619

Merged
pablogsal merged 2 commits into
python:masterfrom
pablogsal:bpo-40335
Apr 21, 2020
Merged

pablogsal merged 2 commits into
python:masterfrom
pablogsal:bpo-40335

Conversation

pablogsal commented Apr 20, 2020 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member Author

CC: @asottile Can you check if this PR runs correctly with your test suite?

Copy link
Copy Markdown
Contributor

yep pyflakes is now passing (with a minor patch, but this patch is expected):

$ git diff
diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
index 128aa69..b579ac8 100644
--- a/pyflakes/test/test_api.py
+++ b/pyflakes/test/test_api.py
@@ -449,6 +449,8 @@ def baz():
         with self.makeTempFile(source) as sourcePath:
             if PYPY:
                 message = 'end of file (EOF) while scanning triple-quoted string literal'
+            elif sys.version_info >= (3, 9):
+                message = 'invalid string prefix'
             else:
                 message = 'invalid syntax'
 

Copy link
Copy Markdown
Member Author

but this patch is expected

Yeah, that was on purpose 😉

pablogsal requested a review from gvanrossum April 20, 2020 17:39

lysnikolaou commented Apr 20, 2020 •
edited
Loading

Copy link
Copy Markdown
Member

Thanks, @pablogsal, for the fix! 😃

gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Weak approve: I don't feel super confident with the ins and outs of this code, but if the tests pass, I feel it's fine.

Comment thread Lib/test/test_exceptions.py Outdated
Co-Authored-By: Guido van Rossum <gvanrossum@gmail.com>
pablogsal merged commit 11a7f15 into python:master Apr 21, 2020
pablogsal deleted the bpo-40335 branch May 19, 2021 19:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL