From: david-sarah Date: Sat, 5 Jun 2010 03:17:13 +0000 (-0700) Subject: Raise Python version requirement to 2.4.4 for non-UCS-2 builds, to avoid a critical... X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/?a=commitdiff_plain;h=529add7774a10c9c83ea242666cb61e282730e07;p=tahoe-lafs%2Ftahoe-lafs.git Raise Python version requirement to 2.4.4 for non-UCS-2 builds, to avoid a critical Python security bug. --- diff --git a/NEWS b/NEWS index 867fdd6d..158eaa4e 100644 --- a/NEWS +++ b/NEWS @@ -18,8 +18,15 @@ instance UTF-8. In such case, you'll need to fix your system with tools such as 'convmv' before using Tahoe CLI. All CLI commands have been improved to support non-ASCII parameters such as -filenames and aliases on all supported Operating Systems except Windows as of -now. +filenames and aliases on all supported Operating Systems. + +** dependency updates + + no python-2.4.2 or 2.4.3 (2.4.4 is ok) + pycrypto-2.0.1 + pyasn1-0.0.8a + mock + * Release 1.6.1 (2010-02-27) diff --git a/_auto_deps.py b/_auto_deps.py index df4ec478..dfa8d7b3 100644 --- a/_auto_deps.py +++ b/_auto_deps.py @@ -65,18 +65,19 @@ if sys.version_info < (2, 5): if hasattr(sys, 'frozen'): # for py2exe install_requires=[] -def require_python_2_with_working_base64(): +def require_python_version(): import sys - if sys.version_info[0] != 2: - raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.2 or greater (but less than v3), not %r" % (sys.version_info,)) - # make sure we have a working base64.b32decode. The one in - # python2.4.[01] was broken. - nodeid_b32 = 't5g7egomnnktbpydbuijt6zgtmw4oqi5' - import base64 - nodeid = base64.b32decode(nodeid_b32.upper()) - if nodeid != "\x9fM\xf2\x19\xcckU0\xbf\x03\r\x10\x99\xfb&\x9b-\xc7A\x1d": - raise NotImplementedError("There is a bug in this base64 module: %r. This was a known issue in Python v2.4.0 and v2.4.1 (http://bugs.python.org/issue1171487 ). Tahoe-LAFS current requires Python v2.4.2 or greater (but less than v3). The current Python version is %r" % (base64, sys.version_info,)) + # we require 2.4.4 on non-UCS-2 builds to avoid + # we require at least 2.4.2 in any case to avoid a bug in the base64 module: + if sys.maxunicode == 65535: + if sys.version_info < (2, 4, 2) or sys.version_info[0] > 2: + raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.2 or greater for a UCS-2 build (but less than v3), not %r" % + (sys.version_info,)) + else: + if sys.version_info < (2, 4, 4) or sys.version_info[0] > 2: + raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.4 or greater for a non-UCS-2 build (but less than v3), not %r" % + (sys.version_info,)) def require_auto_deps(): """ @@ -86,7 +87,7 @@ def require_auto_deps(): of these packages and gets an ImportError. This function gets called from src/allmydata/__init__.py . """ - require_python_2_with_working_base64() + require_python_version() import pkg_resources for requirement in install_requires: diff --git a/docs/quickstart.html b/docs/quickstart.html index a32dbb73..953a9f73 100644 --- a/docs/quickstart.html +++ b/docs/quickstart.html @@ -18,7 +18,7 @@

Install Python

-

Check if you already have an adequate version of Python installed by running python -V. Python v2.4 (v2.4.2 or greater), Python v2.5 or Python v2.6 will work. Python v3 does not work. If you don't have one of these versions of Python installed, then follow the instructions on the Python download page to download and install Python v2.5. Make sure that the path to the installation directory has no spaces in it (e.g. on Windows, do not install Python in the "Program Files" directory).

+

Check if you already have an adequate version of Python installed by running python -V. Python v2.4 (v2.4.4 or greater), Python v2.5 or Python v2.6 will work. Python v3 does not work. If you don't have one of these versions of Python installed, then follow the instructions on the Python download page to download and install Python v2.5. Make sure that the path to the installation directory has no spaces in it (e.g. on Windows, do not install Python in the "Program Files" directory).

If you are on Windows, you now must manually install the pywin32 package from the pywin32 site before getting Tahoe-LAFS. Make sure to get the correct file for the version of Python you are using — e.g. ending in "py2.5.exe" for Python 2.5. If using 64-bit Windows, the file should have "win-amd64" in its name.

Get Tahoe-LAFS