[Git][reproducible-builds/reprotest][master] 2 commits: reprotest: pipes module will be removed in Python 3.13

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Sep 2 11:56:25 UTC 2024



Holger Levsen pushed to branch master at Reproducible Builds / reprotest


Commits:
b7a21040 by Jelle van der Waa at 2024-09-02T13:39:59+02:00
reprotest: pipes module will be removed in Python 3.13

pipes.quote() was already deprecated in Python 2.7 but silently got
aliased to `shlex.quote()`. Python 3.13 removes the `pipes` module and
thus the alias.

Signed-off-by: Jelle van der Waa <jelle at archlinux.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
4fd2f453 by Holger Levsen at 2024-09-02T13:50:59+02:00
release as 0.7.28

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


5 changed files:

- debian/changelog
- reprotest/lib/VirtSubproc.py
- reprotest/lib/adt_testbed.py
- reprotest/virt/autopkgtest-virt-qemu
- reprotest/virt/autopkgtest-virt-ssh


Changes:

=====================================
debian/changelog
=====================================
@@ -1,9 +1,20 @@
-reprotest (0.7.28) UNRELEASED; urgency=medium
+reprotest (0.7.28) unstable; urgency=medium
 
-  * Start 0.7.28 development. d/changelog entries will be written on
-    release using the git commit messages.
+  [ Vagrant Cascadian ]
+  * Update escape sequences for compatibility with python3.12.
+    Closes: #1068853.
+  * Amend 0.7.27 changelog: List team members included in signing key.
+  * debian/control: Update Standards-Version to 4.7.0.
+
+  [ Jelle van der Waa ]
+  * reprotest: pipes module will be removed in Python 3.13.
+    Closes: salsa issue #12.
+
+  [ Holger Levsen ]
+  * setup.py: increment version to 0.7.28.
+  * Fix some spelling errors detected by spellintian.
 
- -- Vagrant Cascadian <vagrant at reproducible-builds.org>  Fri, 12 Apr 2024 20:30:54 +0200
+ -- Holger Levsen <holger at debian.org>  Mon, 02 Sep 2024 13:43:03 +0200
 
 reprotest (0.7.27) unstable; urgency=medium
 


=====================================
reprotest/lib/VirtSubproc.py
=====================================
@@ -31,7 +31,7 @@ import subprocess
 import traceback
 import errno
 import time
-import pipes
+import shlex
 import socket
 import shutil
 
@@ -508,7 +508,7 @@ def copyupdown_internal(wh, sd, upp):
 
     deststdout = devnull_read
     srcstdin = devnull_read
-    remfileq = pipes.quote(sd[iremote])
+    remfileq = shlex.quote(sd[iremote])
     if not dirsp:
         rune = 'cat %s%s' % ('><'[upp], remfileq)
         if upp:


=====================================
reprotest/lib/adt_testbed.py
=====================================
@@ -24,7 +24,7 @@ import os
 import sys
 import errno
 import time
-import pipes
+import shlex
 import traceback
 import re
 import signal
@@ -129,7 +129,7 @@ class Testbed:
 
         # log command line invocation for the log
         adtlog.info('host %s; command line: %s' % (
-            os.uname()[1], ' '.join([pipes.quote(w) for w in sys.argv])))
+            os.uname()[1], ' '.join([shlex.quote(w) for w in sys.argv])))
 
         self.sp = subprocess.Popen(self.vserver_argv,
                                    stdin=subprocess.PIPE,


=====================================
reprotest/virt/autopkgtest-virt-qemu
=====================================
@@ -314,7 +314,7 @@ def make_auxverb(shared_dir):
     auxverb = os.path.join(workdir, 'runcmd')
     with open(auxverb, 'w') as f:
         f.write('''#!%(py)s
-import sys, os, tempfile, threading, time, atexit, shutil, fcntl, errno, pipes
+import sys, os, tempfile, threading, time, atexit, shutil, fcntl, errno, shlex
 import socket
 
 dir_host = '%(dir)s'
@@ -379,7 +379,7 @@ s.connect('%(tty)s')
 cmd = 'PYTHONHASHSEED=0 /tmp/eofcat %%(d)s/stdin_eof %%(d)s/exit.tmp < %%(d)s/stdin | ' \\
       '(%%(c)s >> %%(d)s/stdout 2>> %%(d)s/stderr; echo $? > %%(d)s/exit.tmp);' \\
       'mv %%(d)s/exit.tmp %%(d)s/exit\\n' %% \\
-       {'d': job_guest, 'c': ' '.join(map(pipes.quote, sys.argv[1:]))}
+       {'d': job_guest, 'c': ' '.join(map(shlex.quote, sys.argv[1:]))}
 s.send(cmd.encode())
 
 # wait until command has exited


=====================================
reprotest/virt/autopkgtest-virt-ssh
=====================================
@@ -31,7 +31,7 @@ import os
 import argparse
 import tempfile
 import shutil
-import pipes
+import shlex
 import time
 import subprocess
 import socket
@@ -375,7 +375,7 @@ def can_sudo(ssh_cmd):
               '/bin/echo -e "#!/bin/sh\necho \'%s\'" > $F;' \
               'chmod u+x $F; sync; echo $F' % args.password
         askpass = VirtSubproc.check_exec(
-            ssh_cmd + ['/bin/sh', '-ec', pipes.quote(cmd)],
+            ssh_cmd + ['/bin/sh', '-ec', shlex.quote(cmd)],
             outp=True, timeout=30).strip()
         adtlog.debug('created SUDO_ASKPASS from specified password')
         cleanup_paths.append(askpass)



View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/compare/82777f997e6079b2eaf9e91669c3db0c3d5a613e...4fd2f453faedf247194ec35eebf23600891a2af6

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/-/compare/82777f997e6079b2eaf9e91669c3db0c3d5a613e...4fd2f453faedf247194ec35eebf23600891a2af6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20240902/3118049d/attachment.htm>


More information about the rb-commits mailing list