Mechanize

Latest version: v0.4.10

Safety actively analyzes 630169 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

0.1.6b

* Add mechanize.ParseError class, document it as part of the
mechanize.Factory interface, and raise it from all Factory
implementations. This is backwards-compatible, since the new
exception derives from the old exceptions.
* Bug fix: Truncation when there is no full .read() before
navigating to the next page, and an old response is read after
navigation. This happened e.g. with r = br.open();
r.readline(); br.open(url); r.read(); br.back() .
* Bug fix: when .back() caused a reload, it was returning the old
response, not the .reload()ed one.
* Bug fix: .back() was not returning a copy of the response, which
presumably would cause seek position problems.
* Bug fix: base tag without href attribute would override document
URL with a None value, causing a crash (thanks Nathan Eror).
* Fix .set_response() to close current response first.
* Fix non-idempotent behaviour of Factory.forms() / .links() .
Previously, if for example you got a ParseError during execution
of .forms(), you could call it again and have it not raise an
exception, because it started out where it left off!
* Add a missing copy.copy() to RobustFactory .
* Fix redirection to 'URIs' that contain characters that are not
allowed in URIs (thanks Riko Wichmann). Also, Request
constructor now logs a module logging warning about any such bad
URIs.
* Add .global_form() method to Browser to support form controls
whose HTML elements are not descendants of any FORM element.
* Add a new method .visit_response() . This creates a new history
entry from a response object, rather than just changing the
current visited response. This is useful e.g. when you want to
use Browser features in a handler.
* Misc minor bug fixes.

2006-10-25 John J Lee <jjlpobox.com>

0.1.5b

ClientForm>=0.2.5 (for an important bug fix affecting fragments
in URLs). There are no other changes in this release -- this
release was done purely so that people upgrading to the latest
version of mechanize will get the latest ClientForm too.

2006-10-14 John J Lee <jjlpobox.com>

0.1.4b

reasons)
* Improved auth & proxies support.
* Follow RFC 3986.
* Add a .set_cookie() method to Browser .
* Add Browser.open_novisit() and Request.visit to allow fetching
files without affecting Browser state.
* UserAgent and Browser are now subclasses of UserAgentBase.
UserAgent's only role in life above what UserAgentBase does is
to provide the .set_seekable_responses() method (it lives there
because Browser depends on seekable responses, because that's
how browser history is implemented).
* Bundle BeautifulSoup 2.1.1. No more dependency pain! Note that
BeautifulSoup is, and always was, optional, and that mechanize
will eventually switch to BeautifulSoup version 3, at which
point it may well stop bundling BeautifulSoup. Note also that
the module is only used internally, and is not available as a
public attribute of the package. If you dare, you can import it
("from mechanize import _beautifulsoup"), but beware that it
will go away later, and that the API of BeautifulSoup will
change when the upgrade to 3 happens. Also, BeautifulSoup
support (mainly RobustFactory) is still a little experimental
and buggy.
* Fix HTTP-EQUIV with no content attribute case (thanks Pratik
Dam).
* Fix bug with quoted META Refresh URL (thanks Nilton Volpato).
* Fix crash with </base> tag (yajdbgr02...).
* Somebody found a server that (incorrectly) depends on HTTP
header case, so follow the Title-Case convention. Note that the
Request headers interface(s), which were (somewhat oddly -- this
is an inheritance from urllib2 that should really be fixed in a
better way than it is currently) always case-sensitive still
are; the only thing that changed is what actually eventually
gets sent over the wire.
* Use mechanize (not urllib) to open robots.txt. Don't consult
RobotFileParser instance about non-HTTP URLs.
* Fix OpenerDirector.retrieve(), which was very broken (thanks
Duncan Booth).
* Crash in a much more obvious way if trying to use OpenerDirector
after .close() .
* .reload() on .back() if necessary (necessary iff response was
not fully .read() on first .open()ing ) * Strip fragments before
retrieving URLs (fixed Request.get_selector() to strip fragment)
* Fix catching HTTPError subclasses while still preserving all
their response behaviour
* Correct over-enthusiastic documented guarantees of
closeable_response .
* Fix assumption that httplib.HTTPMessage treats dict-style
__setitem__ as append rather than set (where on earth did I get
that from?).
* Expose History in mechanize/__init__.py (though interface is
still experimental).
* Lots of other "internals" bugs fixed (thanks to reports /
patches from Benji York especially, also Titus Brown, Duncan
Booth, and me ;-), where I'm not 100% sure exactly when they
were introduced, so not listing them here in detail.
* Numerous other minor fixes.
* Some code cleanup.

2006-05-21 John J Lee <jjlpobox.com>

0.1.2b

