[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-12 Thread R. David Murray
R. David Murray added the comment: Patch modified to skip ssl tests if ssl not available in r76727 in trunk; that changeset included in all merges. p3k merge in r76730 as stated. 2.6 merge in r76761, using the 2.6 patch provided by Scott. 3.1 merge in r76762. -- resolution: -> fixed

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: Committed to py3k in r76730 with the suggested additional test. -- ___ Python tracker ___ ___ Pytho

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: Unfortunately, the SocketServer patches introduced other issues (see for example issue 6381). So I'm reluctant to backport those changes, since as you say no one had reported problems. It seems like the chance of inadvertently breaking someone's working 2.6 c

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial added the comment: It seems that on the py3k branch, the EOF situation is handled roughly in the same manner (the broken line is returned) and ultimately the IMAP4.abort exception is raised because b'* ' is an invalid response (the 'OK' having been dropped). IOW, it passes the EOF tes

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: I'll take a look at the socketserver issue, but probably not today. In the meantime, can you take a look at this port of the tests to py3k when you get a chance? The tests pass without changes to imaplib, but the imaplib code is a bit different in py3k. I'd

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial added the comment: I've revised my opinion. If you extract out only the changes to SocketServer and ignore the others, then I would consider it a good backport (fixes bugs only). I have attached such a patch. BTW, with this patch, you can remove the shutdown() call in the test_imapli

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial added the comment: I tracked the necessary change to r73638 and issue6267. However, I am not sure it is in scope to backport all of that. The only changed actually needed from this set to make SocketServer behave correctly with a SSLSocket is: def close_request(self, request):

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: Do you know which patches? It's possible they just haven't been evaluated for backport yet, and if that's so I'll see if I can take care of it. -- ___ Python tracker

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15509/test_imaplib_issue5949-py26.patch ___ Python tracker ___ ___ Python-bugs

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Scott Dial added the comment: I have attached a proper backport for the 2.6 maintenance branch. There were some features (not bugfixes) of the trunk that the tests depended on, which are not backported. However, the tests still hang, because there are changes to SocketServer.py that were not ba

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15508/test_imaplib_issue5949-py26.patch ___ Python tracker ___ ___ Python-bugs

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial : Added file: http://bugs.python.org/file15509/test_imaplib_issue5949-py26.patch ___ Python tracker ___ ___ Python-bugs-l

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread Scott Dial
Changes by Scott Dial : Added file: http://bugs.python.org/file15508/test_imaplib_issue5949-py26.patch ___ Python tracker ___ ___ Python-bugs-l

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: Added skipping of the SSL tests if ssl is not available in r76727. -- ___ Python tracker ___ ___ Py

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-09 Thread R. David Murray
R. David Murray added the comment: Applied to trunk in r76276. However, when I tried to backport it to 2.6, the tests hang in test_connect for the SSL version. The hang isn't interruptible by ctl-C. Perhaps there's some SSL fix that hasn't been backported, and if so it would be nice to figure

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15457/imaplib-eof-test.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15472/test_imaplib_issue5949-2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15466/test_imaplib-r76683-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15460/test_imaplib-r76683.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file15467/test_imaplib_issue5949.patch ___ Python tracker ___ ___ Python-bugs

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Scott Dial added the comment: I actually thought I was complying with PEP8.. yikes. I guess my personal rules are slightly different. I think the latest attached patch is PEP8 compliant now. And, I moved the import_module() to the top as you suggested. -- Added file: http://bugs.python.

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread R. David Murray
R. David Murray added the comment: IMO the context manager approach is much better than what I had. I'm still not used to using those :) One request: I imported test_support as support because that's what it is named in py3k, and doing it that way will make porting the patch to py3k simpler.

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-07 Thread Scott Dial
Scott Dial added the comment: The design of your patch makes a lot of sense. I found that your patch uncovered a problem with using the ThreadingMixin (which is ultimately not necessary as long as the whole SocketServer is in its own thread). I rewrote the SimpleIMAPHandler to timeout in a timel

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: Patch actually attached this time. -- Added file: http://bugs.python.org/file15467/test_imaplib_issue5949.patch ___ Python tracker ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: The traceback I posted was a spurious result of my misunderstanding your test code. With -uall it worked fine. Sorry that I didn't make that clear. Thanks for doing the work of putting the extended test framework together. Without that, this would probably

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread Scott Dial
Scott Dial added the comment: Thanks for giving it a try. I believe the issue is that I am raising an exception in the middle of run_server, which was not a pattern tested in the other modules I looked at. Thus, the threads for those do not get reaped correctly. I have rewrote the test to ensur

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: Ah, my mistake, I misread the code, sorry. Yes, if I supply -uall to regrtest the tests run correctly. -- ___ Python tracker ___ _

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: OK, after adding ThreadedNetworkedTests to the 'tests' list in test_main, the new tests ran and did hang. After applying the imaplib patch, the new tests completed. However, afterward I got the following traceback: Exception in thread Thread-6 (most likely r

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread Scott Dial
Scott Dial added the comment: The test requires regrtest.py be run with network support and the python instance be built with threads. $ ./python Lib/test/regrtest.py -u network test_imaplib Without network support, it just skips those test (which is the same way test_ssl). That seemed a bit f

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: Ah, your new test isn't being run, that's why test_impalib passes. Let me figure out why your test isn't run. -- ___ Python tracker ___ __

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-06 Thread R. David Murray
R. David Murray added the comment: With just the test patch applied, test_imaplib passes for me on trunk r76687. -- nosy: +r.david.murray ___ Python tracker ___ _

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15459/test_imaplib-r76683.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial : Added file: http://bugs.python.org/file15460/test_imaplib-r76683.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15458/test_imaplib-r76683.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial : Added file: http://bugs.python.org/file15459/test_imaplib-r76683.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial added the comment: I found myself in the mood to code, so in the spirit of "every step counts", I have attached a patch that updates test_imaplib accordingly. The construction of the test framework is based loosely on test_ssl and test_socketserver. If someone felt so moved to add mor

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/12/5 Scott Dial : > > Scott Dial added the comment: > > Ben, I understand that we are all volunteers here. My frustration in the > lack of a de facto owner of the imaplib module and not with you > personally or any other committer for that matter.\ Unf

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial added the comment: Ben, I understand that we are all volunteers here. My frustration in the lack of a de facto owner of the imaplib module and not with you personally or any other committer for that matter. As it is, there is no unittests for the imaplib module, and I am not in a pos

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Rest assured it has little to do with the difficultly of reviewing it. Rather we are all volunteers. Do you think a test would be easy to write for this? -- assignee: janssen -> ___ Python tracker

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15013/imaplib-r75166.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Scott Dial
Scott Dial added the comment: Alright, I am attaching a new patch to correct the brain-fart inefficiency of slicing versus endswith(). I don't understand why this is so difficult to review. I don't think Janssen is the right person to have been assigned to this. While it is related to SSL, I do

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-12-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: .endswith() is a good alternative to [-2:] == -- nosy: +benjamin.peterson ___ Python tracker ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-11-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> janssen nosy: +janssen stage: -> patch review versions: +Python 3.2 -Python 3.0 ___ Python tracker ___ __

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-11-18 Thread Nick Coghlan
Changes by Nick Coghlan : -- priority: -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: Unassigned from Barry since this isn't an RM review issue anymore -- assignee: barry -> ___ Python tracker ___ __

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Sorry, 2.6.4 will be solely to remove the brown paper bag of 2.6.3 from our heads. This can go in 2.6.5 though. -- ___ Python tracker ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can this go into 2.6.4? -- assignee: -> barry nosy: +rhettinger ___ Python tracker ___ ___ Pytho

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm afraid so. Please consider this for landing after 2.6.3 is released. -- assignee: barry -> ___ Python tracker ___ ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Nick Coghlan
Nick Coghlan added the comment: Probably too late for 2.6.3 - assigning to Barry to check anyway. -- assignee: -> barry nosy: +barry, ncoghlan ___ Python tracker ___ ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial : Added file: http://bugs.python.org/file15013/imaplib-r75166.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial : Removed file: http://bugs.python.org/file15012/imaplib-r75166.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Scott Dial added the comment: It would seem the logical patch would be to return the line when the empty string is returned. This would fall in line with the behavior of other objects with a readline() in python. In following with that, the patch I have attached returns a truncated line. Therein

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-08-17 Thread Ryan Tucker
Ryan Tucker added the comment: I can reproduce this problem with Python 2.6. It manifests itself as a lengthy iteration through an IMAP SSL mailbox locking up after a long while and the interpreter consuming all available system memory. I suspect this to be the combination of doom: imaplib.py

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-05-07 Thread Kevin Watters
Kevin Watters added the comment: I wasn't sure--the docs for SSLSocket.read (http://docs.python.org/library/ssl.html#ssl.SSLSocket.read) say "Reads up to nbytes bytes from the SSL-encrypted channel and returns them." With that "up to" I wasn't sure that an empty string would necessarily m

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-05-06 Thread Rod Morehead
Rod Morehead added the comment: Isn't the call to read(1) blocking in this case? If so the only reason it should spin would be if it returned an empty string representing EOF. Couldn't we just add a check for an empty string and, if found, raise an EOF exception? -- nosy: +rmore __

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-05-06 Thread Kevin Watters
New submission from Kevin Watters : I cannot reproduce this locally yet, but I have several bug reports from users showing that IMAP4_SSL connections can get stuck in an infinite loop during logout() File "imaplib.pyo", line 529, in logout File "imaplib.pyo", line 1059, in _simple_command