diff --git a/CHANGES b/CHANGES index 3b6c88881..df139ef00 100644 --- a/CHANGES +++ b/CHANGES @@ -4,7 +4,7 @@ Release 1.3 (in development) Change support versions ----------------------- -* Drop Python-2.5. (support code was completely removed) +* Drop Python-2.5, 3.1 (support code was completely removed) diff --git a/doc/install.rst b/doc/install.rst index 828dc3b43..bc969b0be 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -80,7 +80,7 @@ sidebar and under "Quick Links", click "Windows Installer" to download. .. note:: Currently, Python offers two major versions, 2.x and 3.x. Sphinx 1.3 can run - under Python 2.6, 2.7 and 3.1 to 3.3, with the recommended version being + under Python 2.6, 2.7, 3.2, 3.3, with the recommended version being 2.7. This chapter assumes you have installed Python 2.7. Follow the Windows installer for Python. diff --git a/doc/intro.rst b/doc/intro.rst index f0593cee2..b2c25023e 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -50,7 +50,7 @@ See the :ref:`pertinent section in the FAQ list `. Prerequisites ------------- -Sphinx needs at least **Python 2.6** or **Python 3.1** to run, as well as the +Sphinx needs at least **Python 2.6** or **Python 3.2** to run, as well as the docutils_ and Jinja2_ libraries. Sphinx should work with docutils version 0.7 or some (not broken) SVN trunk snapshot. If you like to have source code highlighting support, you must also install the Pygments_ library. diff --git a/setup.py b/setup.py index 543a319d2..53a4c04b2 100644 --- a/setup.py +++ b/setup.py @@ -44,8 +44,8 @@ A development egg can be found `here `_. ''' -if sys.version_info < (2, 6): - print('ERROR: Sphinx requires at least Python 2.6 to run.') +if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 2): + print('ERROR: Sphinx requires at least Python 2.6 or 3.2 to run.') sys.exit(1) requires = ['Pygments>=1.2', 'docutils>=0.7'] diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 7a3927d31..807a18261 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -133,12 +133,6 @@ class PygmentsBridge(object): # just replace all non-ASCII characters. src = src.encode('ascii', 'replace') - if (3, 0) <= sys.version_info < (3, 2): - # Python 3.1 can't process '\r' as linesep. - # `parser.suite("print('hello')\r\n")` cause error. - if '\r\n' in src: - src = src.replace('\r\n', '\n') - if parser is None: return True diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index e8655fe1f..d2f8679ed 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -70,7 +70,7 @@ def ensuredir(path): # TODO: This function can be removed because this function is same as os.walk -# of Python2.6, 2.7, 3.1, 3.2, 3.3. +# of Python2.6, 2.7, 3.2, 3.3. # HOWEVER, this function is customized to check UnicodeError that obstacle to # replace the function with the os.walk. def walk(top, topdown=True, followlinks=False): diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 68e6d8fbc..a0e099659 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -75,8 +75,8 @@ def execfile_(filepath, _globals): finally: f.close() - # py26,py31 accept only LF eol instead of CRLF - if sys.version_info[:2] in ((2, 6), (3, 1)): + # py26 accept only LF eol instead of CRLF + if sys.version_info[:2] == (2, 6): source = source.replace(b('\r\n'), b('\n')) # compile to a code object, handle syntax errors diff --git a/tests/test_intl.py b/tests/test_intl.py index c241c0aed..0119d677f 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -73,7 +73,7 @@ def teardown_module(): def elem_gettexts(elem): def itertext(self): # this function copied from Python-2.7 'ElementTree.itertext'. - # for compatibility to Python-2.6, 3.1 + # for compatibility to Python-2.6 tag = self.tag if not isinstance(tag, basestring) and tag is not None: return diff --git a/tox.ini b/tox.ini index b03cc9e0a..006819ef5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py26,py27,py31,py32,py33,pypy,du11,du10,du09,du08,du07 +envlist=py26,py27,py32,py33,pypy,du11,du10,du09,du08,du07 [testenv] deps=