[CalendarServer-changes] [3822] CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/ Twisted
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 11 14:52:13 PDT 2009
Revision: 3822
http://trac.macosforge.org/projects/calendarserver/changeset/3822
Author: exarkun at twistedmatrix.com
Date: 2009-03-11 14:52:13 -0700 (Wed, 11 Mar 2009)
Log Message:
-----------
Drop the patches which are no longer needed with the new Twisted branch
Removed Paths:
-------------
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.application.app.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.conch.test.test_keys.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.internet._sslverify.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.pop3client.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.persisted.sob.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.plugins.__init__.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.python.filepath.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.spread.pb.patch
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.words.protocols.jabber.sasl_mechanisms.patch
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.application.app.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.application.app.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.application.app.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,13 +0,0 @@
-Index: twisted/application/app.py
-===================================================================
---- twisted/application/app.py (revision 19773)
-+++ twisted/application/app.py (working copy)
-@@ -18,7 +18,7 @@
- def runWithProfiler(reactor, config):
- """Run reactor under standard profiler."""
- try:
-- import profile
-+ import cProfile as profile
- except ImportError, e:
- s = "Failed to import module profile: %s" % e
- s += """
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.conch.test.test_keys.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.conch.test.test_keys.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.conch.test.test_keys.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,16 +0,0 @@
-Index: twisted/conch/test/test_keys.py
-===================================================================
---- twisted/conch/test/test_keys.py (revision 19773)
-+++ twisted/conch/test/test_keys.py (working copy)
-@@ -4,10 +4,10 @@
-
- try:
- import Crypto
-+ from twisted.conch.ssh import keys
- except ImportError:
- Crypto = None
-
--from twisted.conch.ssh import keys
- from twisted.trial import unittest
-
- publicRSA_openssh = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEArzJx8OYOnJmzf4tfBEvLi8DVPrJ3/c9k2I/Az64fxjHf9imyRJbixtQhlH9lfNjUIx+4LmrJH5QNRsFporcHDKOTwTTYLh5KmRpslkYHRivcJSkbh/C+BR3utDS555mV comment"
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.internet._sslverify.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.internet._sslverify.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.internet._sslverify.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,35 +0,0 @@
-Index: twisted/internet/_sslverify.py
-===================================================================
---- twisted/internet/_sslverify.py (revision 19773)
-+++ twisted/internet/_sslverify.py (working copy)
-@@ -1,7 +1,11 @@
- # -*- test-case-name: twisted.test.test_sslverify -*-
- # Copyright 2005 Divmod, Inc. See LICENSE file for details
-
--import itertools, md5
-+import itertools
-+try:
-+ from hashlib import md5
-+except ImportError:
-+ import md5.new as md5
- from OpenSSL import SSL, crypto
-
- from twisted.python import reflect, util
-@@ -666,7 +670,7 @@
- MD5 hex digest of signature on an empty certificate request with this
- key.
- """
-- return md5.md5(self._emptyReq).hexdigest()
-+ return md5(self._emptyReq).hexdigest()
-
-
- def inspect(self):
-@@ -942,7 +946,7 @@
- ctx.set_options(self._OP_ALL)
-
- if self.enableSessions:
-- sessionName = md5.md5("%s-%d" % (reflect.qual(self.__class__), _sessionCounter())).hexdigest()
-+ sessionName = md5("%s-%d" % (reflect.qual(self.__class__), _sessionCounter())).hexdigest()
- ctx.set_session_id(sessionName)
-
- return ctx
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.pop3client.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.pop3client.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.mail.pop3client.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,28 +0,0 @@
-Index: twisted/mail/pop3client.py
-===================================================================
---- twisted/mail/pop3client.py (revision 19773)
-+++ twisted/mail/pop3client.py (working copy)
-@@ -11,8 +11,13 @@
- API Stability: Unstable
- """
-
--import re, md5
-+import re
-
-+try:
-+ from hashlib import md5
-+except ImportError:
-+ import md5.new as md5
-+
- from twisted.python import log
- from twisted.internet import defer
- from twisted.protocols import basic
-@@ -486,7 +491,7 @@
- def _apop(self, username, password, challenge):
- # Internal helper. Computes and sends an APOP response. Returns
- # a Deferred that fires when the server responds to the response.
-- digest = md5.new(challenge + password).hexdigest()
-+ digest = md5(challenge + password).hexdigest()
- return self.apop(username, digest)
-
- def apop(self, username, digest):
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.persisted.sob.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.persisted.sob.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.persisted.sob.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,32 +0,0 @@
-Index: twisted/persisted/sob.py
-===================================================================
---- twisted/persisted/sob.py (revision 19773)
-+++ twisted/persisted/sob.py (working copy)
-@@ -10,8 +10,12 @@
- Maintainer: U{Moshe Zadka<mailto:moshez at twistedmatrix.com>}
- """
-
--import os, md5, sys
-+import os, sys
- try:
-+ from hashlib import md5
-+except ImportError:
-+ import md5.new as md5
-+try:
- import cPickle as pickle
- except ImportError:
- import pickle
-@@ -32,11 +36,11 @@
- leftover = len(data) % cipher.block_size
- if leftover:
- data += ' '*(cipher.block_size - leftover)
-- return cipher.new(md5.new(passphrase).digest()[:16]).encrypt(data)
-+ return cipher.new(md5(passphrase).digest()[:16]).encrypt(data)
-
- def _decrypt(passphrase, data):
- from Crypto.Cipher import AES
-- return AES.new(md5.new(passphrase).digest()[:16]).decrypt(data)
-+ return AES.new(md5(passphrase).digest()[:16]).decrypt(data)
-
-
- class IPersistable(Interface):
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.plugins.__init__.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.plugins.__init__.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.plugins.__init__.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,12 +0,0 @@
-Index: twisted/plugins/__init__.py
-===================================================================
---- twisted/plugins/__init__.py (revision 19773)
-+++ twisted/plugins/__init__.py (working copy)
-@@ -12,6 +12,6 @@
- """
-
- import os, sys
--__path__ = [os.path.abspath(os.path.join(x, 'twisted', 'plugins')) for x in sys.path]
-+__path__ = [os.path.abspath(os.path.join(x, 'twisted', 'plugins')) for x in sys.path if not x.startswith('/System')]
-
- __all__ = [] # nothing to see here, move along, move along
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.python.filepath.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.python.filepath.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.python.filepath.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,28 +0,0 @@
-Index: twisted/python/filepath.py
-===================================================================
---- twisted/python/filepath.py (revision 19773)
-+++ twisted/python/filepath.py (working copy)
-@@ -9,9 +9,13 @@
- import os
- import errno
- import random
--import sha
- import base64
-
-+try:
-+ from hashlib import sha1
-+except ImportError:
-+ import sha.new as sha1
-+
- from os.path import isabs, exists, normpath, abspath, splitext
- from os.path import basename, dirname
- from os.path import join as joinpath
-@@ -109,7 +113,7 @@
- """
- Create a pseudorandom, 16-character string for use in secure filenames.
- """
-- return armor(sha.new(randomBytes(64)).digest())[:16]
-+ return armor(sha1(randomBytes(64)).digest())[:16]
-
- class _PathHelper:
- """
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.spread.pb.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.spread.pb.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.spread.pb.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,53 +0,0 @@
-Index: twisted/spread/pb.py
-===================================================================
---- twisted/spread/pb.py (revision 19773)
-+++ twisted/spread/pb.py (working copy)
-@@ -64,7 +64,11 @@
- except ImportError:
- import StringIO
-
--import md5
-+try:
-+ from hashlib import md5
-+except ImportError:
-+ import md5.new as md5
-+
- import random
- import new
- import types
-@@ -1003,10 +1007,10 @@
-
- This is useful for challenge/response authentication.
- """
-- m = md5.new()
-+ m = md5()
- m.update(password)
- hashedPassword = m.digest()
-- m = md5.new()
-+ m = md5()
- m.update(hashedPassword)
- m.update(challenge)
- doubleHashedPassword = m.digest()
-@@ -1017,7 +1021,7 @@
- crap = ''
- for x in range(random.randrange(15,25)):
- crap = crap + chr(random.randint(65,90))
-- crap = md5.new(crap).digest()
-+ crap = md5(crap).digest()
- return crap
-
-
-@@ -1226,11 +1230,11 @@
-
- # IUsernameHashedPassword:
- def checkPassword(self, password):
-- return self.checkMD5Password(md5.md5(password).digest())
-+ return self.checkMD5Password(md5(password).digest())
-
- # IUsernameMD5Password
- def checkMD5Password(self, md5Password):
-- md = md5.new()
-+ md = md5()
- md.update(md5Password)
- md.update(self.challenge)
- correct = md.digest()
Deleted: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.words.protocols.jabber.sasl_mechanisms.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.words.protocols.jabber.sasl_mechanisms.patch 2009-03-11 21:51:18 UTC (rev 3821)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.words.protocols.jabber.sasl_mechanisms.patch 2009-03-11 21:52:13 UTC (rev 3822)
@@ -1,86 +0,0 @@
-Index: twisted/words/protocols/jabber/sasl_mechanisms.py
-===================================================================
---- twisted/words/protocols/jabber/sasl_mechanisms.py (revision 19773)
-+++ twisted/words/protocols/jabber/sasl_mechanisms.py (working copy)
-@@ -7,8 +7,13 @@
- Protocol agnostic implementations of SASL authentication mechanisms.
- """
-
--import md5, binascii, random, time, os
-+import binascii, random, time, os
-
-+try:
-+ from hashlib import md5
-+except ImportError:
-+ import md5.new as md5
-+
- from zope.interface import Interface, Attribute, implements
-
- class ISASLMechanism(Interface):
-@@ -108,16 +113,43 @@
- @return: challenge directives and their values.
- @rtype: L{dict} of L{str} to L{str}.
- """
-- directive_list = challenge.split(',')
-- directives = {}
-- for directive in directive_list:
-- name, value = directive.split('=')
-- value = value.replace("'","")
-- value = value.replace('"','')
-- directives[name] = value
-- return directives
-+ s = challenge
-+ paramDict = {}
-+ cur = 0
-+ remainingParams = True
-+ while remainingParams:
-+ # Parse a param. We can't just split on commas, because there can
-+ # be some commas inside (quoted) param values, e.g.:
-+ # qop="auth,auth-int"
-
-+ middle = s.index("=", cur)
-+ name = s[cur:middle].lstrip()
-+ middle += 1
-+ if s[middle] == '"':
-+ middle += 1
-+ end = s.index('"', middle)
-+ value = s[middle:end]
-+ cur = s.find(',', end) + 1
-+ if cur == 0:
-+ remainingParams = False
-+ else:
-+ end = s.find(',', middle)
-+ if end == -1:
-+ value = s[middle:].rstrip()
-+ remainingParams = False
-+ else:
-+ value = s[middle:end].rstrip()
-+ cur = end + 1
-+ paramDict[name] = value
-
-+ for param in ('qop', 'cipher'):
-+ if param in paramDict:
-+ paramDict[param] = paramDict[param].split(',')
-+
-+ return paramDict
-+
-+
-+
- def _unparse(self, directives):
- """
- Create message string from directives.
-@@ -153,7 +185,7 @@
- """
-
- def H(s):
-- return md5.new(s).digest()
-+ return md5(s).digest()
-
- def HEX(n):
- return binascii.b2a_hex(n)
-@@ -196,4 +228,4 @@
-
-
- def _gen_nonce(self):
-- return md5.new("%s:%s:%s" % (str(random.random()) , str(time.gmtime()),str(os.getpid()))).hexdigest()
-+ return md5("%s:%s:%s" % (str(random.random()) , str(time.gmtime()),str(os.getpid()))).hexdigest()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090311/f88a89ae/attachment-0001.html>
More information about the calendarserver-changes
mailing list