Skip to content

past/types/oldstr.py:33: DeprecationWarning: invalid escape sequence \d #479

Closed

Description

@ssbarnea

That warnings appears with python3.6:

past/types/oldstr.py:33: DeprecationWarning: invalid escape sequence \d

Apparently the broken code is inside docstring example but is enough to pollute any test executions on a library using python-future.

An easy solution is to replace the example with another escape which is still valid, like a \n instead of \\d. Also a release would be needed.

Activity

  1. added a commit that references this issue on Jul 3, 2019
    e4b7fa1
  2. Harmon758 commented on Jul 25, 2019

    @Harmon758

    Note, this now produces a SyntaxWarning with Python 3.8:

    C:\Program Files\Python38\lib\site-packages\past\types\oldstr.py:20: SyntaxWarning: invalid escape sequence \d
      """
    

    A backslash-character pair that is not a valid escape sequence generates a DeprecationWarning since Python 3.6. In Python 3.8 it generates a SyntaxWarning instead.

    https://docs.python.org/3.8/whatsnew/3.8.html

    Changed in version 3.6: Unrecognized escape sequences produce a DeprecationWarning.

    Changed in version 3.8: Unrecognized escape sequences produce a SyntaxWarning. In some future version of Python they will be a SyntaxError.

    https://docs.python.org/3.8/reference/lexical_analysis.html

    https://bugs.python.org/issue32912, python/cpython#9652, python/cpython@6543912

  3. jmadler commented on Oct 17, 2019

    @jmadler
    Contributor

    Can you submit a bugfix please? I'll include it in a release in the next few days.

  4. Harmon758 commented on Oct 17, 2019

    @Harmon758

    There already is one, #480, which referenced as closing this issue.

  5. ssbarnea commented on Jan 4, 2020

    @ssbarnea
    ContributorAuthor

    Is this project effectively dead? PR is present and is a one char fix. What prevents merging and making a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions