Skip to content

Fix invalid escape sequence deprecation warnings #5560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2017
Merged

Fix invalid escape sequence deprecation warnings #5560

merged 1 commit into from
Nov 6, 2017

Conversation

jdufresne
Copy link
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.
Copy link
Member

@auvipy auvipy left a comment

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
Copy link
Collaborator

xordoquy commented Nov 6, 2017

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants