blob: eee2978be0550f723676098d7104bf890496f3b1 [file] [log] [blame]
Recent public API changes:
- Since 0.1.2b beta release: Factory now takes EncodingFinder and
ResponseTypeFinder class instances instead of functions (since
closures don't play well with module pickle).
- ClientCookie has been moved into the mechanize package and is no
longer a separate package. The ClientCookie interface is still
supported, but all names must be imported from module mechanize
instead of from module ClientCookie. Python 2.3 is now required. (I
have no plans to merge ClientForm with mechanize.) Note that the
logging work-alike facility is gone, and the base logger has been
renamed from "ClientCookie" to "mechanize". Also, the experimental
BSDDB support is now only included as example code, and not
installed, and the VERSION attribute has been removed (mechanize
still has its __version__ attribute).
- pullparser has been moved into the mechanize package and is no
longer a separate package. Also, the interface of pullparser is no
longer supported. Instead, it's just a purely internal
implementation detail of mechanize.
- Removed mechanize.Browser.set_seekable_responses() (they're always
seekable anyway).
- Some mechanize.Browser constructor args have been moved to
mechanize.Factory (default_encoding, ...).
- .get_links_iter() is gone (use .links() instead).
- .forms() and .links() now both return iterators (in fact, generators),
not sequences (not really an interface change: these were always
documented to return iterables, but it will no doubt break some client
code). Use e.g. list(browser.forms()) if you want a list.
- .links no longer raises LinkNotFoundError (was accidental -- only
.click_link() / .find_link() should raise this).
- Rename set_credentials --> set_password_manager (and add some new
methods to improve auth and proxy support).
- Added response.get_data() and .set_data() methods, and make responses
copy.copy()able. Browser has a .set_response() method. responses
returned by the Browser are now copies, which means that other code
altering headers and data and calling .seek() won't mess up your copy of
a response.
- mechanize.Factory has changed completely, to make it easier to avoid
re-parsing (principally: add .set_response() method and make
factory methods take no args)
- mechanize.Browser.default_encoding is gone.
- mechanize.Browser.set_seekable_responses() is gone (they're always
.seek()able). Browser and UserAgent now both inherit from
mechanize.UserAgentBase, and UserAgent is now there only to add the
single method .set_seekable_responses().
- Added Browser.encoding().
- Factory() takes an i_want_broken_xhtml_support argument, as a stop
gap until I actually make a proper job of it. Without a true value
for that argument, mechanize is ignorant of XML/XHTML.
- _authen handler name renamed --> _basicauth