8000 SyntaxWarning in Python 3.8 · Issue #584 · arrow-py/arrow · GitHub
[go: up one dir, main page]

Skip to content
SyntaxWarning in Python 3.8 #584
@tirkarthi

Description

@tirkarthi

Running tests on CPython master gives me below SyntaxWarnings. This could be fixed by prefixing 'r' in front of the strings . Upstream PR python/cpython#9652 . I will raise a PR for this shortly.

/home/karthi/arrow/arrow/parser.py:24: SyntaxWarning: invalid escape sequence \[
  _ESCAPE_RE = re.compile('\[[^\[\]]*\]')
/home/karthi/arrow/arrow/parser.py:26: SyntaxWarning: invalid escape sequence \d
  _ONE_OR_MORE_DIGIT_RE = re.compile('\d+')
/home/karthi/arrow/arrow/parser.py:27: SyntaxWarning: invalid escape sequence \d
  _ONE_OR_TWO_DIGIT_RE = re.compile('\d{1,2}')
/home/karthi/arrow/arrow/parser.py:28: SyntaxWarning: invalid escape sequence \d
  _FOUR_DIGIT_RE = re.compile('\d{4}')
/home/karthi/arrow/arrow/parser.py:29: SyntaxWarning: invalid escape sequence \d
  _TWO_DIGIT_RE = re.compile('\d{2}')
/home/karthi/arrow/arrow/parser.py:30: SyntaxWarning: invalid escape sequence \-
  _TZ_RE = re.compile('[+\-]?\d{2}:?(\d{2})?')
/home/karthi/arrow/arrow/parser.py:31: SyntaxWarning: invalid escape sequence \w
  _TZ_NAME_RE = re.compile('\w[\w+\-/]+')
/home/karthi/arrow/arrow/parser.py:49: SyntaxWarning: invalid escape sequence \d
  'X': re.compile('\d+'),
/home/karthi/arrow/arrow/parser.py:157: SyntaxWarning: invalid escape sequence \#
  a = fmt_pattern.split("\#")
/home/karthi/arrow/arrow/parser.py:313: SyntaxWarning: invalid escape sequence \-
  _TZINFO_RE = re.compile('([+\-])?(\d\d):?(\d\d)?')
/home/karthi/arrow/arrow/parser.py:49: SyntaxWarning: invalid escape sequence \d
  'X': re.compile('\d+'),
/home/karthi/arrow/arrow/parser.py:157: SyntaxWarning: invalid escape sequence \#
  a = fmt_pattern.split("\#")
/home/karthi/arrow/arrow/parser.py:313: SyntaxWarning: invalid escape sequence \-
  _TZINFO_RE = re.compile('([+\-])?(\d\d):?(\d\d)?')

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

      0