[wwwsearch-commits] r26640 - in
wwwsearch/mechanize/branch/mechanize-0.1.0-devel: . mechanize
jjlee at codespeak.net
jjlee at codespeak.net
Tue May 2 02:04:26 CEST 2006
Author: jjlee
Date: Tue May 2 02:04:24 2006
New Revision: 26640
Modified:
wwwsearch/mechanize/branch/mechanize-0.1.0-devel/0.1.0-changes.txt
wwwsearch/mechanize/branch/mechanize-0.1.0-devel/mechanize/_useragent.py
Log:
Rename credentials--> password_manager
Modified: wwwsearch/mechanize/branch/mechanize-0.1.0-devel/0.1.0-changes.txt
==============================================================================
--- wwwsearch/mechanize/branch/mechanize-0.1.0-devel/0.1.0-changes.txt (original)
+++ wwwsearch/mechanize/branch/mechanize-0.1.0-devel/0.1.0-changes.txt Tue May 2 02:04:24 2006
@@ -25,6 +25,9 @@
- _authen handler name renamed --> _basicauth
+- Rename set_credentials --> set_password_manager (and add some new
+ methods)
+
Changed in SVN fairly recently (since last mechanize release):
- Browser.encoding() now takes no parameters
Modified: wwwsearch/mechanize/branch/mechanize-0.1.0-devel/mechanize/_useragent.py
==============================================================================
--- wwwsearch/mechanize/branch/mechanize-0.1.0-devel/mechanize/_useragent.py (original)
+++ wwwsearch/mechanize/branch/mechanize-0.1.0-devel/mechanize/_useragent.py Tue May 2 02:04:24 2006
@@ -172,8 +172,8 @@
if ("_proxy_basicauth" in ua_handlers or
"_proxy_digestauth" in ua_handlers):
ppm = HTTPProxyPasswordMgr()
- self.set_credentials(pm)
- self.set_proxy_credentials(ppm)
+ self.set_password_manager(pm)
+ self.set_proxy_password_manager(ppm)
# special case, requires extra support from mechanize.Browser
self._handle_referer = True
@@ -238,22 +238,23 @@
self._set_handler("_proxy", obj=proxies)
def add_password(self, url, user, password, realm=None):
- self._credentials.add_password(realm, url, user, password)
+ self._password_manager.add_password(realm, url, user, password)
def add_proxy_password(self, user, password, hostport=None, realm=None):
- self._proxy_credentials.add_password(realm, hostport, user, password)
+ self._proxy_password_manager.add_password(
+ realm, hostport, user, password)
# the following are rarely useful -- use add_password / add_proxy_password
# instead
- def set_credentials(self, credentials):
+ def set_password_manager(self, password_manager):
"""Set a urllib2.HTTPPasswordMgrWithDefaultRealm, or None."""
- self._credentials = credentials
- self._set_handler("_basicauth", obj=credentials)
- self._set_handler("_digestauth", obj=credentials)
- def set_proxy_credentials(self, credentials):
+ self._password_manager = password_manager
+ self._set_handler("_basicauth", obj=password_manager)
+ self._set_handler("_digestauth", obj=password_manager)
+ def set_proxy_password_manager(self, password_manager):
"""Set a mechanize.HTTPProxyPasswordMgr, or None."""
- self._proxy_credentials = credentials
- self._set_handler("_proxy_basicauth", obj=credentials)
- self._set_handler("_proxy_digestauth", obj=credentials)
+ self._proxy_password_manager = password_manager
+ self._set_handler("_proxy_basicauth", obj=password_manager)
+ self._set_handler("_proxy_digestauth", obj=password_manager)
# these methods all take a boolean parameter
def set_handle_robots(self, handle):
More information about the wwwsearch-commits
mailing list