[issue14344] repr of email policies is wrong

2012-03-17 Thread R. David Murray
R. David Murray added the comment: Committed. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14344] repr of email policies is wrong

2012-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97b0cf9df420 by R David Murray in branch 'default': #14344: fixed the repr of email.policy objects. http://hg.python.org/cpython/rev/97b0cf9df420 -- nosy: +python-dev ___ Python tracker

[issue14344] repr of email policies is wrong

2012-03-17 Thread R. David Murray
R. David Murray added the comment: Ach, I screwed up my testing at the interactive interpreter. Yes, it does work, and I will commit the fix. Thanks for the report. -- ___ Python tracker ___

[issue14344] repr of email policies is wrong

2012-03-17 Thread Éric Araujo
Éric Araujo added the comment: I don’t understand why the repr should use \\r instead of \r. It seems to work: >>> from email.policy import Policy, HTTP, strict >>> strict Policy(raise_on_defect=True) >>> eval(repr(strict)) Policy(raise_on_defect=True) >>> HTTP Policy(linesep='\r\n', max_line_

[issue14344] repr of email policies is wrong

2012-03-17 Thread R. David Murray
R. David Murray added the comment: That doesn't produce an evalable repr, though. The repr should actually be Policy(linesep='\\r\\n', max_line_length=None) I'm not immediately seeing how to get that to happen. -- ___ Python tracker

[issue14344] repr of email policies is wrong

2012-03-16 Thread Éric Araujo
New submission from Éric Araujo : >>> import email.policy as p >>> p.default Policy() >>> p.HTTP Policy(["linesep='\\r\\n'", 'max_line_length=None']) I think you wanted Policy(linesep='\r\n', max_line_length=None); the problem comes from __repr__ where a format field is replaced by a list, whic