[PULL] Improvements to message parsing
Daniel Axtens
dja at axtens.net
Fri Sep 23 10:11:18 AEST 2016
Hi Stephen,
Please consider pulling from the signed tag below for any patches that got
lost on the mailing list.
Regards,
Daniel
The following changes since commit 2b94b6ec5c2e328137e3e6ba6b319f4f4624cdd6:
gitignore: Ignore vagrant and vim files (2016-09-20 00:42:14 +0100)
are available in the git repository at:
https://github.com/daxtens/patchwork tags/parse-improvements-20160923
for you to fetch changes up to 9ee4965d6f4eea332daa7f97d760e6914da5a7d1:
parsemail tests: add test for mail with utf-8 (2016-09-23 09:16:08 +1000)
----------------------------------------------------------------
Improvements to message parsing
This includes:
- some fixes to make testing easier by passing around command-line options
- fixes for headers with invalid characters
- A modified version of Stephen's parsemail managment command migration
- more tests
----------------------------------------------------------------
Daniel Axtens (6):
parsemail.sh: make testing easier
parsemail-batch.sh: pass command-line options to parsemail
parser: parse headers containing invalid characters
parser tests: test parsing of interesting characters
parsemail: Convert to a management command
parsemail tests: add test for mail with utf-8
patchwork/bin/parsemail-batch.sh | 8 +-
patchwork/bin/parsemail.py | 114 ---------------------
patchwork/bin/parsemail.sh | 17 ++-
patchwork/management/commands/parsemail.py | 84 +++++++++++++++
patchwork/parser.py | 77 ++++++++++++--
patchwork/settings/base.py | 60 ++++++++++-
patchwork/tests/__init__.py | 23 +++++
patchwork/tests/mail/0012-invalid-header-char.mbox | 72 +++++++++++++
patchwork/tests/mail/0013-with-utf8-body.mbox | 46 +++++++++
patchwork/tests/test_management.py | 112 ++++++++++++++++++++
patchwork/tests/test_parser.py | 29 +++++-
patchwork/tests/utils.py | 2 +-
12 files changed, 503 insertions(+), 141 deletions(-)
delete mode 100755 patchwork/bin/parsemail.py
create mode 100644 patchwork/management/commands/parsemail.py
create mode 100644 patchwork/tests/mail/0012-invalid-header-char.mbox
create mode 100644 patchwork/tests/mail/0013-with-utf8-body.mbox
create mode 100644 patchwork/tests/test_management.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20160923/0a6bdf67/attachment.sig>
More information about the Patchwork
mailing list