Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 165392 Details for
Bug 237625
app-portage/layman-1.2.0-r1 deprecation warnings under python-2.6 (patch included)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
layman-1.2.0-py26-deprecations.patch
layman-1.2.0-py26-deprecations.patch (text/plain), 2.76 KB, created by
Mike Auty (RETIRED)
on 2008-09-14 12:32:45 UTC
(
hide
)
Description:
layman-1.2.0-py26-deprecations.patch
Filename:
MIME Type:
Creator:
Mike Auty (RETIRED)
Created:
2008-09-14 12:32:45 UTC
Size:
2.76 KB
patch
obsolete
>diff --git a/layman/db.py b/layman/db.py >index 5019dfb..4603ef0 100644 >--- a/layman/db.py >+++ b/layman/db.py >@@ -24,7 +24,7 @@ __version__ = "$Id: db.py 309 2007-04-09 16:23:38Z wrobel $" > # > #------------------------------------------------------------------------------- > >-import os, codecs, os.path, urllib2, re, md5 >+import os, codecs, os.path, urllib2, re, hashlib > > from layman.utils import path > from layman.overlay import Overlays >@@ -318,7 +318,7 @@ class RemoteDB(Overlays): > > OUT.debug('Generating cache path.', 6) > >- return base + '_' + md5.md5(url).hexdigest() + '.xml' >+ return base + '_' + hashlib.md5(url).hexdigest() + '.xml' > > #=============================================================================== > # >@@ -332,7 +332,7 @@ class MakeConf: > > Check that an add/remove cycle does not modify the make.conf: > >- >>> import md5 >+ >>> import hashlib > >>> write = os.tmpnam() > >>> here = os.path.dirname(os.path.realpath(__file__)) > >>> config = {'local_list' : >@@ -343,7 +343,7 @@ class MakeConf: > ... 'quietness':3} > >>> b = DB(config) > >>> a = MakeConf(config, b.overlays) >- >>> o_md5 = str(md5.md5(open(here + '/tests/testfiles/make.conf').read()).hexdigest()) >+ >>> o_md5 = str(hashlib.md5(open(here + '/tests/testfiles/make.conf').read()).hexdigest()) > >>> a.path = write > >>> a.add(b.overlays['wrobel-stable']) > >>> [i.name for i in a.overlays] >@@ -358,7 +358,7 @@ class MakeConf: > >>> [i.name for i in a.overlays] > [u'wrobel', u'wrobel-stable'] > >>> a.delete(b.overlays['wrobel']) >- >>> n_md5 = str(md5.md5(open(write).read()).hexdigest()) >+ >>> n_md5 = str(hashlib.md5(open(write).read()).hexdigest()) > >>> o_md5 == n_md5 > True > >>> os.unlink(write) >diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py >index 14aaa94..31d17c0 100644 >--- a/layman/overlays/overlay.py >+++ b/layman/overlays/overlay.py >@@ -24,7 +24,7 @@ __version__ = "$Id: overlay.py 273 2006-12-30 15:54:50Z wrobel $" > # > #------------------------------------------------------------------------------- > >-import sys, types, re, os, os.path, shutil, popen2 >+import sys, types, re, os, os.path, shutil, subprocess > > from layman.utils import node_to_dict, dict_to_node, path > >@@ -160,12 +160,8 @@ class Overlay: > if not self.quiet: > return os.system(command) > else: >- cmd = popen2.Popen4(command) >- cmd.fromchild.readlines() >+ cmd = subprocess.Popen([command], stdout=PIPE, stderr=PIPE, close_fds=True) > result = cmd.wait() >- cmd.fromchild.readlines() >- cmd.fromchild.close() >- cmd.tochild.close() > return result > > def __str__(self):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237625
: 165392