[issue27921] f-strings: do not allow backslashes

2016-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

Issue 28002 tracks the problem with Tools/parser/unparse.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-07 Thread Eric V. Smith

Eric V. Smith added the comment:

The problem with test_unparse is that:
f'''{"'"}'''
becomes:
f'{"\'"}'
when it's run through Tools/parser/unparse.py.

I'll open another issue for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df5b6d1c7ea8 by Benjamin Peterson in branch 'default':
fix skipping #27921 for windows
https://hg.python.org/cpython/rev/df5b6d1c7ea8

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Martin Panter

Martin Panter added the comment:

I haven’t looked, but my guess at why test_unparse could fail would be trying 
to generate code for an f-string with control characters in. Maybe it is taking 
stuff like

f'''{x}
{y}
'''

and generating

f'{x}\n{y}\n'

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd4e4fa75260 by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string. I'll revert this change 
before beta 2. I also need to look in to why test_tools/test_unparse fails with 
the files that are now being skipped.
https://hg.python.org/cpython/rev/fd4e4fa75260

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 80eb6eb57537 by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string. I'll revert this change 
before beta 2.
https://hg.python.org/cpython/rev/80eb6eb57537

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 899ee1e68a8d by Eric V. Smith in branch 'default':
Issue 27921: Remove backslash from another f-string.
https://hg.python.org/cpython/rev/899ee1e68a8d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Eric V. Smith

Eric V. Smith added the comment:

See issue 27948 for adding backslashes back in to the string parts of an 
f-string.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ce127b5c0f by Eric V. Smith in branch 'default':
Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a 
temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in 
the string parts of f-strings, but disallow them in the expression parts.
https://hg.python.org/cpython/rev/d7ce127b5c0f

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-02 Thread Eric V. Smith

Eric V. Smith added the comment:

> This looks a little ugly.

True. My goal is to get the simplest possible thing working now, and then 
before beta 2 fix it so that backslashes again work in the text portions of an 
f-string. After that, I'll fix this particular piece of code (and the others, 
plus the tests that can be made to work).

Here's an updated patch. I'm planning on committing it today.

--
Added file: http://bugs.python.org/file44347/27921-1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> -result.append(f'  [Previous line repeated {count-3} more 
> times]\n')
> +result.append(f'  [Previous line repeated {count-3} more 
> times]''\n')

This looks a little ugly.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-09-01 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

Changes by Eric V. Smith :


--
keywords: +patch
Added file: http://bugs.python.org/file44311/27921.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

Changes by Eric V. Smith :


--
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

New submission from Eric V. Smith:

See https://mail.python.org/pipermail/python-dev/2016-August/145979.html for 
details.

PEP 498 is going to be changed to disallow backslashes inside braces (the 
expression portions of an f-string).

However, I can't get that change done in time for 3.6 beta 1. So, this bug will 
disallow any backslashes in f-strings. Before the next beta, I'll implement the 
correct behavior.

This is a breaking change: f-strings like f'\\t{3}' which worked in 3.6 alphas 
will not work in 3.6 beta 1, but will work in beta 2. f-strings like f'{\'x\'}' 
which worked in 3.6 alphas, will not work in any beta or release version of 3.6.

--
assignee: eric.smith
components: Interpreter Core
messages: 274079
nosy: eric.smith, ned.deily
priority: release blocker
severity: normal
status: open
title: f-strings: do not allow backslashes
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com