factorio-updater icon indicating copy to clipboard operation
factorio-updater copied to clipboard

/update_factorio.py:196: SyntaxWarning: invalid escape sequence '\d'

Open ttelford opened this issue 7 months ago • 0 comments

Python 3.12 updates a DeprecatedWarning that was added in 3.6 to a SyntaxWarning

./update_factorio.py -h
update_factorio.py:196: SyntaxWarning: invalid escape sequence '\d'
  source_version = re.search("Version: (\d+\.\d+\.\d+)", version_output)

Replacing the escapes in the regular expression search from \d\\d (or \.\\. fixes it.

See Pull Request #64

ttelford avatar Jul 01 '24 02:07 ttelford