[prev in list] [next in list] [prev in thread] [next in thread]
List: zope-cvs
Subject: [Zope-Checkins] SVN: Zope/branches/gsoc-python-2.5/ - Launchpad
From: Sidnei da Silva <sidnei () enfoldsystems ! com>
Date: 2008-10-26 5:14:49
Message-ID: 20081026051449.69FAF39632 () cvs ! zope ! org
[Download RAW message or body]
Log message for revision 92571:
- Launchpad #280334: Fixed problem with 'timeout'
argument/attribute missing in testbrowser tests.
Changed:
U Zope/branches/gsoc-python-2.5/doc/CHANGES.txt
U Zope/branches/gsoc-python-2.5/lib/python/Products/Five/testbrowser.py
-=-
Modified: Zope/branches/gsoc-python-2.5/doc/CHANGES.txt
===================================================================
--- Zope/branches/gsoc-python-2.5/doc/CHANGES.txt 2008-10-26 00:38:25 UTC (rev 92570)
+++ Zope/branches/gsoc-python-2.5/doc/CHANGES.txt 2008-10-26 05:14:47 UTC (rev 92571)
@@ -198,6 +198,9 @@
Bugs Fixed
+ - Launchpad #280334: Fixed problem with 'timeout'
+ argument/attribute missing in testbrowser tests.
+
- Fixed against-the-rules zope.conf option 'fast_listen' to read
'fast-listen' (dash, not underscore).
Modified: Zope/branches/gsoc-python-2.5/lib/python/Products/Five/testbrowser.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/Products/Five/testbrowser.py 2008-10-26 \
00:38:25 UTC (rev 92570)
+++ Zope/branches/gsoc-python-2.5/lib/python/Products/Five/testbrowser.py 2008-10-26 \
05:14:47 UTC (rev 92571) @@ -18,6 +18,8 @@
$Id$
"""
+import sys
+import socket
import urllib2
import mechanize
@@ -29,7 +31,7 @@
class PublisherConnection(testing.PublisherConnection):
- def __init__(self, host):
+ def __init__(self, host, timeout=None):
from Testing.ZopeTestCase.zopedoctest.functional import http
self.caller = http
self.host = host
@@ -76,6 +78,10 @@
def http_open(self, req):
"""Open an HTTP connection having a ``urllib2`` request."""
# Here we connect to the publisher.
+ if sys.version_info > (2, 6) and not hasattr(req, 'timeout'):
+ # Workaround mechanize incompatibility with Python
+ # 2.6. See: LP #280334
+ req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT
return self.do_open(PublisherConnection, req)
_______________________________________________
Zope-Checkins maillist - Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic