Ruben Bakker <ruben.bakk...@gmail.com> added the comment:

I installed Python 2.7RC1 on Mac OS X 10.6.3 and tried my script and it
worked for me. Imaplib throws the right exception instead of looping
forever:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "imapmail/explore/test2.py", line 30, in f
    server.select("INBOX")
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py",
line 642, in select
    typ, dat = self._simple_command(name, mailbox)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py",
line 1060, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py",
line 890, in _command_complete
    raise self.abort('command: %s => %s' % (name, val))
imaplib.abort: command: SELECT => socket error: EOF
>>>

On Wed, Jun 16, 2010 at 6:12 PM, Shashwat Anand <rep...@bugs.python.org>wrote:

>
> Shashwat Anand <anand.shash...@gmail.com> added the comment:
>
> "import imaplib
>
> HOST="imap.gmail.com"
> PORT=993
> USERNAME="usern...@gmail.com"
> PASSWORD="password"
>
> server = imaplib.IMAP4_SSL(host=HOST, port=PORT)
> server.login(USERNAME, PASSWORD)
>
> def f():
>        print server.select("INBOX")
>        print server.uid("FETCH", "1:*", "(UID FLAGS BODY.PEEK[HEADER.FIELDS
> (Subject)])")
>
> Call the f() function and then wait about about an hour. Call f() again and
> server.select() will not return but take all CPU."
>
> Tried to reproduce this on Python 2.7RC1. Seemed Ok to me. Took some 3
> seconds to call f() not only once, but twice, thrice.
>
> ----------
> nosy: +l0nwlf
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue9010>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file17695/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9010>
_______________________________________
I installed Python 2.7RC1 on Mac OS X 10.6.3 and tried my script and it worked 
for me. Imaplib throws the right exception instead of looping 
forever:<div><br></div><div><div>&gt;&gt;&gt; f()</div><div>Traceback (most 
recent call last):</div>

<div>  File &quot;&lt;stdin&gt;&quot;, line 1, in 
&lt;module&gt;</div><div>  File &quot;imapmail/explore/test2.py&quot;, line 
30, in f</div><div>    server.select(&quot;INBOX&quot;)</div><div>  File 
&quot;/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py&quot;,
 line 642, in select</div>

<div>    typ, dat = self._simple_command(name, mailbox)</div><div>  File 
&quot;/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py&quot;,
 line 1060, in _simple_command</div><div>    return 
self._command_complete(name, self._command(name, *args))</div>

<div>  File 
&quot;/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/imaplib.py&quot;,
 line 890, in _command_complete</div><div>    raise self.abort(&#39;command: 
%s =&gt; %s&#39; % (name, val))</div><div>imaplib.abort: command: SELECT =&gt; 
socket error: EOF</div>

<div>&gt;&gt;&gt; </div><div><br></div><div><br></div><div><br><div 
class="gmail_quote">On Wed, Jun 16, 2010 at 6:12 PM, Shashwat Anand <span 
dir="ltr">&lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;</span> 
wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex;"><br>
Shashwat Anand &lt;<a 
href="mailto:anand.shash...@gmail.com";>anand.shash...@gmail.com</a>&gt; added 
the comment:<br>
<div class="im"><br>
&quot;import imaplib<br>
<br>
HOST=&quot;<a href="http://imap.gmail.com"; 
target="_blank">imap.gmail.com</a>&quot;<br>
PORT=993<br>
USERNAME=&quot;<a 
href="mailto:usern...@gmail.com";>usern...@gmail.com</a>&quot;<br>
PASSWORD=&quot;password&quot;<br>
<br>
server = imaplib.IMAP4_SSL(host=HOST, port=PORT)<br>
server.login(USERNAME, PASSWORD)<br>
<br>
def f():<br>
        print server.select(&quot;INBOX&quot;)<br>
        print server.uid(&quot;FETCH&quot;, &quot;1:*&quot;, &quot;(UID 
FLAGS BODY.PEEK[HEADER.FIELDS (Subject)])&quot;)<br>
<br>
Call the f() function and then wait about about an hour. Call f() again and 
server.select() will not return but take all CPU.&quot;<br>
<br>
</div>Tried to reproduce this on Python 2.7RC1. Seemed Ok to me. Took some 3 
seconds to call f() not only once, but twice, thrice.<br>
<br>
----------<br>
nosy: +l0nwlf<br>
<div><div></div><div class="h5"><br>
_______________________________________<br>
Python tracker &lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue9010"; 
target="_blank">http://bugs.python.org/issue9010</a>&gt;<br>
_______________________________________<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ruben 
Bakker<br>uncomplex gmbh<br><a 
href="http://mailplaneapp.com";>http://mailplaneapp.com</a><br>
</div></div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to