Missing support for request-object in zope.testbrowser after r84900
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.testbrowser |
Invalid
|
Low
|
Unassigned |
Bug Description
Code snippet:
>>> def open(self, url, data=None):
>>> """See zope.testbrowse
>>> url = str(url)
This string coercion is unfortunate, because ``mechanize`` accepts a
(mechanize-) request-object in place of a URL string here. Using a
custom request object allows us to do such things as setting the
REQUEST_TYPE header string, which is not possible throught the
standard API.
Changeset comment:
- Remove vendor import of mechanize.
- Fix bug that caused HTTP exception tracebacks to differ between
version 3.4.0 and 3.4.1.
- Workaround for bug in Python Cookie.SimpleCookie when handling
unicode strings.
- Fix bug introduced in 3.4.1 that created incompatible tracebacks in
doctests. This necessitated adding a patched mechanize to the
source tree; patches have been sent to the mechanize project.
Not sure which of the above this coercion is trying to solve, but
perhaps it could be solved in a way that didn't break the mechanize
functionality.
Changed in zope3: | |
status: | New → Won't Fix |
Changed in zope.testbrowser: | |
importance: | Undecided → Low |
status: | New → Triaged |
On Wed, Mar 18, 2009 at 3:33 AM, Malthe <email address hidden> wrote: r.interfaces. IBrowser" ""
> Public bug reported:
>
> Code snippet:
>
>>>> def open(self, url, data=None):
>>>> """See zope.testbrowse
>>>> url = str(url)
>
> This string coercion is unfortunate, because ``mechanize`` accepts a
> (mechanize-) request-object in place of a URL string here. Using a
> custom request object allows us to do such things as setting the
> REQUEST_TYPE header string, which is not possible throught the
> standard API.
Using mechanize request objects wasn't intentionally supported (hence
the lack of tests for it). Mechanize is just an implementation detail
of testbrowser, mechanize shouldn't be exposed to users of testbrowser.
What do you want mechanize request object support for?