Roundup Tracker - Issues

Issue 2550879

classification
Cleanup/removal of roundup.anypy.email_ module
Type: rfe Severity: minor
Components: Versions: devel
process
Status: new
:
: : jerrykan
Priority: :

Created on 2015-03-20 14:04 by jerrykan, last changed 2015-03-20 14:08 by jerrykan.

Messages
msg5300 Author: [hidden] (jerrykan) Date: 2015-03-20 14:04
The roundup.anypy.email_ module is providing backward compatibility for
versions of Python older than v2.4. Roundup no longer provides support
for anything before Python v2.5, so there is potential for removing the
module.

The following parts of roundup.anypy.email_ need to be reworked/migrated
to enable removing the module:

* FeedParser
This should be fairly straight-forward to cleanup/remove

* "continuation_ws monkey patch"
The monkey patch fixes incompatibilities between Python v2.[56] and v2.7
when generating headers. Ensuring this "magic" works relies on the
module being imported but not necessarily used (ie. in
'roundup/cgi/client.py' and 'roundup/mailer.py'). This behaviour is
non-obvious and may lead to these imports being removed because they
appear to be redundant. Implementing work-arounds in the relevant parts
of the Roundup codebase may be a better long-term solution and allow the
removal of this monkey patch.

* decode_header()
This appears to be a backport of some fixes to
email.header.decode_header() that were applied to Python 2.7/3.3+ to
provide compatibility for Python 2.[56]. Running flake8 over the code
seems to indicate that the code itself has some issues. The
decode_header() function is also used in sections of code
(roundup/mailgw.py) that are using the mimetools module, which has been
deprecated since Python v2.3. So this may required a more general cleanup.
msg5301 Author: [hidden] (jerrykan) Date: 2015-03-20 14:08
FeedParser code removed in commit:

  http://hg.code.sf.net/p/roundup/code/rev/28a72f125a14
History
Date User Action Args
2015-03-20 14:08:48jerrykansetmessages: + msg5301
2015-03-20 14:04:15jerrykancreate