Menu

#373 Invalid escapes in string literals

closed-fixed
None
5
2020-03-03
2019-08-09
No

You should be aware that there is a discussion going on at Python-Dev regarding the planned change to string escapes, and how it will affect docutils (as well as other libraries).

The status right now is that in 3.8, docutils will begin emitting runtime warnings about invalid backslashes escapes, and in 3.9 they will become an error. You may not be aware of this planned change, as it turns out the deprecation warnings in 3.6 and 3.7 are not easily visible.

The thread starts here:

https://mail.python.org/archives/list/python-dev@python.org/message/ZX2JLOZDOXWVBQLKE4UCVTU5JABPQSLB/

(sorry, its a long one). There's a relevant tracker item here: https://bugs.python.org/issue32912

Right now there's no final decision made as to whether the planned change in behaviour will go ahead, but you probably should start planning for it.

Discussion

  • engelbert gruber

    • Priority: 5 --> 7
     
  • engelbert gruber

    • assigned_to: engelbert gruber
    • Priority: 7 --> 5
     
  • engelbert gruber

    testing with python3.8 it is mostly

    SyntaxWarning: invalid escape sequence \
    """\

    and only in test files. so user should be rather save.

    although many thanks for the report

     
  • engelbert gruber

    • status: open --> closed-fixed
     
  • STINNER Victor

    STINNER Victor - 2019-10-24

    Thanks for fixing this issue. Would it be possible to get a release including the fix, please?

     
  • STINNER Victor

    STINNER Victor - 2020-03-03

    Thanks for fixing this issue. Would it be possible to get a release including the fix, please?

    The fix seems to be included in docutils 0.16.

     

Log in to post a comment.