Does not work on Python 3.6

Bug #1654334 reported by Aurélien Bompard
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Colin Watson

Bug Description

On Python 3.6, the default value for the 'decode_data' argument in smtpd.SMTPServer changed from True to False. As a result, process_message() gets bytestrings instead of unicode strings and the email.message_from_string() converter fails.

A fix is attached. This parameter was not available in Python 3.4, so the attached patch detects the Python version and sets the parameter if necessary.

Related branches

Revision history for this message
Aurélien Bompard (abompard) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

I think it would be better to pass decode_data=False as of 3.5 and handle the changed process_message signature. I'm preparing a merge proposal to that effect.

Changed in lazr.smtptest:
status: New → In Progress
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson)
Changed in lazr.smtptest:
status: In Progress → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :

Fixed in lazr.smtptest 2.0.4.

Changed in lazr.smtptest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.