Re: [Python-Dev] [ 1673007 ] urllib2 requests history + HEAD

2007-03-16 Thread K.Danilov aka koder
  From: Facundo Batista [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]
  This patch was posted by koder_ua.

  I think that Request must have a request type parameters, so people
  can send HEAD requests easily.

  But it seems to me that keeping a request history in the module is bad,
  because it can easily grow up to thousands and explode (a.k.a. consume
  too much memory).

  Fo example, I have a web service, running 7x24, and opening another web
  service, with around 10 requests per second. This means, keeping the
  history (around 50bytes each request), 1.2 GB of RAM in only a month!

  So, I'll close this patch as Rejected, for this reason, if anyone
  raises objections.

  Regards,
  --
  .   Facundo

This is probably a misunderstanding.
Request's history don't store in the module.They store in two places:

1) In Request object (for current request, so they would be destroyеd 
with it);
2) In HTTPConnection object  (while request redirects). In HTTPConnection
history stores only for current served Request. Even if You use the
same HTTPConnection
for many Requests, they (HTTPConnection) clear history every time when
new Request starts.

# from httplib HTTPConnection.putrequest patched
str = '%s %s %s' % (method, url, self._http_vsn_str)
self._output(str)
self.sended_hdrs = [str]  previous history die here

___Full history for all processed request didn't not stored in any 
place.

P.S. This message may be duplicated - first copy i sent from
gmail.com and it didn't reach mail list for some unknown for me reasons.
---
KDanilov aka koder(aka koder_ua)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [ 1673007 ] urllib2 requests history + HEAD

2007-03-13 Thread KoDer
 From: Facundo Batista [EMAIL PROTECTED]
 This patch was posted by koder_ua.

 I think that Request must have a request type parameters, so people
 can send HEAD requests easily.

 But it seems to me that keeping a request history in the module is bad,
 because it can easily grow up to thousands and explode (a.k.a. consume
 too much memory).

 Fo example, I have a web service, running 7x24, and opening another web
 service, with around 10 requests per second. This means, keeping the
 history (around 50bytes each request), 1.2 GB of RAM in only a month!

 So, I'll close this patch as Rejected, for this reason, if anyone
 raises objections.

 Regards,
 --
 .   Facundo

This is probably a misunderstanding.
Request's history don't store in the module.They store in two places:

1) In Request object (for current request, so they would be destroyеd with it);
2) In HTTPConnection object  (while request redirects). In HTTPConnection
history stores only for current served Request. Even if You use the
same HTTPConnection
for many Requests, they (HTTPConnection) clear history every time when
new Request starts.

# from httplib HTTPConnection.putrequest patched
str = '%s %s %s' % (method, url, self._http_vsn_str)
self._output(str)
self.sended_hdrs = [str]  previous history die here

___Full history for all processed request didn't not stored in any place.
---
KDanilov aka koder(aka koder_ua)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] [ 1673007 ] urllib2 requests history + HEAD support

2007-03-12 Thread Facundo Batista
This patch was posted by koder_ua.

I think that Request must have a request type parameters, so people
can send HEAD requests easily.

But it seems to me that keeping a request history in the module is bad,
because it can easily grow up to thousands and explode (a.k.a. consume
too much memory).

Fo example, I have a web service, running 7x24, and opening another web
service, with around 10 requests per second. This means, keeping the
history (around 50bytes each request), 1.2 GB of RAM in only a month!

So, I'll close this patch as Rejected, for this reason, if anyone
raises objections.

Regards,



-- 
.   Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com