summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mailman/app/docs/hooks.rst4
-rw-r--r--src/mailman/app/moderator.py2
-rw-r--r--src/mailman/commands/docs/inject.rst8
-rw-r--r--src/mailman/commands/docs/qfile.rst1
-rw-r--r--src/mailman/model/docs/registration.rst2
-rw-r--r--src/mailman/runners/docs/command.rst4
-rw-r--r--src/mailman/runners/docs/digester.rst16
-rw-r--r--src/mailman/utilities/importer.py5
8 files changed, 21 insertions, 21 deletions
diff --git a/src/mailman/app/docs/hooks.rst b/src/mailman/app/docs/hooks.rst
index eb6cbac05..8b616f1b2 100644
--- a/src/mailman/app/docs/hooks.rst
+++ b/src/mailman/app/docs/hooks.rst
@@ -18,12 +18,12 @@ Hooks name an importable callable so it must be accessible on ``sys.path``.
... counter = 1
... def pre_hook():
... global counter
- ... print 'pre-hook:', counter
+ ... print('pre-hook:', counter)
... counter += 1
...
... def post_hook():
... global counter
- ... print 'post-hook:', counter
+ ... print('post-hook:', counter)
... counter += 1
... """, file=fp)
>>> fp.close()
diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py
index c82327184..dc5cabd0a 100644
--- a/src/mailman/app/moderator.py
+++ b/src/mailman/app/moderator.py
@@ -86,7 +86,7 @@ def hold_message(mlist, msg, msgdata=None, reason=None):
# Message-ID header.
message_id = msg.get('message-id')
if message_id is None:
- msg['Message-ID'] = message_id = make_msgid().decode('utf-8')
+ msg['Message-ID'] = message_id = make_msgid()
assert isinstance(message_id, six.text_type), (
'Message-ID is not a unicode: %s' % message_id)
getUtility(IMessageStore).add(msg)
diff --git a/src/mailman/commands/docs/inject.rst b/src/mailman/commands/docs/inject.rst
index 16cf81661..de295b8f6 100644
--- a/src/mailman/commands/docs/inject.rst
+++ b/src/mailman/commands/docs/inject.rst
@@ -94,7 +94,7 @@ By default, the incoming queue is used.
>>> dump_msgdata(items[0].msgdata)
_parsemsg : False
- listname : test@example.com
+ listid : test.example.com
original_size: 203
version : 3
@@ -122,7 +122,7 @@ But a different queue can be specified on the command line.
>>> dump_msgdata(items[0].msgdata)
_parsemsg : False
- listname : test@example.com
+ listid : test.example.com
original_size: 203
version : 3
@@ -167,7 +167,7 @@ The message text can also be provided on standard input.
>>> dump_msgdata(items[0].msgdata)
_parsemsg : False
- listname : test@example.com
+ listid : test.example.com
original_size: 211
version : 3
@@ -195,7 +195,7 @@ injected.
_parsemsg : False
bar : two
foo : one
- listname : test@example.com
+ listid : test.example.com
original_size: 203
version : 3
diff --git a/src/mailman/commands/docs/qfile.rst b/src/mailman/commands/docs/qfile.rst
index 721d63567..f4732e3be 100644
--- a/src/mailman/commands/docs/qfile.rst
+++ b/src/mailman/commands/docs/qfile.rst
@@ -47,7 +47,6 @@ Once we've figured out the file name of the shunted message, we can print it.
>>> command.process(FakeArgs)
[----- start pickle -----]
<----- start object 1 ----->
- From nobody ...
From: aperson@example.com
To: test@example.com
Subject: Uh oh
diff --git a/src/mailman/model/docs/registration.rst b/src/mailman/model/docs/registration.rst
index 738006a3d..55e99f23a 100644
--- a/src/mailman/model/docs/registration.rst
+++ b/src/mailman/model/docs/registration.rst
@@ -124,7 +124,7 @@ message is sent to the user in order to verify the registered address.
<BLANKLINE>
>>> dump_msgdata(items[0].msgdata)
_parsemsg : False
- listname : alpha@example.com
+ listid : alpha.example.com
nodecorate : True
recipients : {'aperson@example.com'}
reduced_list_headers: True
diff --git a/src/mailman/runners/docs/command.rst b/src/mailman/runners/docs/command.rst
index a7a4da8ed..fe3311d87 100644
--- a/src/mailman/runners/docs/command.rst
+++ b/src/mailman/runners/docs/command.rst
@@ -63,9 +63,9 @@ And now the response is in the ``virgin`` queue.
>>> dump_msgdata(messages[0].msgdata)
_parsemsg : False
- listname : test@example.com
+ listid : test.example.com
nodecorate : True
- recipients : set([u'aperson@example.com'])
+ recipients : {'aperson@example.com'}
reduced_list_headers: True
version : ...
diff --git a/src/mailman/runners/docs/digester.rst b/src/mailman/runners/docs/digester.rst
index 14580c336..536cf06c2 100644
--- a/src/mailman/runners/docs/digester.rst
+++ b/src/mailman/runners/docs/digester.rst
@@ -538,12 +538,12 @@ and the other is the RFC 1153 digest.
Only wperson and xperson get the MIME digests.
>>> sorted(mime.msgdata['recipients'])
- [u'wperson@example.com', u'xperson@example.com']
+ ['wperson@example.com', 'xperson@example.com']
Only yperson and zperson get the RFC 1153 digests.
>>> sorted(rfc1153.msgdata['recipients'])
- [u'yperson@example.com', u'zperson@example.com']
+ ['yperson@example.com', 'zperson@example.com']
Now uperson decides that they would like to start receiving digests too.
::
@@ -558,10 +558,10 @@ Now uperson decides that they would like to start receiving digests too.
>>> mime, rfc1153 = mime_rfc1153(messages)
>>> sorted(mime.msgdata['recipients'])
- [u'uperson@example.com', u'wperson@example.com', u'xperson@example.com']
+ ['uperson@example.com', 'wperson@example.com', 'xperson@example.com']
>>> sorted(rfc1153.msgdata['recipients'])
- [u'yperson@example.com', u'zperson@example.com']
+ ['yperson@example.com', 'zperson@example.com']
At this point, both uperson and wperson decide that they'd rather receive
regular deliveries instead of digests. uperson would like to get any last
@@ -581,10 +581,10 @@ as much and does not want to receive one last digest.
>>> messages = get_queue_messages('virgin')
>>> mime, rfc1153 = mime_rfc1153(messages)
>>> sorted(mime.msgdata['recipients'])
- [u'uperson@example.com', u'xperson@example.com']
+ ['uperson@example.com', 'xperson@example.com']
>>> sorted(rfc1153.msgdata['recipients'])
- [u'yperson@example.com', u'zperson@example.com']
+ ['yperson@example.com', 'zperson@example.com']
Since uperson has received their last digest, they will not get any more of
them.
@@ -599,7 +599,7 @@ them.
>>> mime, rfc1153 = mime_rfc1153(messages)
>>> sorted(mime.msgdata['recipients'])
- [u'xperson@example.com']
+ ['xperson@example.com']
>>> sorted(rfc1153.msgdata['recipients'])
- [u'yperson@example.com', u'zperson@example.com']
+ ['yperson@example.com', 'zperson@example.com']
diff --git a/src/mailman/utilities/importer.py b/src/mailman/utilities/importer.py
index a75ee4535..b2c15e6f8 100644
--- a/src/mailman/utilities/importer.py
+++ b/src/mailman/utilities/importer.py
@@ -382,8 +382,9 @@ def import_config_pck(mlist, config_dict):
with codecs.open(filepath, 'w', encoding='utf-8') as fp:
fp.write(text)
# Import rosters.
- members = set(config_dict.get('members', {}).keys()
- + config_dict.get('digest_members', {}).keys())
+ regulars_set = set(config_dict.get('members', {}))
+ digesters_set = set(config_dict.get('digest_members', {}))
+ members = regulars_set + digesters_set
import_roster(mlist, config_dict, members, MemberRole.member)
import_roster(mlist, config_dict, config_dict.get('owner', []),
MemberRole.owner)