------------------------------------------------------------
revno: 6672
committer: Barry Warsaw <[email protected]>
branch nick: cleanups
timestamp: Fri 2009-01-16 21:16:43 -0500
message:
  Get rid of a few now unnecessary u-prefixes.
modified:
  mailman/database/pending.py
  mailman/pipeline/decorate.py
  mailman/pipeline/to_digest.py
  mailman/styles/default.py
  mailman/tests/test_passwords.py

=== modified file 'mailman/database/pending.py'
--- a/mailman/database/pending.py       2009-01-17 02:04:21 +0000
+++ b/mailman/database/pending.py       2009-01-17 02:16:43 +0000
@@ -117,11 +117,11 @@
             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' +

=== modified file 'mailman/pipeline/decorate.py'
--- a/mailman/pipeline/decorate.py      2009-01-17 02:04:21 +0000
+++ b/mailman/pipeline/decorate.py      2009-01-17 02:16:43 +0000
@@ -106,11 +106,11 @@
         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

=== modified file 'mailman/pipeline/to_digest.py'
--- a/mailman/pipeline/to_digest.py     2009-01-17 02:04:21 +0000
+++ b/mailman/pipeline/to_digest.py     2009-01-17 02:16:43 +0000
@@ -65,7 +65,7 @@
 
 _ = i18n._
 
-UEMPTYSTRING = u''
+UEMPTYSTRING = ''
 EMPTYSTRING = ''
 
 log = logging.getLogger('mailman.error')

=== modified file 'mailman/styles/default.py'
--- a/mailman/styles/default.py 2009-01-17 02:04:21 +0000
+++ b/mailman/styles/default.py 2009-01-17 02:16:43 +0000
@@ -90,7 +90,7 @@
         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 @@
         # 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 @@
         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`."""

=== modified file 'mailman/tests/test_passwords.py'
--- a/mailman/tests/test_passwords.py   2009-01-17 02:04:21 +0000
+++ b/mailman/tests/test_passwords.py   2009-01-17 02:16:43 +0000
@@ -38,14 +38,12 @@
     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 @@
         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 @@
         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 @@
         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)



--
Primary development focus
https://code.launchpad.net/~mailman-coders/mailman/3.0

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to