--- python-mechanize-0.1.11.orig/debian/pyversions +++ python-mechanize-0.1.11/debian/pyversions @@ -0,0 +1 @@ +2.5- --- python-mechanize-0.1.11.orig/debian/docs +++ python-mechanize-0.1.11/debian/docs @@ -0,0 +1,6 @@ +PKG-INFO +GeneralFAQ.html +README.html +README.txt +doc.html +0.1-changes.txt --- python-mechanize-0.1.11.orig/debian/examples +++ python-mechanize-0.1.11/debian/examples @@ -0,0 +1,2 @@ +examples/* +functional_tests.py --- python-mechanize-0.1.11.orig/debian/control +++ python-mechanize-0.1.11/debian/control @@ -0,0 +1,33 @@ +Source: python-mechanize +Section: python +Priority: extra +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Debian/Ubuntu Zope Team +Uploaders: Brian Sutherland , Fabio Tranchitella , Jérémy Bobbio +Build-Depends-Indep: python-all-dev (>= 2.3.5-9), python-central (>= 0.5) +Build-Depends: debhelper (>= 5.0.37.2), python-setuptools (>= 0.6b3), dpatch, python-support (>= 0.5.3) +Standards-Version: 3.8.0 +XS-Python-Version: all +XS-Vcs-Svn: svn://svn.debian.org/pkg-zope/python-mechanize/trunk + +Package: python-mechanize +Architecture: all +Depends: ${python:Depends}, python-clientform (>= 0.2.6) +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Conflicts: python2.3-mechanize (<< 0.0.11a-3), python2.4-mechanize (<< 0.0.11a-3) +Replaces: python2.3-mechanize (<< 0.0.11a-3), python2.4-mechanize (<< 0.0.11a-3) +Description: stateful programmatic web browsing + A library for browsing the web in python. Mechanize acts like a browser + allowing you to do web scraping, functional testing of web sites and + things no one has thought of yet. + . + Among other things, mechanize: + * Follows links + * Fills in HTML forms + * Automatically observes robots.txt + * Has a browser history + . + It was modelled after the Perl module WWW::Mechanize. + . + Homepage: http://wwwsearch.sourceforge.net/mechanize/ --- python-mechanize-0.1.11.orig/debian/copyright +++ python-mechanize-0.1.11/debian/copyright @@ -0,0 +1,59 @@ +Packaging +========= + +This package was debianized by Brian Sutherland on +Sat, 6 Aug 2005 15:32:13 +0200. + +Source +====== + +It was downloaded from: http://wwwsearch.sourceforge.net/mechanize/ + +Copyright +========= + + 2003-2004 John J. Lee + 2003 Andy Lester (original Perl code) + +Upstream Author +=============== + + John J. Lee + +License +======= + +The software is licensed under a variant of the BSD licence, the text of which +is reproduced below: + +Copyright (c) 2002-2004 John J. Lee +Copyright (c) 2003 Andy Lester + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +Neither the name of the contributors nor the names of their employers +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- python-mechanize-0.1.11.orig/debian/watch +++ python-mechanize-0.1.11/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://wwwsearch.sourceforge.net/mechanize/src/mechanize-(.*)\.tar.gz --- python-mechanize-0.1.11.orig/debian/changelog +++ python-mechanize-0.1.11/debian/changelog @@ -0,0 +1,206 @@ +python-mechanize (0.1.11-0ubuntu1) jaunty; urgency=low + + * New upstream release (LP: #337918) + - debian/patches/drop-Gopher.dpatch: + * removed, fixed upstream + - Fix quadratic performance in number of .read() calls (and add an + automated performance test). + - Add support for Python 2.6: Raise URLError on file: URL errors, + not IOError (port of upstream urllib2 fix). Add support for + Python 2.6's per-connection timeouts: Add timeout arguments to + urlopen(), Request constructor, .open(), and .open_novisit(). + - Drop support for Python 2.3 + - Add Content-length header to Request object (httplib bug that + prevented doing that was fixed in Python 2.4). There's no + change is what is actually sent over the wire here, just in what + headers get added to the Request object. + - Fix AttributeError on .retrieve() with a Request (as opposed to + URL string) argument + - Don't change CookieJar state in .make_cookies(). + - Fix AttributeError in case where .make_cookies() or + .cookies_for_request() is called before other methods like + .extract_cookies() or .make_cookie_header() + - Fixes affecting version cookie-attribute + (http://bugs.python.org/issue3924). + - Silence module logging's "no handlers could be found for logger + mechanize" warning in a way that doesn't clobber attempts to set + log level sometimes + - Don't use private attribute of request in request upgrade + handler (what was I thinking??) + - Don't call setup() on import of setup.py + - Add new public function effective_request_host + - Add .get_policy() method to CookieJar + - Add method CookieJar.cookies_for_request() + - Fix documented interface required of requests and responses (and + add some tests for this!) + - Allow either .is_unverifiable() or .unverifiable on request + objects (preferring the former) + - Note that there's a new functional test for digest auth, which + fails when run against the sourceforge site (which is the + default). It looks like this reflects the fact that digest auth + has been fairly broken since it was introduced in urllib2. I + don't plan to fix this myself. + - Fix ImportError if sqlite3 not available + - Fix a couple of functional tests not to wait 5 seconds each + - Close sockets. This only affects Python 2.5 (and later) - + earlier versions of Python were unaffected. See + http://bugs.python.org/issue1627441 + - Make title parsing follow Firefox behaviour wrt child + elements (previously the behaviour differed between Factory and + RobustFactory). + - Fix BeautifulSoup RobustLinksFactory (hence RobustFactory) link + text parsing for case of link text containing tags (Titus Brown) + - Fix issue where more tags after caused default parser to + raise an exception + - Handle missing cookie max-age value. Previously, a warning was + emitted in this case. + - Fix thoroughly broken digest auth (still need functional + test!) (trebor74hr@...) + - Handle cookies containing embedded tabs in mozilla format files + - Remove an assertion about mozilla format cookies file + contents (raise LoadError instead) + - Fix MechanizeRobotFileParser.set_opener() + - Fix selection of global form using .select_form() (Titus Brown) + - Log skipped Refreshes + - Stop tests from clobbering files that happen to be lying around + in cwd (!) + - Use SO_REUSEADDR for local test server. + - Raise exception if local test server fails to start. + - Tests no longer (accidentally) depend on third-party coverage + module + - Add convenience method Browser.open_local_file(filename) + - Add experimental support for Firefox 3 cookie jars + ("cookies.sqlite"). Requires Python 2.5 + - Fix a _gzip.py NameError (gzip support is experimental) + * debian/rules: + - Use dh_pysupport instead of dh_pycentral to prevent trying to + install for python < 2.5 + + -- Ken VanDine <ken.vandine@canonical.com> Mon, 09 Mar 2009 16:26:36 -0400 + +python-mechanize (0.1.7b-3ubuntu1) jaunty; urgency=low + + * Add drop-Gopher.dpatch: Drop GopherError and GopherHandler, since + Python 2.6's version does not define that any more. (LP: #336225) + * debian/rules: Use glob instead of hardcoded site-packages/, python2.6 uses + dist-packages now. + * debian/rules: Supply --install-layout=deb. + + -- Martin Pitt <martin.pitt@ubuntu.com> Sun, 01 Mar 2009 18:17:43 +0100 + +python-mechanize (0.1.7b-3) unstable; urgency=low + + * Rebuild to move files into /usr/share/pyshared. Closes: #490495. + + -- Matthias Klose <doko@debian.org> Sat, 12 Jul 2008 13:33:14 +0200 + +python-mechanize (0.1.7b-2) unstable; urgency=low + + * debian/patches/mechanize_seek.dpatch: applied a patch from the twill + maintainer to add file.seek(0) because ``file'' position may not be at + the beginning; thanks Arnaud Fontaine. (Closes: #456944) + + -- Fabio Tranchitella <kobold@debian.org> Tue, 18 Dec 2007 19:15:17 +0100 + +python-mechanize (0.1.7b-1) unstable; urgency=low + + * New upstream release. (Closes: #446523) + * Ship functional tests in examples. (Closes: #449551) + + -- Fabio Tranchitella <kobold@debian.org> Tue, 18 Dec 2007 14:23:11 +0100 + +python-mechanize (0.1.6b-1) unstable; urgency=low + + * New upstream release. (Closes: #418457) + * Drop obsolete patch to mechanize/_html.py, mechanize/_util.py and + mechanize/_mechanize.py. + * Re-generate README.txt using "lynx -dump" as upstream forget to do it. + * Use dh_installexamples to install examples instead of dh_installdocs. + * Remove dh_python from debian/rules. + * Update python-clientform dependency. + * Update email address in Uploaders. + + -- Jérémy Bobbio <lunar@debian.org> Tue, 10 Apr 2007 01:34:43 +0200 + +python-mechanize (0.1.2b-2) unstable; urgency=low + + [ Brian Sutherland ] + * Remove unused python-clientcookie and python-pullparser dependencies + as they are included in this version. + * Add these files to installed documentation: + GeneralFAQ.html + README.html + README.txt + doc.html + 0.1-changes.txt + examples + + [ Jérémy Bobbio ] + * Move python-setuptools to Build-Depends. (Closes: #392628) + * Add XS-Vcs-Svn field to debian/control. + + -- Jérémy Bobbio <jeremy.bobbio@etu.upmc.fr> Sat, 14 Oct 2006 04:32:09 +0200 + +python-mechanize (0.1.2b-1) unstable; urgency=low + + * New upstream release, patched to be compatible with Zope 3.3.0. + + -- Fabio Tranchitella <kobold@debian.org> Fri, 29 Sep 2006 14:40:53 +0200 + +python-mechanize (0.0.11a-3) unstable; urgency=low + + * Update to new python policy using python-central (Closes: 373327) + * Revert debian specific patch and build with setuptools. + + -- Brian Sutherland <jinty@web.de> Wed, 14 Jun 2006 17:34:14 +0200 + +python-mechanize (0.0.11a-2) unstable; urgency=low + + [Brian Sutherland] + * New upstream version (closes: #334241). + * Added watch file. + * Upstream changed setup.py to use easy_setup: + - Remove the build deps clientform, clientcookie, pullparser. Hooray! + * Patch the setup.py to use distutils instead of setuptools. + (Temporary workaround until setuptools supports + --single-version-externally-managed.) + * Bump dependencies in to the ones mentioned in setup.py. + + -- Fabio Tranchitella <kobold@debian.org> Fri, 3 Feb 2006 10:58:35 +0000 + +python-mechanize (0.0.11a-1) unstable; urgency=low + + * New upstream release. + + -- Fabio Tranchitella <kobold@debian.org> Wed, 18 Jan 2006 15:37:33 +0000 + +python-mechanize (0.0.11a-1) unstable; urgency=low + + * New upstream version (closes: #334241). + * Added watch file. + * Upstream changed setup.py to use easy_setup: + - Remove the build deps clientform, clientcookie, pullparser. Hooray! + * Patch the setup.py to use distutils instead of setuptools. + (Temporary workaround until setuptools supports + --single-version-externally-managed.) + * Bump dependencies in to the ones mentioned in setup.py. + + -- Brian Sutherland <jinty@web.de> Fri, 30 Dec 2005 12:33:16 +0100 + +python-mechanize (0.0.9a-2) unstable; urgency=low + + * Build for python2.4 as well. + + -- Brian Sutherland <jinty@web.de> Tue, 27 Dec 2005 19:09:00 +0100 + +python-mechanize (0.0.9a-1) unstable; urgency=low + + * Initial packaging. + + -- Brian Sutherland <jinty@web.de> Mon, 24 Oct 2005 12:52:25 +0200 + +python-skeleton (0.0.0.0-1) unstable; urgency=low + + * Initial creation of skeleton python packaging dir. + + -- Brian Sutherland <jinty@web.de> Sat, 6 Aug 2005 02:14:33 +0100 --- python-mechanize-0.1.11.orig/debian/compat +++ python-mechanize-0.1.11/debian/compat @@ -0,0 +1 @@ +4 --- python-mechanize-0.1.11.orig/debian/rules +++ python-mechanize-0.1.11/debian/rules @@ -0,0 +1,79 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +PYVERS=$(shell pyversions -vr debian/control) +PYMOD=mechanize +PACKAGE=python-$(PYMOD) +DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog \ + | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1) + +include /usr/share/dpatch/dpatch.make + +.PHONY: patch-stamp +build: patch-stamp $(PYVERS:%=build-python%) + touch $@ +build-python%: + dh_testdir + python$* setup.py build + touch $@ + +.PHONY: clean unpatch +clean: unpatch + dh_testdir + dh_testroot + rm -f build-python?.? + rm -rf build + $(MAKE) -f debian/rules $(PYVERS:%=clean-python%) + find -name '*.pyc' -exec rm {} \; + dh_clean + +clean-python%: + python$* setup.py clean + +.PHONY: install +install: + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) -f debian/rules $(PYVERS:%=install-python%) + +install-python%: + python$* setup.py install --no-compile --install-layout=deb --single-version-externally-managed --root=debian/$(PACKAGE) + # Remove python and module version from .egg-info + echo python:Provides=$(foreach pv,$(shell pyversions -s),$(pv)-mechanize)|sed 's/ /, /g' >> debian/python-mechanize.substvars + (cd debian/$(PACKAGE)/usr/lib/python$*/*-packages/; \ + mv $(PYMOD)-$(DEB_UPSTREAM_VERSION)-py$*.egg-info $(PYMOD).egg-info) + +.PHONY: binary-common +binary-common: + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_pysupport + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: binary-indep +binary-indep: install + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +.PHONY: binary-arch +binary-arch: install + # no binary-arch packages to build + +.PHONY: binary +binary: binary-indep binary-arch --- python-mechanize-0.1.11.orig/debian/patches/00list +++ python-mechanize-0.1.11/debian/patches/00list @@ -0,0 +1 @@ +mechanize_seek --- python-mechanize-0.1.11.orig/debian/patches/DPATCH +++ python-mechanize-0.1.11/debian/patches/DPATCH @@ -0,0 +1,16 @@ +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 --- python-mechanize-0.1.11.orig/debian/patches/mechanize_seek.dpatch +++ python-mechanize-0.1.11/debian/patches/mechanize_seek.dpatch @@ -0,0 +1,15 @@ +#! /bin/sh -e + +. $(dirname $0)/DPATCH + +@DPATCH@ +--- mechanize-0.1.7b/mechanize/_html.py.old 2007-12-16 15:17:37.000000000 +0000 ++++ mechanize-0.1.7b/mechanize/_html.py 2007-12-16 15:17:47.000000000 +0000 +@@ -599,6 +599,7 @@ + Factory.set_response(self, response) + if response is not None: + data = response.read() ++ response.seek(0) + soup = self._soup_class(self.encoding, data) + self._forms_factory.set_response( + copy.copy(response), self.encoding) --- python-mechanize-0.1.11.orig/mechanize/_useragent.py +++ python-mechanize-0.1.11/mechanize/_useragent.py @@ -51,6 +51,7 @@ # CacheFTPHandler is buggy, at least in 2.3, so we don't use it "ftp": _urllib2.FTPHandler, "file": _urllib2.FileHandler, + "gopher": _urllib2.GopherHandler, # other handlers "_unknown": _urllib2.UnknownHandler, @@ -77,7 +78,7 @@ "_debug_response_body": _urllib2.HTTPResponseDebugProcessor, } - default_schemes = ["http", "ftp", "file"] + default_schemes = ["http", "ftp", "file", "gopher"] default_others = ["_unknown", "_http_error", "_http_request_upgrade", "_http_default_error", ] --- python-mechanize-0.1.11.orig/mechanize/__init__.py +++ python-mechanize-0.1.11/mechanize/__init__.py @@ -17,6 +17,8 @@ 'FileHandler', 'FormNotFoundError', 'FormsFactory', + 'GopherError', + 'GopherHandler', 'HTTPBasicAuthHandler', 'HTTPCookieProcessor', 'HTTPDefaultErrorHandler',