[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-22 Thread noreply

revno: 979
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-06-22 08:16:40 -0400
message:
  testing bzr commit messages
added:
  test.txt

=== added file 'test.txt'
--- a/test.txt  1970-01-01 00:00:00 +
+++ b/test.txt  2007-06-22 12:16:40 +
@@ -0,0 +1,1 @@
+Please ignore me; I'm just testing bzr commits



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)

2007-06-22 Thread noreply

revno: 980
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 2.1
timestamp: Fri 2007-06-22 08:34:40 -0400
message:
  remove test file
removed:
  test.txt

=== removed file 'test.txt'
--- a/test.txt  2007-06-22 12:16:40 +
+++ b/test.txt  1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-Please ignore me; I'm just testing bzr commits



--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)

2007-06-22 Thread noreply

revno: 6508
committer: Mark Sapiro [EMAIL PROTECTED]
branch nick: 3.0
timestamp: Fri 2007-06-22 11:53:02 -0700
message:
  Scrubber.py - Malformed RFC 2047 encoded filename= parameter can have
a null byte or other garbage in the extension. Cleaned this.
  - Improved handling of None payloads.
  - Cleaned up a few charset coercions.
  OutgoingRunner.py - Made probe bounce processing and queuing of bounces
  conditional on having some permanent failure(s).
modified:
  Mailman/Handlers/Scrubber.py
  Mailman/Queue/OutgoingRunner.py

=== modified file 'Mailman/Handlers/Scrubber.py'
--- a/Mailman/Handlers/Scrubber.py  2007-05-28 20:21:41 +
+++ b/Mailman/Handlers/Scrubber.py  2007-06-22 18:53:02 +
@@ -277,6 +277,7 @@
 size = len(payload)
 url = save_attachment(mlist, part, dir)
 desc = part.get('content-description', _('not available'))
