[issue12009] netrc module crashes if netrc file has comment lines

2011-06-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb3a77b0f8dd by Benjamin Peterson in branch '2.7': fix regression in netrc comment handling (closes #12009) http://hg.python.org/cpython/rev/cb3a77b0f8dd New changeset 6993910be426 by Benjamin Peterson in branch '2.7': merge 2.7.2 release branch wi

[issue12009] netrc module crashes if netrc file has comment lines

2011-06-10 Thread R. David Murray
R. David Murray added the comment: lexer.instream.readline(): no, we can't just call that without the seek, because reading the token that started with # may have caused the line to be consumed already. I've expanded the comment to explain this. cygwin: I'd add a comment if I knew what that

[issue12009] netrc module crashes if netrc file has comment lines

2011-06-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'd like to see this go in. +# seek to the beginning of the comment, then skip the line. +pos = len(tt) + 1 +lexer.instream.seek(-pos, 1) +lexer.instream.readline() Can't you just lexer.instrea

[issue12009] netrc module crashes if netrc file has comment lines

2011-06-09 Thread R. David Murray
R. David Murray added the comment: Here is an updated patch with the tests refactored even further. The patch seems correct to me, and almost all the comment tests fail before the patch and pass after. Benjamin, this patch fixes a regression relative to 2.7.1 and 3.1.3, so I'm setting it to

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Ruslan Mstoi added the comment: Thanks for helping with cleaning up the patch. I already removed that docstring too. -- ___ Python tracker ___ _

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Removed file: http://bugs.python.org/file22075/issue12009_patch4.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Added file: http://bugs.python.org/file22076/issue12009_patch.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Éric Araujo
Éric Araujo added the comment: +1 to that last patch, modulo removal of an unnecessary docstring on one test method (IIRC the test runner would display it in verbose mode and that would not be useful output; the test speaks for itself, only a comment with this bug number is maybe missing). R

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Removed file: http://bugs.python.org/file22074/issue12009_patch3.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Removed file: http://bugs.python.org/file22019/issue12009_patch2.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Removed file: http://bugs.python.org/file22013/issue12009_patch.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Added file: http://bugs.python.org/file22075/issue12009_patch4.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-23 Thread Ruslan Mstoi
Ruslan Mstoi added the comment: Uploading patch updated according to the review comments. -- Added file: http://bugs.python.org/file22074/issue12009_patch3.diff ___ Python tracker _

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-18 Thread Ruslan Mstoi
Ruslan Mstoi added the comment: removed leftover debug code from patch -- Added file: http://bugs.python.org/file22019/issue12009_patch2.diff ___ Python tracker ___

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-18 Thread Ruslan Mstoi
Changes by Ruslan Mstoi : Removed file: http://bugs.python.org/file22018/issue12009_patch.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-18 Thread Ruslan Mstoi
Ruslan Mstoi added the comment: I agree, the test input was becoming unmaintainable. So, I updated the patch with the refactored unit tests. -- Added file: http://bugs.python.org/file22018/issue12009_patch.diff ___ Python tracker

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-17 Thread R. David Murray
R. David Murray added the comment: With these new additions, the test input is getting unwieldy. If you have the time, I'd like to see the unit tests refactored to be more unit-testy. That is, instead of a single test netrc file, have multiple inputs, one for each thing being tested, and tu

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-17 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-17 Thread Ruslan Mstoi
Ruslan Mstoi added the comment: OK, finally got some time to make a patch. The fix is to seek the beginning of the comment before calling readline. That way the next line won't be deleted. Also, provided a test case for this issue in the patch. -- keywords: +patch Added file: http://b

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-06 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. Would you like to submit a patch? If so, guidelines are on http://docs.python.org/devguide -- nosy: +eric.araujo versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-05 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy nosy: +r.david.murray stage: -> test needed type: crash -> behavior ___ Python tracker ___ __

[issue12009] netrc module crashes if netrc file has comment lines

2011-05-05 Thread Ruslan Mstoi
New submission from Ruslan Mstoi : It seems recent patch from Issue 10464 has introduced problems into one line comment handling of netrc module. Problem 1: If there is a line starting with a comment sign the following traceback is shown: Traceback (most recent call last): File "/usr/lib/py