Replaced copy-and-pasted httplib with patched httplib, saving a few K. Added test_httplib to the stdlib tests, as it actually exercises sockets in 2.6 (it's still pretty useless for our purposes in 2.5).

This commit is contained in:
Ryan Williams
2009-11-28 03:39:20 -05:00
parent 64cc20893f
commit 4db20f2a28
3 changed files with 21 additions and 1425 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -161,7 +161,7 @@ class GreenSocket(object):
fd = family_or_realsock
assert not args, args
assert not kwargs, kwargs
set_nonblocking(fd)
self.fd = fd
self._fileno = fd.fileno()

View File

@@ -0,0 +1,11 @@
from eventlet import patcher
from eventlet.green import httplib
from eventlet.green import socket
patcher.inject('test.test_httplib',
globals(),
('httplib', httplib),
('socket', socket))
if __name__ == "__main__":
test_main()