Skip to content

invalid escape sequence warning (python 3.13) #345

@mjlosch

Description

@mjlosch

I get this with python 3.13.2, re 2.2.1, and xmitgcm 0.5.2:

>> from xmitgcm import open_mdsdataset
/Users/mlosch/miniconda3/envs/mitgcm/lib/python3.13/site-packages/xmitgcm/mds_store.py:812: SyntaxWarning: invalid escape sequence '\.'
  if not re.search('\.\d{10}\.', fname):

It looks like this can be fixed by replacing

re.search('\.\d{10}\.', fname)

by

re.search(r'\.\d{10}\.', fname)

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