This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Use current mechanize and wsgi_intercept #3
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Conflicts: setup.py
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please have a look at my branch which addresses several issues I've had
using it with current versions of mechanize and wsgi_intercept.