ROCm / amdsmi

AMD SMI
https://rocm.docs.amd.com/projects/amdsmi/en/latest
MIT License
39 stars 23 forks source link

Use correct regex to avoid SyntaxWarning: invalid escape sequence '\.' #36

Closed amstelchen closed 2 weeks ago

amstelchen commented 4 months ago

Python versions prior to 3.12 may (or may not) throw DeprecationWarning: invalid escape sequence \.

Python 3.12 will definitely throw SyntaxWarning:

➜ amd-smi version
/opt/rocm-6.1.1/libexec/amdsmi_cli/BDF.py:126: SyntaxWarning: invalid escape sequence '\.'
  bdf_regex = "(?:[0-6]?[0-9a-fA-F]{1,4}:)?[0-2]?[0-9a-fA-F]{1,2}:[0-9a-fA-F]{1,2}\.[0-7]"
AMDSMI Tool: 24.6.0+68d8c1a-dirty | AMDSMI Library version: 24.6.0.0 | ROCm version: 6.1.1
dmitrii-galantsev commented 2 weeks ago

great catch, should merge early next week

dmitrii-galantsev commented 2 weeks ago

Merged in https://github.com/ROCm/amdsmi/commit/d9ccc441466a6edfee0e6a497b46c6959b2a0725 https://github.com/ROCm/amdsmi/commit/d75d127864723ee6da055d07c72da564c292243f