Your message dated Fri, 07 Aug 2009 09:47:19 +0000
with message-id <[email protected]>
and subject line Bug#539911: fixed in debdelta 0.30
has caused the Debian Bug report #539911,
regarding os.popen2 deprecated in python2.6
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
539911: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539911
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debdelta
Version: 0.28
os.popen2 have been deprecated[1] in Python 2.6 and this makes debdelta
output an annoying DeprecationWarning:
/usr/bin/debdelta:383: DeprecationWarning: os.popen2 is deprecated. Use the
subprocess module.
o,i=os.popen2(shell)
Attached is a trivial patch that replaces os.popen2 with
subprocess.Popen.
According to the Python 2.6 documentation os.popen have also been
deprecated[2], but strangely that does not print a
DeprecationWarning. Replacing os.popen (and why not also os.system?)
with subprocess.Popen is also trivial, there are good examples in the
documentation for subprocess. If you like I can write a patch for this
as well.
[1] http://docs.python.org/library/popen2.html
[2] http://docs.python.org/library/os.html#os.popen
Kind regards,
Pär Andersson
diff --git a/debdelta b/debdelta
index 0d23ff1..8be8c27 100755
--- a/debdelta
+++ b/debdelta
@@ -94,6 +94,7 @@ minibzip2='/usr/lib/debdelta/minibzip2'
####################################################################
import sys , os , tempfile , string ,getopt , tarfile , shutil , time, hashlib, traceback, ConfigParser
+from subprocess import *
from stat import ST_SIZE, ST_MTIME, ST_MODE, S_IMODE, S_IRUSR, S_IWUSR, S_IXUSR
from os.path import abspath
@@ -380,11 +381,12 @@ def prepare_for_echo__(s):
def apply_prepare_for_echo(shell,repres):
a=ECHO_TEST + " $echo '" + repres + "' \n exit "
- o,i=os.popen2(shell)
- o.write(a)
- o.close()
- a=i.read()
+ p = Popen([shell], shell=True, stdin=PIPE, stdout=PIPE, close_fds=True)
+ (o, i) = (p.stdout, p.stdin)
+ i.write(a)
i.close()
+ a=o.read()
+ o.close()
return a
#ack! I wanted to use 'dash' as preferred shell, but bug 379227 stopped me
pgpHJ1B3EQEYk.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
Source: debdelta
Source-Version: 0.30
We believe that the bug you reported is fixed in the latest version of
debdelta, which is due to be installed in the Debian FTP archive:
debdelta_0.30.dsc
to pool/main/d/debdelta/debdelta_0.30.dsc
debdelta_0.30.tar.gz
to pool/main/d/debdelta/debdelta_0.30.tar.gz
debdelta_0.30_i386.deb
to pool/main/d/debdelta/debdelta_0.30_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
A Mennucc1 <[email protected]> (supplier of updated debdelta package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Fri, 07 Aug 2009 10:10:04 +0200
Source: debdelta
Binary: debdelta
Architecture: source i386
Version: 0.30
Distribution: unstable
Urgency: low
Maintainer: A Mennucc1 <[email protected]>
Changed-By: A Mennucc1 <[email protected]>
Description:
debdelta - diff and patch utilities which work with Debian packages
Closes: 497967 539911
Changes:
debdelta (0.30) unstable; urgency=low
.
* Correct an indent in defining HOSTID
* Bug fix: "[debdelta] debdelta-upgrade doesn't work with nobody
user", thanks to Mert Dirik (Closes: #497967).
* Bug fix: "os.popen2 deprecated in python2.6", thanks to
Pär Andersson (Closes: #539911).
Checksums-Sha1:
d44214da3240e4a87ca76753dcad0dc0462d6b97 701 debdelta_0.30.dsc
afd8cbd1c924f777bf09a422ac99b77ed8a73067 131619 debdelta_0.30.tar.gz
d47745113ad868c5913e92df3f3ad86ae05194d2 48208 debdelta_0.30_i386.deb
Checksums-Sha256:
b59348d19204a3bbd15c7149a483b5b76359de98fae0c6fb71cdc2b01bf120e8 701
debdelta_0.30.dsc
668bd53a07c1a1e6f3e19dbef162b3d0f7f239390b4f84bb172bf332edd8787d 131619
debdelta_0.30.tar.gz
9123ffca46bb966360a81ca8ee2f3b90b9027f73687b2aab529cd167d818c07f 48208
debdelta_0.30_i386.deb
Files:
d963eff1f776b814c40023a5e131cbe4 701 devel optional debdelta_0.30.dsc
988adfb274922ed13665bf8ffcc76f25 131619 devel optional debdelta_0.30.tar.gz
4e5ad125a61682a7d5ec4f16ae5aca77 48208 devel optional debdelta_0.30_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkp74hYACgkQ9B/tjjP8QKRaFgCgndIwp3j1BaumP2IUPlzk/l9T
XpYAn3ZnFnhVINgZNOaSafGiQPykeBe+
=xjG/
-----END PGP SIGNATURE-----
--- End Message ---