Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

The reported example works fine on master and 3.7 . The related issue's fix was 
not backported to 3.6 . 3.6 is in security fixes only mode. So upgrading to 3.7 
will help and I propose closing this as a duplicate of issue33266 .

➜  cpython git:(master) ✗ cat foo.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-

regex_format = rf''
➜  cpython git:(master) ✗ ./python.exe ./Tools/scripts/2to3 foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No changes to foo.py
RefactoringTool: Files that need to be modified:
RefactoringTool: foo.py
➜  cpython git:(master) ✗ python3.7 ./Tools/scripts/2to3 foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No changes to foo.py
RefactoringTool: Files that need to be modified:
RefactoringTool: foo.py
➜  cpython git:(master) ✗ python3.6 ./Tools/scripts/2to3 foo.py
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't parse foo.py: ParseError: bad input: type=3, value="''", 
context=('', (4, 17))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse foo.py: ParseError: bad input: type=3, value="''", 
context=('', (4, 17))

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to