[issue11492] email.header.Header doesn't fold headers correctly

2018-11-07 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PR 10378 to show that I don't think that this bug must be fixed in 
Python 2: it would break any application relying on the current folding 
algorithm.

--
nosy: +vstinner

___
Python tracker 

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



[issue11492] email.header.Header doesn't fold headers correctly

2018-11-07 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9680

___
Python tracker 

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



[issue11492] email.header.Header doesn't fold headers correctly

2012-01-02 Thread Srikanth S

Changes by Srikanth S sriks...@gmail.com:


--
nosy: +srikanths

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-18 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 51a551acb60d by R David Murray in branch '3.2':
#11492: rewrite header folding algorithm.  Less code, more passing tests.
http://hg.python.org/cpython/rev/51a551acb60d

New changeset fcd20a565b95 by R David Murray in branch 'default':
Merge: #11492: rewrite header folding algorithm.  Less code, more passing tests.
http://hg.python.org/cpython/rev/fcd20a565b95

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-18 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-10 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

This was quite the adventure.  The more I worked on fixing the tests, the more 
if/else cases the existing splitting algorithm grew.  When I reached the point 
where fixing one test broke two others, I thought maybe it was time to try a 
different approach.

Based on the knowledge gathered by banging my head on the old algorithm, I 
developed a new one.  This one is more RFC2822/RFC5322 compliant, I believe.  
It breaks only at FWS, but still gives preference to breaking after commas or 
semicolons by default.

I had to adjust several tests that tested broken behavior: the folded lines 
were longer than maxlen even though there were suitable fold points.

I'm very happy with this patch because there are 70 fewer lines of code but the 
module passes more tests.

Even though the code changes are extensive, I plan to apply this to 3.2.  It 
fixes bugs, and the new code is at least somewhat easier to understand than the 
old code (if only because there is less of it!)  I don't plan to apply it to 
3.1 because one older test fails if the patch is applied and I don't understand 
why (it appears to have nothing to do with line wrapping, and the same test 
works fine in 3.2).

--
stage: needs patch - patch review
versions:  -Python 3.1
Added file: http://bugs.python.org/file21607/better_header_spliter.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-10 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Note that this fix solves issue 11772, so I've closed that one as a duplicate.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Here is a patch containing three test cases that demonstrate three different 
failings of the header folding algorithm.  I'm working on the fix, but it is 
non-trivial.

--
components: +Library (Lib) -None
keywords: +patch
title: email.header.Header doesn't fold headers at spaces if value contains 
';'s - email.header.Header doesn't fold headers correctly
Added file: http://bugs.python.org/file21563/header_folding_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file21563/header_folding_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Note that 2.7 fails two of these tests as well, but for different reasons.  I'm 
not currently planning to fix 2.7, as its behavior at least (a) doesn't lose 
non-whitespace information and (b) doesn't exceed the maxheaderlen.

--
Added file: http://bugs.python.org/file21564/header_folding_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file21564/header_folding_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Here is an updated test patch that brings the test coverage of the relevant 
code much closer to 100%.  There are still three lines and one branch 
uncovered, but it appears as though one of the bugs is preventing the test case 
that would produce full coverage from getting to the relevant code path.  This 
gives me enough coverage to feel safer mucking about with the algorithm.

--
Added file: http://bugs.python.org/file21576/header_folding_tests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 10725fc76e11 by R David Murray in branch '3.1':
#11492: fix header truncation on folding when there are runs of split chars.
http://hg.python.org/cpython/rev/10725fc76e11

New changeset 74ec64dc3538 by R David Murray in branch '3.2':
Merge #11492: fix header truncation on folding when there are runs of split 
chars.
http://hg.python.org/cpython/rev/74ec64dc3538

New changeset 5ec2695c9c15 by R David Murray in branch 'default':
Merge #11492: fix header truncation on folding when there are runs of split 
chars.
http://hg.python.org/cpython/rev/5ec2695c9c15

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11492
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com