Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Use current mechanize and wsgi_intercept #3

Closed
wants to merge 19 commits into from

Conversation

JonathanRRogers
Copy link

Please have a look at my branch which addresses several issues I've had
using it with current versions of mechanize and wsgi_intercept.

Jonathan Ross Rogers and others added 19 commits October 5, 2011 11:35
Current mechanize exposes ClientForm functionality directly in mechanize.
Several tests look for mechanize to fail at parsing problematic HTML,
though it currently succeeds. Presumably, this is because mechanize
has improved and the tests are therefore no longer needed.
Since we're no longer using PatchedMechanizeBrowser to work around
deficiencies in mechanize.Browser, we can't use it insert
FixedHTTPBasicAuthHandler which checks Twill's
acknowledge_equiv_refresh internal option. Instead, when
acknowledge_equiv_refresh is set, we call the Mechanize.Browser
instance's set_handle_equiv() method. There is also no longer any need
to "upgrade" the request object in order to set a referer header.
The following HTML element previously caused a reload of "/login":

<meta http-equiv="refresh" content="0;'URL=/login'">

Currently, no reload happens, probably as a result of a change in
mechanize's behavior. However, it's not clear what the correct action
would be, if any. For example, Firefox attempts to reload
"/URL=/login", a non-existent page. Acceptable format for the content
attribute seems ill-specified at best.
It is no longer necessary to patch mechanize.Browser and
wsgi_intercept is handled differently, so this module goes away.
Import TwillException to twill.utils
tdivis pushed a commit to tdivis/twill that referenced this pull request Jul 28, 2016
Fix clearform to call lxml properly while clearing value of control
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants