* Vagrant Cascadian <vagr...@reproducible-builds.org> [2024-04-12 19:29]:
> On 2024-04-12, Holger Levsen wrote:
> > when installing reprotest 0.7.27:
> >
> > SyntaxWarning: invalid escape sequence '\;'
> > Setting up reprotest (0.7.27) ...
> > /usr/lib/python3/dist-packages/reprotest/__init__.py:360: SyntaxWarning: 
> > invalid escape sequence '\;'
> >   run_or_tee(['sh', '-ec', 'find %s -type f -exec sha256sum "{}" \;' % 
> > self.artifact_pattern],
[...]
> How exactly did you get this error?
> 
> I installed locally, but did not encounter any such issues on package
> installation just now, and also nothing when manually running a simple
> test:
> 
>   reprotest 'date > date' date
> WARNING:reprotest:The control build runs on 1 CPU by default, give --min-cpus 
> to increase this.
> WARNING:reprotest.build:IGNORING user_group variation; supply more usergroups 
> with --variations=user_group.available+=USER1:GROUP1;USER2:GROUP2 or 
> alternatively, suppress this warning with --variations=-user_group
> WARNING:reprotest.build:Not using sudo for domain_host; your build may fail. 
> See man page for other options.
> WARNING:reprotest.build:Be sure to `echo 1 > 
> /proc/sys/kernel/unprivileged_userns_clone` if on a Debian system.
> --- /tmp/tmp4vqq6736/control
> +++ /tmp/tmp4vqq6736/experiment-1
> │   --- /tmp/tmp4vqq6736/control/source-root
> ├── +++ /tmp/tmp4vqq6736/experiment-1/source-root
> │ │   --- /tmp/tmp4vqq6736/control/source-root/date
> │ ├── +++ /tmp/tmp4vqq6736/experiment-1/source-root/date
> │ │ @@ -1 +1 @@
> │ │ +L 13 apr   2024 07:27:01 GMT
> │ │ -Fri Apr 12 05:27:01 GMT 2024

That syntax warning is new in Python 3.12.  And it's correct, one should use raw
strings (r'...') or two backslashes for escape sequences intended for e.g.
regexes or shell commands like here, not Python itself.

- Fay

Reply via email to