summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-12-28 22:33:20 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-12-28 22:33:20 +0000
commitb06c1bd394be7d5176768ce1fbeb3874856bebaa (patch)
tree487046e5a8677ae8fc9ae8e601f705d102304b8d /dev-python/httplib2
parentx86 stable, bug #293850 (diff)
downloadgentoo-2-b06c1bd394be7d5176768ce1fbeb3874856bebaa.tar.gz
gentoo-2-b06c1bd394be7d5176768ce1fbeb3874856bebaa.tar.bz2
gentoo-2-b06c1bd394be7d5176768ce1fbeb3874856bebaa.zip
Delete older ebuild.
Diffstat (limited to 'dev-python/httplib2')
-rw-r--r--dev-python/httplib2/files/compat-2.6-0.4.0.patch140
-rw-r--r--dev-python/httplib2/httplib2-0.4.0-r1.ebuild22
2 files changed, 0 insertions, 162 deletions
diff --git a/dev-python/httplib2/files/compat-2.6-0.4.0.patch b/dev-python/httplib2/files/compat-2.6-0.4.0.patch
deleted file mode 100644
index f02232ce5e93..000000000000
--- a/dev-python/httplib2/files/compat-2.6-0.4.0.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-Index: httplib2/__init__.py
-===================================================================
---- httplib2/__init__.py (revision 274)
-+++ httplib2/__init__.py (revision 275)
-@@ -26,7 +26,6 @@
-
- import re
- import sys
--import md5
- import email
- import email.Utils
- import email.Message
-@@ -42,7 +41,14 @@
- import calendar
- import time
- import random
--import sha
-+# remove depracated warning in python2.6
-+try:
-+ from hashlib import sha1 as _sha, md5 as _md5
-+except ImportError:
-+ import sha
-+ import md5
-+ _sha = sha.new
-+ _md5 = md5.new
- import hmac
- from gettext import gettext as _
- import socket
-@@ -52,12 +58,27 @@
- except ImportError:
- socks = None
-
-+# Build the appropriate socket wrapper for ssl
-+try:
-+ import ssl # python 2.6
-+ _ssl_wrap_socket = ssl.wrap_socket
-+except ImportError:
-+ def _ssl_wrap_socket(sock, key_file, cert_file):
-+ ssl_sock = socket.ssl(sock, key_file, cert_file)
-+ return httplib.FakeSocket(sock, ssl_sock)
-+
-+
- if sys.version_info >= (2,3):
- from iri2uri import iri2uri
- else:
- def iri2uri(uri):
- return uri
-
-+def has_timeout(timeout): # python 2.6
-+ if hasattr(socket, '_GLOBAL_DEFAULT_TIMEOUT'):
-+ return (timeout is not None and timeout is not socket._GLOBAL_DEFAULT_TIMEOUT)
-+ return (timeout is not None)
-+
- __all__ = ['Http', 'Response', 'ProxyInfo', 'HttpLib2Error',
- 'RedirectMissingLocation', 'RedirectLimit', 'FailedToDecompressContent',
- 'UnimplementedDigestAuthOptionError', 'UnimplementedHmacDigestAuthOptionError',
-@@ -182,7 +203,7 @@
- pass
- if isinstance(filename,unicode):
- filename=filename.encode('utf-8')
-- filemd5 = md5.new(filename).hexdigest()
-+ filemd5 = _md5(filename).hexdigest()
- filename = re_url_scheme.sub("", filename)
- filename = re_slash.sub(",", filename)
-
-@@ -363,11 +384,11 @@
- cache.set(cachekey, text)
-
- def _cnonce():
-- dig = md5.new("%s:%s" % (time.ctime(), ["0123456789"[random.randrange(0, 9)] for i in range(20)])).hexdigest()
-+ dig = _md5("%s:%s" % (time.ctime(), ["0123456789"[random.randrange(0, 9)] for i in range(20)])).hexdigest()
- return dig[:16]
-
- def _wsse_username_token(cnonce, iso_now, password):
-- return base64.encodestring(sha.new("%s%s%s" % (cnonce, iso_now, password)).digest()).strip()
-+ return base64.encodestring(_sha("%s%s%s" % (cnonce, iso_now, password)).digest()).strip()
-
-
- # For credentials we need two things, first
-@@ -441,7 +462,7 @@
-
- def request(self, method, request_uri, headers, content, cnonce = None):
- """Modify the request headers"""
-- H = lambda x: md5.new(x).hexdigest()
-+ H = lambda x: _md5(x).hexdigest()
- KD = lambda s, d: H("%s:%s" % (s, d))
- A2 = "".join([method, ":", request_uri])
- self.challenge['cnonce'] = cnonce or _cnonce()
-@@ -501,13 +522,13 @@
- if self.challenge['pw-algorithm'] not in ['SHA-1', 'MD5']:
- raise UnimplementedHmacDigestAuthOptionError( _("Unsupported value for pw-algorithm: %s." % self.challenge['pw-algorithm']))
- if self.challenge['algorithm'] == 'HMAC-MD5':
-- self.hashmod = md5
-+ self.hashmod = _md5
- else:
-- self.hashmod = sha
-+ self.hashmod = _sha
- if self.challenge['pw-algorithm'] == 'MD5':
-- self.pwhashmod = md5
-+ self.pwhashmod = _md5
- else:
-- self.pwhashmod = sha
-+ self.pwhashmod = _sha
- self.key = "".join([self.credentials[0], ":",
- self.pwhashmod.new("".join([self.credentials[1], self.challenge['salt']])).hexdigest().lower(),
- ":", self.challenge['realm']
-@@ -604,9 +625,6 @@
-
- AUTH_SCHEME_ORDER = ["hmacdigest", "googlelogin", "digest", "wsse", "basic"]
-
--def _md5(s):
-- return
--
- class FileCache(object):
- """Uses a local directory as a store for cached files.
- Not really safe to use if multiple threads or processes are going to
-@@ -701,7 +719,7 @@
- else:
- self.sock = socket.socket(af, socktype, proto)
- # Different from httplib: support timeouts.
-- if self.timeout is not None:
-+ if has_timeout(self.timeout):
- self.sock.settimeout(self.timeout)
- # End of difference from httplib.
- if self.debuglevel > 0:
-@@ -737,11 +755,11 @@
- sock.setproxy(*self.proxy_info.astuple())
- else:
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-- if self.timeout is not None:
-+
-+ if has_timeout(self.timeout):
- sock.settimeout(self.timeout)
- sock.connect((self.host, self.port))
-- ssl = socket.ssl(sock, self.key_file, self.cert_file)
-- self.sock = httplib.FakeSocket(sock, ssl)
-+ self.sock =_ssl_wrap_socket(sock, self.key_file, self.cert_file)
-
-
-
diff --git a/dev-python/httplib2/httplib2-0.4.0-r1.ebuild b/dev-python/httplib2/httplib2-0.4.0-r1.ebuild
deleted file mode 100644
index 035ed46e3a19..000000000000
--- a/dev-python/httplib2/httplib2-0.4.0-r1.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/httplib2/httplib2-0.4.0-r1.ebuild,v 1.3 2009/05/21 20:39:52 ranger Exp $
-
-NEED_PYTHON=2.3
-
-inherit distutils
-
-DESCRIPTION="A comprehensive HTTP client library with caching and authentication."
-HOMEPAGE="http://code.google.com/p/httplib2/"
-SRC_URI="http://httplib2.googlecode.com/files/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 ppc x86"
-
-IUSE=""
-
-src_unpack() {
- distutils_src_unpack
- epatch "${FILESDIR}"/compat-2.6-${PV}.patch
-}