Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Ethan Furman
On 02/23/2015 02:40 PM, Nick Coghlan wrote: > - pep8 and pylint warnings as soon as a patch can be accepted > - Py3kWarning in Python 2.7.x > - DeprecationWarning in Python 3.5 > - SyntaxWarning in Python 3.6 > - SyntaxError in Python 3.7 +1 -- ~Ethan~ signature.asc Description: OpenPGP digit

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Nick Coghlan
On 24 February 2015 at 08:40, Nick Coghlan wrote: > On 24 February 2015 at 07:39, Mark Lawrence wrote: >> On 23/02/2015 21:27, Serhiy Storchaka wrote: >>> >>> On 23.02.15 21:58, Joao S. O. Bueno wrote: That happens all the time, and is this use case that should possibly be addresse

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 21:18, Serhiy Storchaka wrote: > On 23.02.15 22:51, Paul Moore wrote: >> >> BTW, while I was looking at the API, I realised I don't like the order >> of arguments in pack(). I'm tempted to make it pack(directory, >> target=None, interpreter=None, main=None) where a target of

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Mark Lawrence
On 23/02/2015 21:27, Serhiy Storchaka wrote: On 23.02.15 21:58, Joao S. O. Bueno wrote: That happens all the time, and is this use case that should possibly be addressed here - maybe something as simple as adding a couple of paragraphs to different places in the documentation could mitigate the

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 21:02, Brett Cannon wrote: >> The real problem with overwriting is if there's a failure during the >> overwrite you lose the original file. My original API had overwrite as >> the default, but I think the risk makes that a bad idea. > > > Couldn't you catch the exception, wr

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Antoine Pitrou
On Mon, 23 Feb 2015 16:58:29 -0300 "Joao S. O. Bueno" wrote: > On 23 February 2015 at 16:47, Antoine Pitrou wrote: > > On Mon, 23 Feb 2015 09:29:09 -0800 > > Guido van Rossum wrote: > >> On Mon, Feb 23, 2015 at 9:01 AM, Ethan Furman wrote: > >> > >> > On 02/23/2015 08:12 AM, Brett Cannon wrote:

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Paul Moore
On 23 February 2015 at 19:47, Guido van Rossum wrote: > So is the PEP ready for pronouncement or should there be more discussion? I think Brett's idea is worth incorporating, so let's thrash that out first. > Also, do you have a BDFL-delegate or do you want me to review it? No-one has stepped u

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Serhiy Storchaka
On 23.02.15 21:22, Ethan Furman wrote: This could be a completely stupid question, but how does the zip file know where the individual files are? More to the point, does the index work via relative or absolute offset? If absolute, wouldn't the index have to be rewritten if the zip portion of

Re: [Python-Dev] Request for Pronouncement: PEP 441 - Improving Python ZIP Application Support

2015-02-23 Thread Thomas Wouters
On Mon, Feb 23, 2015 at 8:24 PM, Paul Moore wrote: > On 23 February 2015 at 19:01, Daniel Holth wrote: > > Sounds reasonable. It could be done by just reading the entire file > > contents after the shebang and re-writing them with the necessary > > offset all in RAM, truncating the file if neces

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Chris Angelico
On Tue, Feb 24, 2015 at 3:12 AM, Brett Cannon wrote: > > > On Mon Feb 23 2015 at 10:55:23 AM Chris Angelico wrote: >> >> On Tue, Feb 24, 2015 at 2:44 AM, Guido van Rossum >> wrote: >> > I think that's a bit too strong. This has been unquestionably valid, >> > correct >> > Python -- it was an int

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Brett Cannon
On Mon Feb 23 2015 at 10:55:23 AM Chris Angelico wrote: > On Tue, Feb 24, 2015 at 2:44 AM, Guido van Rossum > wrote: > > I think that's a bit too strong. This has been unquestionably valid, > correct > > Python -- it was an intentional feature from the start. It may not have > > turned out great

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Chris Angelico
On Tue, Feb 24, 2015 at 2:44 AM, Guido van Rossum wrote: > I think that's a bit too strong. This has been unquestionably valid, correct > Python -- it was an intentional feature from the start. It may not have > turned out great, but I think that before warning loudly about every > instance of thi

Re: [Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Guido van Rossum
I think that's a bit too strong. This has been unquestionably valid, correct Python -- it was an intentional feature from the start. It may not have turned out great, but I think that before warning loudly about every instance of this we should have a silent deprecation (which you can turn into a v

[Python-Dev] Emit SyntaxWarning on unrecognized backslash escapes?

2015-02-23 Thread Serhiy Storchaka
See topic "Unrecognized backslash escapes in string literals" in Python list [1]. I agree that this is a problem, especially for novices (but even experience users can make a typo). May be emit SyntaxWarning on unrecognized backslash escapes? An exception is already raised on invalid octal or h