Skip to content

multiple invalid escape sequence warnings from Python #117

@bladernr

Description

@bladernr

lots of warnings when running on Ubuntu 24.04

$ redfishtool -r ********* -u ********** -p ********** -S Always -v Chassis
/usr/lib/python3/dist-packages/redfishtoollib/redfishtoolTransport.py:1252: SyntaxWarning: invalid escape sequence '\.'
  odataTypeMatch = re.compile('^#([a-zA-Z0-9]*)\.([a-zA-Z0-9\._]*)\.([a-zA-Z0-9]*)$')
/usr/lib/python3/dist-packages/redfishtoollib/redfishtoolTransport.py:1256: SyntaxWarning: invalid escape sequence '\.'
  odataTypeMatch = re.compile('^#([a-zA-Z0-9]*)\.([a-zA-Z0-9]*)$')
/usr/lib/python3/dist-packages/redfishtoollib/Managers.py:382: SyntaxWarning: invalid escape sequence '\d'
  datePattern="(^[2][0]\d{2}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[-+][0-1][0-9]:[0-5][0-9]$)"   #  YYYY-MM-DDTHH:mm:ss[+/-]hh:ss
#
#  Chassis Collection:
<SNIP>

this is on Ubuntu 24.04 installed from Universe:

redfishtool:
  Installed: 1.1.5-1
  Candidate: 1.1.5-1
  Version table:
 *** 1.1.5-1 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu noble/universe i386 Packages
        100 /var/lib/dpkg/status
$ python --version
Python 3.12.3

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