canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.98k stars 880 forks source link

SyntaxWarning while building with Python 3.12 #5174

Open dermotbradley opened 6 months ago

dermotbradley commented 6 months ago

Bug report

Now that Alpine Edge has updated Python from 3.11.8 to 3.12.3 (py3-setuptools 69.2.0 and py3-test 8.1.1 in both cases) I see some new SyntaxWarning messages during packaging.

Steps to reproduce the problem

Environment details

cloud-init logs

/home/builder/package/src/cloud-init-24.2/setup.py:192: SyntaxWarning: invalid escape sequence '\o'
  if cpe_data[1] == "\o":  # noqa: W605
/home/builder/package/src/cloud-init-24.2/tools/read-dependencies:46: SyntaxWarning: invalid escape sequence '\.'
  """
running build
running build_py
creating build
creating build/lib
creating build/lib/cloudinit
...
...
= 5257 passed, 7 skipped, 4 deselected, 8 xfailed, 680 warnings in 72.48s (0:01:
>>> cloud-init: Entering fakeroot...
/home/builder/package/src/cloud-init-24.2/setup.py:192: SyntaxWarning: invalid escape sequence '\o'
  if cpe_data[1] == "\o":  # noqa: W605
/home/builder/package/src/cloud-init-24.2/tools/read-dependencies:46: SyntaxWarning: invalid escape sequence '\.'
  """
running install
TheRealFalcon commented 6 months ago

Thanks for the bug report. I can confirm that on newer versions of python we see these warnings.