+desc = Utils.oneline(desc, lcset)
 filename = part.get_filename(_('not available'))
 filename = Utils.oneline(filename, lcset)
 replace_payload_by_text(part, _(\
@@ -318,23 +319,23 @@
 text.append(_('Skipped content of type %(partctype)s\n'))
 continue
 try:
-t = part.get_payload(decode=True)
+t = part.get_payload(decode=True) or ''
 # MAS: TypeError exception can occur if payload is None. This
 # was observed with a message that contained an attached
 # message/delivery-status part. Because of the special parsing
 # of this type, this resulted in a text/plain sub-part with a
 # null body. See bug 1430236.
 except (binascii.Error, TypeError):
-t = part.get_payload()
+t = part.get_payload() or ''
 # Email problem was solved by Mark Sapiro. (TK)
 partcharset = part.get_content_charset('us-ascii')
 try:
 t = unicode(t, partcharset, 'replace')
 except (UnicodeError, LookupError, ValueError, TypeError,
 AssertionError):
-# What is the cause to come this exception now ?
+# We can get here if partcharset is bogus in come way.
 # Replace funny characters.  We use errors='replace'.
-u = unicode(t, 'ascii', 'replace')
+t = unicode(t, 'ascii', 'replace')
 # Separation is useful
 if isinstance(t, basestring):
 if not t.endswith('\n'):
@@ -344,12 +345,11 @@
 charsets.append(partcharset)
 # Now join the text and set the payload
 sep = _('-- next part --\n')
-# The i18n separator is in the list's charset. Coerce it to the
-# message charset.
+# The i18n separator is in the list's charset. Coerce to unicode.
 try:
-s = unicode(sep, lcset, 'replace')
-sep = s.encode(charset, 'replace')
+sep = unicode(sep, lcset, 'replace')
 except (UnicodeError, LookupError, ValueError):
+# This shouldn't occur.
 pass
 rept = sep.join(text)
 # Replace entire message with text and scrubbed notice.
@@ -360,7 +360,9 @@
 try:
 replace_payload_by_text(msg, rept, charset)
 break
-except UnicodeError:
+# Bogus charset can throw several exceptions
+except (UnicodeError, LookupError, ValueError, TypeError,
+AssertionError):
 pass
 if format:
 msg.set_param('format', format)
@@ -396,7 +398,7 @@
 # i18n file name is encoded
 lcset = Utils.GetCharSet(mlist.preferred_language)
 filename = Utils.oneline(msg.get_filename(''), lcset)
-fnext = os.path.splitext(filename)[1]
+filename, fnext = os.path.splitext(filename)
 # For safety, we should confirm this is valid ext for content-type
 # but we can use fnext if we introduce fnext filtering
 if config.SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION:
@@ -404,6 +406,8 @@
 ext = fnext or guess_extension(ctype, fnext)
 else:
 ext = guess_extension(ctype, fnext)
+# Allow only alphanumerics, dash, underscore, and dot
+ext = sre.sub('', ext)
 if not ext:
 # We don't know what it is, so assume it's just a shapeless
 # application/octet-stream, unless the Content-Type: is
@@ -421,7 +425,6 @@
 try:
 # Now base the filename on what's in the attachment, uniquifying it if
 # necessary.
-filename = msg.get_filename()
 if not filename or config.SCRUBBER_DONT_USE_ATTACHMENT_FILENAME:
 filebase = 'attachment'
 else:
@@ -436,7 +439,8 @@
 # which one should we go 

[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)

2007-06-22 Thread noreply
1 revision was removed from the branch.


--
(no title)
https://code.launchpad.net/~mailman-coders/mailman/3.0

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+subscription/mailman-checkins.
___
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org



[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)

2007-06-22 Thread noreply

revno: 6509
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 3.0
timestamp: Fri 2007-06-22 17:15:03 -0400
message:
  Refactor tests to get consistent clean up behavior.  The clean up sections
  have been removed from the .txt files and instead added to the test harness,
  which all doctests now use.
modified:
  Mailman/docs/ack-headers.txt
  Mailman/docs/acknowledge.txt
  Mailman/docs/addresses.txt
  Mailman/docs/after-delivery.txt
  Mailman/docs/avoid-duplicates.txt
  Mailman/docs/calc-recips.txt
  Mailman/docs/cleanse.txt
  Mailman/docs/cook-headers.txt
  Mailman/docs/membership.txt
  Mailman/docs/mlist-addresses.txt
  Mailman/docs/reply-to.txt
  Mailman/docs/replybot.txt
  Mailman/docs/subject-munging.txt
  Mailman/docs/usermanager.txt
  Mailman/docs/users.txt
  Mailman/testing/base.py
  Mailman/testing/test_acknowledge.py
  Mailman/testing/test_address.py
  Mailman/testing/test_after_delivery.py
  Mailman/testing/test_avoid_duplicates.py
  Mailman/testing/test_calc_recips.py
  Mailman/testing/test_cleanse.py
  Mailman/testing/test_cook_headers.py
  Mailman/testing/test_decorate.py
  Mailman/testing/test_listmanager.py
  Mailman/testing/test_membership.py
  Mailman/testing/test_mlist_addresses.py
  Mailman/testing/test_replybot.py
  Mailman/testing/test_user.py
  Mailman/testing/test_usermanager.py

=== modified file 'Mailman/docs/ack-headers.txt'
--- a/Mailman/docs/ack-headers.txt  2007-06-21 14:23:40 +
+++ b/Mailman/docs/ack-headers.txt  2007-06-22 21:15:03 +
@@ -53,13 +53,3 @@
 BLANKLINE
 A message of great import.
 BLANKLINE
-
-
-Clean up
-
-
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- flush()
- list(config.list_manager.mailing_lists)
-[]

=== modified file 'Mailman/docs/acknowledge.txt'
--- a/Mailman/docs/acknowledge.txt  2007-06-18 18:53:34 +
+++ b/Mailman/docs/acknowledge.txt  2007-06-22 21:15:03 +
@@ -174,13 +174,3 @@
 List info page: http://lists.example.com/listinfo/[EMAIL PROTECTED]
 Your preferences: http://example.com/[EMAIL PROTECTED]
 BLANKLINE
-
-
-Clean up
-
-
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- flush()
- list(config.list_manager.mailing_lists)
-[]

=== modified file 'Mailman/docs/addresses.txt'
--- a/Mailman/docs/addresses.txt2007-06-10 23:14:10 +
+++ b/Mailman/docs/addresses.txt2007-06-22 21:15:03 +
@@ -174,21 +174,3 @@
   [EMAIL PROTECTED] as MemberRole.member]
  sorted(mlist.digest_members.members)
 []
-
-
-Clean up
-
-
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- for user in mgr.users:
-... mgr.delete_user(user)
- for address in mgr.addresses:
-... mgr.delete_address(address)
- flush()
- sorted(config.list_manager.names)
-[]
- sorted(mgr.users)
-[]
- sorted(mgr.addresses)
-[]

=== modified file 'Mailman/docs/after-delivery.txt'
--- a/Mailman/docs/after-delivery.txt   2007-06-18 18:53:34 +
+++ b/Mailman/docs/after-delivery.txt   2007-06-22 21:15:03 +
@@ -31,13 +31,3 @@
 True
  mlist.post_id
 11
-
-
-Clean up
-
-
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- flush()
- list(config.list_manager.mailing_lists)
-[]

=== modified file 'Mailman/docs/avoid-duplicates.txt'
--- a/Mailman/docs/avoid-duplicates.txt 2007-06-21 23:46:27 +
+++ b/Mailman/docs/avoid-duplicates.txt 2007-06-22 21:15:03 +
@@ -171,13 +171,3 @@
 BLANKLINE
 Something of great import.
 BLANKLINE
-
-
-Clean up
-
-
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- flush()
- list(config.list_manager.mailing_lists)
-[]

=== modified file 'Mailman/docs/calc-recips.txt'
--- a/Mailman/docs/calc-recips.txt  2007-06-19 15:13:09 +
+++ b/Mailman/docs/calc-recips.txt  2007-06-22 21:15:03 +
@@ -105,26 +105,3 @@
 * test_urgent_moderator()
 * test_urgent_admin()
 * test_urgent_reject()
-
-
-Clean up
-
-
- for member in mlist.members.members:
-... member.unsubscribe()
- flush()
- list(mlist.members.members)
-[]
- for user in config.user_manager.users:
-... config.user_manager.delete_user(user)
- for address in config.user_manager.addresses:
-... config.user_manager.delete_address(address)
- for mlist in config.list_manager.mailing_lists:
-... config.list_manager.delete(mlist)
- flush()
- list(config.user_manager.users)
-[]
- list(config.user_manager.addresses)
-[]
- list(config.list_manager.mailing_lists)
-[]

=== modified file 'Mailman/docs/cleanse.txt'
--- a/Mailman/docs/cleanse.txt  

[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)

2007-06-22 Thread noreply

revno: 6508
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: 3.0
timestamp: Fri 2007-06-22 15:32:57 -0400
message:
  Merge temporary Elixir model branch to the 3.0 trunk.  Some tests are failing
  now so I have to fix these before pushing the branch up.
removed:
  Mailman/database/model/rosterset.py
  Mailman/docs/mlist-rosters.txt
  Mailman/interfaces/rosterset.py
  Mailman/testing/test_mlist_rosters.py
added:
  .bzrignore
  Mailman/database/model/member.py
  Mailman/docs/ack-headers.txt
  Mailman/docs/acknowledge.txt
  Mailman/docs/after-delivery.txt
  Mailman/docs/avoid-duplicates.txt
  Mailman/docs/calc-recips.txt
  Mailman/docs/cleanse.txt
  Mailman/docs/cook-headers.txt
  Mailman/docs/membership.txt
  Mailman/docs/reply-to.txt
  Mailman/docs/subject-munging.txt
  Mailman/interfaces/member.py
  Mailman/testing/test_acknowledge.py
  Mailman/testing/test_after_delivery.py
  Mailman/testing/test_avoid_duplicates.py
  Mailman/testing/test_calc_recips.py
  Mailman/testing/test_cleanse.py
  Mailman/testing/test_cook_headers.py
renamed:
  Mailman/database/model/profile.py = Mailman/database/model/preferences.py
  Mailman/interfaces/profile.py = Mailman/interfaces/preferences.py
modified:
  Mailman/Defaults.py.in
  Mailman/Handlers/Acknowledge.py
  Mailman/Handlers/AfterDelivery.py
  Mailman/Handlers/AvoidDuplicates.py
  Mailman/Handlers/CalcRecips.py
  Mailman/Handlers/Cleanse.py
  Mailman/Handlers/CookHeaders.py
  Mailman/MailList.py
  Mailman/Utils.py
  Mailman/constants.py
  Mailman/database/listmanager.py
  Mailman/database/model/__init__.py
  Mailman/database/model/address.py
  Mailman/database/model/language.py
  Mailman/database/model/mailinglist.py
  Mailman/database/model/roster.py
  Mailman/database/model/user.py
  Mailman/database/model/version.py
  Mailman/database/types.py
  Mailman/database/usermanager.py
  Mailman/docs/addresses.txt
  Mailman/docs/listmanager.txt
  Mailman/docs/usermanager.txt
  Mailman/docs/users.txt
  Mailman/interfaces/address.py
  Mailman/interfaces/mlistrosters.py
  Mailman/interfaces/mlistweb.py
  Mailman/interfaces/roster.py
  Mailman/interfaces/user.py
  Mailman/interfaces/usermanager.py
  Mailman/testing/test_handlers.py
  Mailman/testing/test_membership.py
  Mailman/testing/test_user.py
  docs/NEWS.txt
  Mailman/database/model/preferences.py
  Mailman/interfaces/preferences.py

revno: 6504.1.13
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: model
timestamp: Thu 2007-06-21 19:46:27 -0400
message:
  Convert the AvoidDuplicates handler tests to a doctest.  Well,
  actually there /was/ no separate AvoidDuplicates test, but now there
  is, even though it may not be full coverage.
  
  Update the AvoidDuplicates handler to use more modern Python idioms.

revno: 6504.1.12
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: model
timestamp: Thu 2007-06-21 10:23:40 -0400
message:
  Convert the CookHeaders tests in test_handlers to using doctests, split up
  into several sub-documents.
  
  Defaults.py.in: Removed OLD_STYLE_PREFIXING.  So-called 'new style' 
prefixing
  is the default and only option now.
  
  CookHeaders.py is updated to the new API and some (but not all) of the 
code
  has been updated to more modern Python idioms.
  
  reply_goes_to_list attribute has been changed from a strict integer to a
  munepy enum called ReplyToMunging.
  
  RFC 2369 headers List-Subscribe and List-Unsubscribe now use the preferred
  -join and -leave addresses instead of the -request address with a subject
  value.

revno: 6504.1.11
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: model
timestamp: Tue 2007-06-19 18:42:27 -0400
message:
  Convert the Cleanse handler tests to doctest style.

revno: 6504.1.10
committer: Barry Warsaw [EMAIL PROTECTED]
branch nick: model
timestamp: Tue 2007-06-19 11:13:09 -0400
message:
  Convert the tests for the CalcRecips handler to doc tests.  There are
  some XXX's in the doc test because digest recipients aren't tested
  (though those may go in a different doctest), and neither are urgent
  messages.  This latter is for the same reason that the Approved
  handler is not yet tested; which password do you use in that header?
  
  The CalcRecips tests would also seem the natural place to test the
  receive_list_copy preference, but that actually gets processed in the
  AvoidDuplicates handler, so it isn't tested here.
  
  Add delivery_status (of type enum DeliveryStatus) to preferences.  I'm
  not entirely