Skip to content
Browse files

Indicate Python 2.7 is supported

also fix a doctest for 2.7 and update release.py
  • Loading branch information...
1 parent ea93e57 commit 17887acfc455e13699c6957fee6955f55b3b4517 @jjlee committed
Showing with 19 additions and 11 deletions.
  1. +3 −3 INSTALL.txt
  2. +1 −1 docs/documentation.txt
  3. +1 −1 docs/faq.txt
  4. +1 −1 mechanize/_http.py
  5. +12 −5 release.py
  6. +1 −0 setup.py
View
6 INSTALL.txt
@@ -9,11 +9,11 @@ To install the package, run the following command:
Alternatively, just copy the whole mechanize directory into a directory on
-your Python path (e.g. unix: /usr/local/lib/python2.6/site-packages,
-Windows: C:\Python26\Lib\site-packages). Only copy the mechanize directory
+your Python path (e.g. unix: /usr/local/lib/python2.7/site-packages,
+Windows: C:\Python27\Lib\site-packages). Only copy the mechanize directory
that's inside the distributed tarball / zip archive, not the entire
mechanize-x.x.x directory!
John J. Lee <jjl@pobox.com>
-May 2010
+July 2010
View
2 docs/documentation.txt
@@ -54,7 +54,7 @@ ClientForm, `cookielib` and `urllib2`, and which to use when. If you're just
using mechanize, and not any of those other libraries, you can ignore this
section.
- #. mechanize works with Python 2.4, Python 2.5, and Python 2.6.
+ #. mechanize works with Python 2.4, Python 2.5, Python 2.6, and Python 2.7.
#. When using mechanize, anything you would normally import from `urllib2`
should be imported from `mechanize` instead.
View
2 docs/faq.txt
@@ -5,7 +5,7 @@
* <span class="q">Which version of Python do I need?</span>
- Python 2.4, 2.5 or 2.6. Python 3 is not yet supported.
+ Python 2.4, 2.5, 2.6, or 2.7. Python 3 is not yet supported.
* <span class="q">Does mechanize depend on BeautifulSoup?</span>
View
2 mechanize/_http.py
@@ -373,7 +373,7 @@ def parse_refresh_header(refresh):
(1.0, 'http://example.com/')
>>> parse_refresh_header("1")
(1.0, None)
- >>> parse_refresh_header("blah")
+ >>> parse_refresh_header("blah") # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ValueError: invalid literal for float(): blah
View
17 release.py
@@ -380,6 +380,7 @@ def add_dependency(package_name, ppa=None):
# add_dependency("python2.4"),
# add_dependency("python2.5")
add_dependency("python2.6")
+ #add_dependency("python2.7")
add_dependency("python-setuptools")
add_dependency("git-core")
# for running zope_testbrowser tests
@@ -398,7 +399,8 @@ def add_dependency(package_name, ppa=None):
# for the validate command
add_dependency("wdg-html-validator")
# for collecting code coverage data and generating coverage reports
- add_dependency("python-figleaf", ppa="jjl/figleaf")
+ # no 64 bit .deb ATM
+ #add_dependency("python-figleaf", ppa="jjl/figleaf")
# for css validator
add_dependency("default-jre")
@@ -494,6 +496,11 @@ def _make_tarball_easy_install_test_step(self, env, *args, **kwds):
@action_tree.action_node
def test(self):
r = []
+ r.append(("python27_test",
+ self._make_test_step(self._in_repo, python_version=(2, 7))))
+ r.append(("python27_easy_install_test",
+ self._make_source_dist_easy_install_test_step(
+ self._in_repo, python_version=(2, 7))))
r.append(("python26_test",
self._make_test_step(self._in_repo, python_version=(2, 6))))
# disabled for the moment -- think I probably built the launchpad .deb
@@ -501,9 +508,6 @@ def test(self):
# r.append(("python26_coverage",
# self._make_test_step(self._in_repo, python_version=(2, 6),
# coverage=True)))
- r.append(("python26_easy_install_test",
- self._make_source_dist_easy_install_test_step(
- self._in_repo, python_version=(2, 6))))
r.append(("python25_easy_install_test",
self._make_source_dist_easy_install_test_step(
self._in_repo, python_version=(2, 5))))
@@ -772,6 +776,9 @@ def fetch_zope_testbrowser(self, log):
project_dir = os.path.join(self._zope_testbrowser_dir,
"zope.testbrowser")
in_project_dir = release.CwdEnv(self._env, project_dir)
+ # TODO: If anything else depends on a specific version of mechanize
+ # this won't work. Assert that importing mechanize yields expected
+ # version.
in_project_dir.cmd(
["sed", "-i", "-e", "s/mechanize[^\"']*/mechanize/", "setup.py"])
in_project_dir.cmd(["bin/easy_install", "zc.buildout"])
@@ -854,7 +861,7 @@ def write_email(self, log):
About mechanize
=============================================
-Requires Python 2.4, 2.5, or 2.6.
+Requires Python 2.4, 2.5, 2.6, or 2.7.
Stateful programmatic web browsing, after Andy Lester's Perl module
View
1 setup.py
@@ -40,6 +40,7 @@
Programming Language :: Python :: 2.4
Programming Language :: Python :: 2.5
Programming Language :: Python :: 2.6
+Programming Language :: Python :: 2.7
Topic :: Internet
Topic :: Internet :: File Transfer Protocol (FTP)
Topic :: Internet :: WWW/HTTP

0 comments on commit 17887ac

Please sign in to comment.
Something went wrong with that request. Please try again.