Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread William Ray Wing
On Aug 26, 2013, at 5:28 AM, Chris Down  wrote:

> On 2013-08-26 01:23, Alan Gauld wrote:
>> While this is technically within the remit of this list, since its
>> about a standard library module, I suspect you might be better
>> off asking on the main tutor list. It's at a deeper level of
>> skill/experience than most of the tutor queries.
> 
> Hm, I guess I don't understand the remit of the two lists then. Tutor has
> always seemed very... non-tutory. I'll post it there, anyway. Thanks!
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

I'd be willing to bet that Alan simply foobar'd his answer - he _meant_ to say 
the main python list, not the main tutor list.

-Bill
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread ALAN GAULD
Oops, yes. That's absolutely correct.

Sorry about any confusion caused!
 
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/



>
> From: William Ray Wing 
>To: Chris Down  
>Cc: William Ray Wing ; Alan Gauld ; 
>tutor@python.org 
>Sent: Monday, 26 August 2013, 14:50
>Subject: Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection 
>objects
> 
>
>On Aug 26, 2013, at 5:28 AM, Chris Down  wrote:
>
>> On 2013-08-26 01:23, Alan Gauld wrote:
>>> While this is technically within the remit of this list, since its
>>> about a standard library module, I suspect you might be better
>>> off asking on the main tutor list. It's at a deeper level of
>>> skill/experience than most of the tutor queries.
>> 
>> Hm, I guess I don't understand the remit of the two lists then. Tutor has
>> always seemed very... non-tutory. I'll post it there, anyway. Thanks!
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>
>I'd be willing to bet that Alan simply foobar'd his answer - he _meant_ to say 
>the main python list, not the main tutor list.
>
>-Bill
>
>___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread Chris Down
On 2013-08-26 09:50, William Ray Wing wrote:
> I'd be willing to bet that Alan simply foobar'd his answer - he _meant_ to
> say the main python list, not the main tutor list.

I guessed that was what he meant. I posted on python-list, anyway.


pgpE1GejEhn4I.pgp
Description: PGP signature
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread Steven D'Aprano

On 26/08/13 19:28, Chris Down wrote:

On 2013-08-26 01:23, Alan Gauld wrote:

While this is technically within the remit of this list, since its
about a standard library module, I suspect you might be better
off asking on the main tutor list. It's at a deeper level of
skill/experience than most of the tutor queries.


Hm, I guess I don't understand the remit of the two lists then. Tutor has
always seemed very... non-tutory. I'll post it there, anyway. Thanks!



It's not so much that your question is off-topic for this list -- it sort of is, but who 
cares, we often discuss things which are only tangentially related to "learning 
Python the language" -- but that the number of people on this list is smaller than 
the main python-l...@python.org list. So for more advanced questions like this, you're 
more likely to get an answer from someone there, just by weight of numbers.



--
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-26 Thread Chris Down
On 2013-08-26 01:23, Alan Gauld wrote:
> While this is technically within the remit of this list, since its
> about a standard library module, I suspect you might be better
> off asking on the main tutor list. It's at a deeper level of
> skill/experience than most of the tutor queries.

Hm, I guess I don't understand the remit of the two lists then. Tutor has
always seemed very... non-tutory. I'll post it there, anyway. Thanks!


pgpWZX6Cfnq6n.pgp
Description: PGP signature
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-25 Thread Alan Gauld

On 25/08/13 23:34, Chris Down wrote:

I am experiencing intermittent issues where an exception will be raised when
calling getresponse(), which makes the entire connection stuck in Request-sent
state.


While this is technically within the remit of this list, since its
about a standard library module, I suspect you might be better
off asking on the main tutor list. It's at a deeper level of
skill/experience than most of the tutor queries.

But you may well get an answer here, it's just that the
main list would certainly consider this to be a valid query too.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Resetting state of http.client/httplib HTTPSConnection objects

2013-08-25 Thread Chris Down
I am experiencing intermittent issues where an exception will be raised when
calling getresponse(), which makes the entire connection stuck in Request-sent
state. Is it possible to reset to idle state somehow without reinstantiating
the HTTPSConnection? I ideally want to keep the connection to the server, and
just reset the state to idle so that I can make another request (like you would
usually do by calling getresponse()).

>>> a.conn

>>> a.conn.getresponse()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.3/http/client.py", line 1143, in getresponse
response.begin()
  File "/usr/lib64/python3.3/http/client.py", line 354, in begin
version, status, reason = self._read_status()
  File "/usr/lib64/python3.3/http/client.py", line 324, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
>>> a.conn.request("GET", "foo")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.3/http/client.py", line 1061, in request
self._send_request(method, url, body, headers)
  File "/usr/lib64/python3.3/http/client.py", line 1089, in _send_request
self.putrequest(method, url, **skips)
  File "/usr/lib64/python3.3/http/client.py", line 944, in putrequest
raise CannotSendRequest(self.__state)
http.client.CannotSendRequest: Request-sent


pgphT9VpQuXQG.pgp
Description: PGP signature
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor