zope.testbrowser and python2.7

Jan-Jaap Driessen <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
The httplib.HTTPConnection API changed from python2.6 to python2.7.
These changes are reflected in the handleErrors property of
zope.testbrowser.browser.Browser - it is no longer possible to pass a
boolean into the request headers. A fix is available on the trunk of
zope.testbrowser [1]. In this implementation, a boolean is provided to
the consumers of the testbrowser API and a string is used in the
request headers.

This implementation is sub-optimal in my opinion. In the branch
'janjaapdriessen-handle-errors' [2] you will find a cleaner
implementation, where the switch to handle_errors is controlled by the
presence of a "zope-do-not-handle-errors" header. The value of the
header is no longer interpreted. This change is backwards
incompatible. Code relying on the 'x-zope-handle-errors' header will
break. I have tested this implementation against the ZTK trunk on
python2.7 and have found no breakage of this kind.

Please let me know if either of these solutions is OK with you. If so,
grant me pypi rights (my handle is 'janjaapdriessen') so I can release
zope.testbrowser and get a step closer to making the ZTK run on
python2.7.

Thanks,

-- 
Jan-Jaap Driessen

1) svn.zope.org/repos/main/zope.testbrowser/trunk
2) svn.zope.org/repos/main/zope.testbrowser/branches/janjaapdriessen-handle-errors
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.