* mechanize now exports the whole urllib2 interface.
* Pull in bugfixed auth/proxy support code from Python 2.5.
* Bugfix: strip leading and trailing whitespace from link URLs
* Fix .any_response() / .any_request() methods to have ordering.
consistent with rest of handlers rather than coming before all
of them.
* Tell cookie-handling code about new TLDs.
* Remove Browser.set_seekable_responses() (they always are
anyway).
* Show in web page examples how to munge responses and how to do
proxy/auth.
* Rename 0.1.* changes document 0.1.0-changes.txt -->
0.1-changes.txt.
* In 0.1 changes document, note change of logger name from
"ClientCookie" to "mechanize"
* Add something about response objects to changes document
* Improve Browser.__str__
* Accept regexp strings as well as regexp objects when finding
links.
* Add crappy gzip transfer encoding support. This is off by
default and warns if you turn it on (hopefully will get better
later :-).
* A bit of internal cleanup following merge with pullparser /
ClientCookie.

2006-05-06 John J Lee <jjlpobox.com>

0.1.1a

* Merge ClientCookie and pullparser with mechanize.
* Response object fixes.
* Remove accidental dependency on BeautifulSoup introduced in
0.1.0a (the BeautifulSoup support is still here, but
BeautifulSoup is not required to use mechanize).

2006-05-03 John J Lee <jjlpobox.com>

0.1.0a

* Stop trying to record precise dates in changelog, since that's
silly ;-)
* A fair number of interface changes: see 0.1.0-changes.txt.
* Depend on recent ClientCookie with copy.copy()able response
objects.
* Don't do broken XHTML handling by default (need to review code
before switching this back on, e.g. should use a real XML parser
for first-try at parsing). To get the old behaviour, pass
i_want_broken_xhtml_support=True to mechanize.DefaultFactory /
.RobustFactory constructor.
* Numerous small bug fixes.
* Documentation & setup.py fixes.
* Don't use cookielib, to avoid having to work around Python 2.4
RFC 2109 bug, and to avoid my braindead thread synchronisation
code in cookielib :-((((( (I haven't encountered specific
breakage due to latter, but since it's braindead I may as well
avoid it).

2005-11-30 John J Lee <jjlpobox.com>
* Fixed setuptools support.
* Release 0.0.11a.

2005-11-19 John J Lee <jjlpobox.com>
* Release 0.0.10a.

2005-11-17 John J Lee <jjlpobox.com>
* Fix set_handle_referer.

2005-11-12 John J Lee <jjlpobox.com>
* Fix history (Gary Poster).
* Close responses on reload (Gary Poster).
* Don't depend on SSL support (Gary Poster).

2005-10-31 John J Lee <jjlpobox.com>
* Add setuptools support.

2005-10-30 John J Lee <jjlpobox.com>
* Don't mask AttributeError exception messages from ClientForm.
* Document intent of .links() vs. .get_links_iter(); Rename
LinksFactory method.
* Remove pullparser import dependency.
* Remove Browser.urltags (now an argument to LinksFactory).
* Document Browser constructor as taking keyword args only (and
change positional arg spec).
* Cleanup of lazy parsing (may fix bugs, not sure...).

2005-10-28 John J Lee <jjlpobox.com>
* Support ClientForm backwards_compat switch.

2005-08-28 John J Lee <jjlpobox.com>
* Apply optimisation patch (Stephan Richter).

2005-08-15 John J Lee <jjlpobox.com>
* Close responses (ie. close the file handles but leave response
still .read()able &c., thanks to the response objects we're
using) (aurelnexedi.com).

2005-08-14 John J Lee <jjlpobox.com>
* Add missing argument to UserAgent's _add_referer_header stub.
* Doc and comment improvements.

2005-06-28 John J Lee <jjlpobox.com>
* Allow specifying parser class for equiv handling.
* Ensure correct default constructor args are passed to
HTTPRefererProcessor.
* Allow configuring details of Refresh handling.
* Switch to tolerant parser.

2005-06-11 John J Lee <jjlpobox.com>
* Do .seek(0) after link parsing in a finally block.
* Regard text/xhtml as HTML.
* Fix 2.4-compatibility bugs.
* Fix spelling of '_equiv' feature string.

2005-05-30 John J Lee <jjlpobox.com>
* Turn on Referer, Refresh and HTTP-Equiv handling by default.

2005-05-08 John J Lee <jjlpobox.com>
* Fix .reload() to not update history (thanks to Titus Brown).
* Use cookielib where available

2005-03-01 John J Lee <jjlpobox.com>
* Fix referer bugs: Don't send URL fragments; Don't add in Referer
header in redirected request unless original request had a
Referer header.

2005-02-19 John J Lee <jjlpobox.com>
* Allow supplying own mechanize.FormsFactory, so eg. can use
ClientForm.XHTMLFormParser. Also allow supplying own Request
class, and use sensible defaults for this. Now depends on
ClientForm 0.1.17. Side effect is that, since we use the
correct Request class by default, there's (I hope) no need for
using RequestUpgradeProcessor in Browser._add_referer_header()
:-)

2005-01-30 John J Lee <jjlpobox.com>
* Released 0.0.9a.

2005-01-05 John J Lee <jjlpobox.com>
* Fix examples (scraped sites have changed).
* Fix .set_*() method boolean arguments.
* The .response attribute is now a method, .response()
* Don't depend on BaseProcessor (no longer exists).

2004-05-18 John J Lee <jjlpobox.com>

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.