Skip to content

Python 3.12 SyntaxWarning: invalid escape sequence #27

@xrouge

Description

@xrouge
P4Transfer.py:1626: SyntaxWarning: invalid escape sequence '\('
  re_transferProblems = re.compile(".*fix problems then use 'p4 submit -c ([0-9]+)'.\nSome file\(s\) could not be transferred from client")

https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes

A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning.

I think it should be a raw string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions