[issue29053] Implement >From_ decoding on input from mbox

2017-01-02 Thread bpoaugust

bpoaugust added the comment:

The patch can be simplified by just looking for b'\n' in the last 6 chars, and 
caching from b'\n' if found.

This would mean more file seeking in exchange for less buffer matching.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29053] Implement >From_ decoding on input from mbox

2016-12-29 Thread bpoaugust

Changes by bpoaugust :


--
versions: +Python 3.5 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust

bpoaugust added the comment:

Attached please find patch which works for me.

To use it independently of email, do something like:

messages = mailbox.mbox(filename, MboxoFactory)

where:

class MboxoFactory(mailbox.mboxMessage):
def __init__(self, message=None):
super().__init__(message=MboxoReader(message))

HTH

--
Added file: http://bugs.python.org/file46017/mboxo_patch.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread R. David Murray

R. David Murray added the comment:

Not easily.  Making the feedparser more pluggable is on my wish list, but at 
this point someone would have to fund me for work on the email package before 
I'd be able to even clear the backlog to think about it :)

I'd say accepting this as a new feature is a no-brainer, if you want to work on 
a patch.  Make enabling it a Policy option that defaults to the current 
behavior.

--
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust

bpoaugust added the comment:

Is there any way to override the current behaviour?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29053] Implement >From_ decoding on input from mbox

2016-12-23 Thread bpoaugust

New submission from bpoaugust:

The email package implements mboxo From_ mangling on output by default.

However there is no provision to unmangle >From_ on input.

This means that it's not possible to import mboxo files correctly.

--
components: email
messages: 283879
nosy: barry, bpoaugust, r.david.murray
priority: normal
severity: normal
status: open
title: Implement >From_ decoding on input from mbox
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com