bazelbuild / rules_pkg

Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...)
Apache License 2.0
216 stars 171 forks source link

Receiving a warning when running on python 3.12 #772

Closed Sineaggi closed 6 months ago

Sineaggi commented 10 months ago

Receiving a warning when running on python 3.12

pkg/private/tar/build_tar.py:29: SyntaxWarning: invalid escape sequence '\ '

INFO: From Writing: bazel-out/darwin_x86_64-fastbuild/bin/java/check_encoding_java17_nonroot_debian12_layer.tar:
/private/var/tmp/_bazel_cwalker/67a48f48949c0ed3fc13c8b7681684b0/sandbox/darwin-sandbox/27/execroot/_main/bazel-out/darwin_x86_64-opt-exec-ST-e846b08c7501/bin/external/rules_pkg~0.9.1/pkg/private/tar/build_tar.runfiles/_main/../rules_pkg~0.9.1/pkg/private/tar/build_tar.py:29: SyntaxWarning: invalid escape sequence '\ '
aiuto commented 10 months ago

It seems to be a doc comment. """... os.path.normpath changes / to \ on windows, but tarfile needs / style paths. ... """

But, I can't reproduce that problem. It works fine for my with python 3.11 and above. Can you provide a simple repro?

sc0ttbeardsley commented 6 months ago

This issue can be closed since it is fixed with https://github.com/bazelbuild/rules_pkg/commit/6cad5fb7a673004d732e07a61fcb8301bde513e5 Thanks @alexbozhenko!