summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/database/alembic/versions/42756496720_header_matches.py10
-rw-r--r--src/mailman/interfaces/mailinglist.py4
-rw-r--r--src/mailman/model/mailinglist.py10
3 files changed, 12 insertions, 12 deletions
diff --git a/src/mailman/database/alembic/versions/42756496720_header_matches.py b/src/mailman/database/alembic/versions/42756496720_header_matches.py
index 3dd896993..ae3463286 100644
--- a/src/mailman/database/alembic/versions/42756496720_header_matches.py
+++ b/src/mailman/database/alembic/versions/42756496720_header_matches.py
@@ -16,7 +16,7 @@ import sqlalchemy as sa
def upgrade():
# Create the new table
- header_matches_table = op.create_table('headermatches',
+ header_match_table = op.create_table('headermatch',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('mailing_list_id', sa.Integer(), nullable=True),
sa.Column('header', sa.Unicode(), nullable=True),
@@ -37,7 +37,7 @@ def upgrade():
)
for mlist_id, old_matches in connection.execute(mlist_table.select()):
for old_match in old_matches:
- connection.execute(header_matches_table.insert().values(
+ connection.execute(header_match_table.insert().values(
mailing_list_id=mlist_id,
header=old_match[0],
pattern=old_match[1],
@@ -66,17 +66,17 @@ def downgrade():
sa.sql.column('id', sa.Integer),
sa.sql.column('header_matches', sa.PickleType)
)
- header_matches_table = sa.sql.table('headermatches',
+ header_match_table = sa.sql.table('headermatch',
sa.sql.column('mailing_list_id', sa.Integer),
sa.sql.column('header', sa.Unicode),
sa.sql.column('pattern', sa.Unicode),
)
for mlist_id, header, pattern in connection.execute(
- header_matches_table.select()):
+ header_match_table.select()):
mlist = connection.execute(mlist_table.select().where(
mlist_table.c.id == mlist_id)).fetchone()
if not mlist["header_matches"]:
mlist["header_matches"] = []
mlist["header_matches"].append((header, pattern))
- op.drop_table('headermatches')
+ op.drop_table('headermatch')
diff --git a/src/mailman/interfaces/mailinglist.py b/src/mailman/interfaces/mailinglist.py
index c69d04771..1db5f0dae 100644
--- a/src/mailman/interfaces/mailinglist.py
+++ b/src/mailman/interfaces/mailinglist.py
@@ -842,8 +842,8 @@ class IListArchiverSet(Interface):
-class IHeaderMatches(Interface):
- """Registration record for a single bounce event."""
+class IHeaderMatch(Interface):
+ """A header matching rule for mailinglist messages."""
mailing_list = Attribute(
"""The mailing list for the header match.""")
diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py
index 33cc2b60a..c9f5e8ef1 100644
--- a/src/mailman/model/mailinglist.py
+++ b/src/mailman/model/mailinglist.py
@@ -38,7 +38,7 @@ from mailman.interfaces.domain import IDomainManager
from mailman.interfaces.languages import ILanguageManager
from mailman.interfaces.mailinglist import (
IAcceptableAlias, IAcceptableAliasSet, IListArchiver, IListArchiverSet,
- IHeaderMatches, IMailingList, Personalization, ReplyToMunging,
+ IHeaderMatch, IMailingList, Personalization, ReplyToMunging,
SubscriptionPolicy)
from mailman.interfaces.member import (
AlreadySubscribedError, MemberRole, MissingPreferredAddressError,
@@ -624,11 +624,11 @@ class ListArchiverSet:
-@implementer(IHeaderMatches)
-class HeaderMatches(Model):
- """See `IHeaderMatches`."""
+@implementer(IHeaderMatch)
+class HeaderMatch(Model):
+ """See `IHeaderMatch`."""
- __tablename__ = 'headermatches'
+ __tablename__ = 'headermatch'
id = Column(Integer, primary_key=True)