[issue27364] Deprecate invalid escape sequences in str/bytes

2018-02-22 Thread Emanuel Barry
Emanuel Barry added the comment: I have created Issue32912 as a follow-up to this issue for 3.8. -- ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-11 Thread R. David Murray
R. David Murray added the comment: Also note that we have fixed a number of bugs in the stdlib code where a raw string was not used for a docstring when it should have been. And when I say bugs, I mean both formatting problems in pydoc, and doctest bugs. There may even have been a case

[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this was the intention. One of often errors is using "\n" in non-raw docstrings. This change doesn't prevent this error, but increases chances of catching it when there are other backslashes in the docstring. --

[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Guido van Rossum
Guido van Rossum added the comment: Yes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: One consequence of this change is that now any string that has a backslash needs to be escaped or raw, leading to changes like this on

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-13 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Opened a new issue at Issue28128. -- ___ Python tracker ___ ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-12 Thread Emanuel Barry
Emanuel Barry added the comment: Fair enough, but please open a new issue for that. @Terry - you're welcome; that's exactly the reason I pushed for it :) -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-11 Thread Emanuel Barry
Emanuel Barry added the comment: Fair enough; I can see why such an addition would be a good idea. But please open a new issue for that (add me to nosy); I don't want this issue to be further cluttered. -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-11 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Currently the deprecation message is not so useful when fixing lots of files in a large project. For example, I have two files foo.py and bar.py: # foo.py import bar # bar.py print('\d') It gives: $ python3.6 -W error foo.py Traceback (most recent call last):

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 98a57845c8cc by Martin Panter in branch 'default': Issue #27364: Raw strings to avoid deprecated escaping in com2ann.py https://hg.python.org/cpython/rev/98a57845c8cc -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 60085c8f01fe by R David Murray in branch 'default': #27364: Credit Emanuel Barry in NEWS item. https://hg.python.org/cpython/rev/60085c8f01fe -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you all for persisting on this. I have seen numerous beginners be puzzled why normal (cooked) strings using '\' for Windows paths sometimes work and sometimes 'mysteriously' do not, as in the initially referenced issue. I also think it better to

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread R. David Murray
R. David Murray added the comment: Thanks Emanuel. No bets on how much hate mail we get for this :) -- ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Emanuel Barry
Emanuel Barry added the comment: Thank you David for taking the time to review and commit this :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 38802c38cfe1 by R David Murray in branch 'default': #27364: Deprecate invalid escape strings in str/byutes. https://hg.python.org/cpython/rev/38802c38cfe1 -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread R. David Murray
R. David Murray added the comment: Here's a copy of Emanuel's deprecation patch with a versionchanged note in the lexical docs and a whatsnew entry. -- Added file: http://bugs.python.org/file44475/deprecate_invalid_escapes_both_5.patch ___ Python

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4cc62473c13 by R David Murray in branch 'default': #27364: fix "incorrect" uses of escape character in the stdlib. https://hg.python.org/cpython/rev/b4cc62473c13 -- nosy: +python-dev ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Emanuel Barry
Emanuel Barry added the comment: All right, since you'll work on it I'm leaving it out. Removed it and test_bytes (which you already fixed, thanks!) from new patch. -- Added file: http://bugs.python.org/file44465/invalid_stdlib_escapes_5.patch ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to not change fixcid.py. It is not correct and there is special issue for this (issue27952). -- ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-08 Thread Emanuel Barry
Emanuel Barry added the comment: Thank you R. David for the review, here's a new patch with the one change. -- Added file: http://bugs.python.org/file44463/invalid_stdlib_escapes_4.patch ___ Python tracker

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file44457/invalid_stdlib_escapes_3_rebased_2.patch ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Guido van Rossum
Guido van Rossum added the comment: +1 on getting this in. Who can help reviewing and merging before beta 1? -- ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file44435/invalid_stdlib_escapes_4.patch ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry
Changes by Emanuel Barry : Removed file: http://bugs.python.org/file44433/invalid_stdlib_escapes_3_regen.patch ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file44433/invalid_stdlib_escapes_3_regen.patch ___ Python tracker ___

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry
Emanuel Barry added the comment: Rebased patch after Victor's commit in #16334. Also regenerated invalid_stdlib_escapes_3 in the hopes that Rietveld picks it up. -- Added file: http://bugs.python.org/file44432/deprecate_invalid_escapes_both_4.patch

[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-05 Thread Emanuel Barry
Emanuel Barry added the comment: Updated and rebased patch. There's a few file tweaks here and there to stay up to date, otherwise it's mostly the same. Martin, it may look like I've ignored your comments, but I'm trying to keep the patches as simple as possible, and so I don't want to go