Skip to content

Fix invalid escape sequence deprecation warnings - #5560

Merged
xordoquy merged 1 commit into
encode:masterfrom
jdufresne:escape-seq
Nov 6, 2017
Merged

Fix invalid escape sequence deprecation warnings#5560
xordoquy merged 1 commit into
encode:masterfrom
jdufresne:escape-seq

Conversation

@jdufresne

Copy link
Copy Markdown
Contributor

When running tests with warnings enabled, appear as:

DeprecationWarning: invalid escape sequence \d

Starting with Python 3.6, invalid escape sequences are deprecated. In a future Python versions they will be a syntax error. For more details, see:

https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior

A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases.

When running tests with warnings enabled, appear as:

  DeprecationWarning: invalid escape sequence \d

Starting with Python 3.6, invalid escape sequences are deprecated. In a
future Python versions they will be a syntax error. For more details, see:

https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior

> A backslash-character pair that is not a valid escape sequence now
> generates a DeprecationWarning. Although this will eventually become a
> SyntaxError, that will not be for several Python releases.

@auvipy auvipy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me

@xordoquy

xordoquy commented Nov 6, 2017

Copy link
Copy Markdown
Contributor

Interesting. Nice work !

@xordoquy
xordoquy merged commit e5cee43 into encode:master Nov 6, 2017
@carltongibson carltongibson added this to the 3.7.2 milestone Nov 6, 2017
@jdufresne
jdufresne deleted the escape-seq branch November 9, 2017 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants