diff options
| author | Barry Warsaw | 2009-01-16 21:16:43 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-01-16 21:16:43 -0500 |
| commit | 0c996b693d1cc68d864acc313ba919197717a413 (patch) | |
| tree | b3fb5b5a6c5c52056bd8324f9ac8a6bf1a0e13b5 | |
| parent | ae3d0cc316b826b8325507d960ccf84da601c3b0 (diff) | |
| download | mailman-0c996b693d1cc68d864acc313ba919197717a413.tar.gz mailman-0c996b693d1cc68d864acc313ba919197717a413.tar.zst mailman-0c996b693d1cc68d864acc313ba919197717a413.zip | |
| -rw-r--r-- | mailman/database/pending.py | 6 | ||||
| -rw-r--r-- | mailman/pipeline/decorate.py | 6 | ||||
| -rw-r--r-- | mailman/pipeline/to_digest.py | 2 | ||||
| -rw-r--r-- | mailman/styles/default.py | 8 | ||||
| -rw-r--r-- | mailman/tests/test_passwords.py | 23 |
5 files changed, 13 insertions, 32 deletions
diff --git a/mailman/database/pending.py b/mailman/database/pending.py index 75555b976..f4c2057e0 100644 --- a/mailman/database/pending.py +++ b/mailman/database/pending.py @@ -117,11 +117,11 @@ class Pendings: if isinstance(value, str): value = unicode(value, 'utf-8') elif type(value) is int: - value = u'__builtin__.int\1%s' % value + value = '__builtin__.int\1%s' % value elif type(value) is float: - value = u'__builtin__.float\1%s' % value + value = '__builtin__.float\1%s' % value elif type(value) is bool: - value = u'__builtin__.bool\1%s' % value + value = '__builtin__.bool\1%s' % value elif type(value) is list: # We expect this to be a list of strings. value = ('mailman.database.pending.unpack_list\1' + diff --git a/mailman/pipeline/decorate.py b/mailman/pipeline/decorate.py index 82851fbf1..e1fa0c155 100644 --- a/mailman/pipeline/decorate.py +++ b/mailman/pipeline/decorate.py @@ -106,11 +106,11 @@ def process(mlist, msg, msgdata): try: oldpayload = unicode(msg.get_payload(decode=True), mcset) del msg['content-transfer-encoding'] - frontsep = endsep = u'' + frontsep = endsep = '' if header and not header.endswith('\n'): - frontsep = u'\n' + frontsep = '\n' if footer and not oldpayload.endswith('\n'): - endsep = u'\n' + endsep = '\n' payload = header + frontsep + oldpayload + endsep + footer # When setting the payload for the message, try various charset # encodings until one does not produce a UnicodeError. We'll try diff --git a/mailman/pipeline/to_digest.py b/mailman/pipeline/to_digest.py index df2684986..b85764ac9 100644 --- a/mailman/pipeline/to_digest.py +++ b/mailman/pipeline/to_digest.py @@ -65,7 +65,7 @@ from mailman.pipeline.scrubber import process as scrubber _ = i18n._ -UEMPTYSTRING = u'' +UEMPTYSTRING = '' EMPTYSTRING = '' log = logging.getLogger('mailman.error') diff --git a/mailman/styles/default.py b/mailman/styles/default.py index d60773f51..296ebbff1 100644 --- a/mailman/styles/default.py +++ b/mailman/styles/default.py @@ -90,7 +90,7 @@ from: .*@uplinkpro.com mlist.obscure_addresses = True mlist.admin_member_chunksize = 30 mlist.administrivia = True - mlist.preferred_language = u'en' + mlist.preferred_language = 'en' mlist.include_rfc2369_headers = True mlist.include_list_post_header = True mlist.filter_mime_types = [] @@ -147,7 +147,7 @@ ${listinfo_page} # 2-tuple of the date of the last autoresponse and the number of # autoresponses sent on that date. mlist.hold_and_cmd_autoresponses = {} - mlist.subject_prefix = _(u'[$mlist.real_name] ') + mlist.subject_prefix = _('[$mlist.real_name] ') mlist.msg_header = '' mlist.msg_footer = """\ _______________________________________________ @@ -239,9 +239,9 @@ ${listinfo_page} mlist.topics_userinterest = {} # The processing chain that messages coming into this list get # processed by. - mlist.start_chain = u'built-in' + mlist.start_chain = 'built-in' # The default pipeline to send accepted messages through. - mlist.pipeline = u'built-in' + mlist.pipeline = 'built-in' def match(self, mailing_list, styles): """See `IStyle`.""" diff --git a/mailman/tests/test_passwords.py b/mailman/tests/test_passwords.py index d8d310f08..6620a7067 100644 --- a/mailman/tests/test_passwords.py +++ b/mailman/tests/test_passwords.py @@ -38,14 +38,12 @@ class TestPasswordsBase(unittest.TestCase): def setUp(self): # passwords; 8-bit or unicode strings; ascii or binary self.pw8a = 'abc' - self.pwua = u'abc' self.pw8b = 'abc\xc3\xbf' # 'abc\xff' - self.pwub = u'abc\xff' + self.pwub = 'abc\xff' # bad password; 8-bit or unicode; ascii or binary self.bad8a = 'xyz' - self.badua = u'xyz' self.bad8b = 'xyz\xc3\xbf' # 'xyz\xff' - self.badub = u'xyz\xff' + self.badub = 'xyz\xff' def test_passwords(self): unless = self.failUnless @@ -54,13 +52,6 @@ class TestPasswordsBase(unittest.TestCase): unless(passwords.check_response(secret, self.pw8a)) failif(passwords.check_response(secret, self.bad8a)) - def test_unicode_passwords(self): - unless = self.failUnless - failif = self.failIf - secret = passwords.make_secret(self.pwua, self.scheme) - unless(passwords.check_response(secret, self.pwua)) - failif(passwords.check_response(secret, self.badua)) - def test_passwords_with_funky_chars(self): unless = self.failUnless failif = self.failIf @@ -84,10 +75,6 @@ class TestBogusPasswords(TestPasswordsBase): self.assertRaises(errors.BadPasswordSchemeError, passwords.make_secret, self.pw8a, self.scheme) - def test_unicode_passwords(self): - self.assertRaises(errors.BadPasswordSchemeError, - passwords.make_secret, self.pwua, self.scheme) - def test_passwords_with_funky_chars(self): self.assertRaises(errors.BadPasswordSchemeError, passwords.make_secret, self.pw8b, self.scheme) @@ -107,12 +94,6 @@ class TestNonePasswords(TestPasswordsBase): failif(passwords.check_response(secret, self.pw8a)) failif(passwords.check_response(secret, self.bad8a)) - def test_unicode_passwords(self): - failif = self.failIf - secret = passwords.make_secret(self.pwua, self.scheme) - failif(passwords.check_response(secret, self.pwua)) - failif(passwords.check_response(secret, self.badua)) - def test_passwords_with_funky_chars(self): failif = self.failIf secret = passwords.make_secret(self.pw8b, self.scheme) |
