Drop python-3.1 and remove support codes

This commit is contained in:
Takayuki Shimizukawa 2013-12-15 16:04:23 +09:00
parent a8fc938d1b
commit f7cb510ebd
9 changed files with 10 additions and 16 deletions

View File

@ -4,7 +4,7 @@ Release 1.3 (in development)
Change support versions Change support versions
----------------------- -----------------------
* Drop Python-2.5. (support code was completely removed) * Drop Python-2.5, 3.1 (support code was completely removed)

View File

@ -80,7 +80,7 @@ sidebar and under "Quick Links", click "Windows Installer" to download.
.. note:: .. note::
Currently, Python offers two major versions, 2.x and 3.x. Sphinx 1.3 can run 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. 2.7. This chapter assumes you have installed Python 2.7.
Follow the Windows installer for Python. Follow the Windows installer for Python.

View File

@ -50,7 +50,7 @@ See the :ref:`pertinent section in the FAQ list <usingwith>`.
Prerequisites 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 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 or some (not broken) SVN trunk snapshot. If you like to have source code
highlighting support, you must also install the Pygments_ library. highlighting support, you must also install the Pygments_ library.

View File

@ -44,8 +44,8 @@ A development egg can be found `here
<http://bitbucket.org/birkenfeld/sphinx/get/tip.gz#egg=Sphinx-dev>`_. <http://bitbucket.org/birkenfeld/sphinx/get/tip.gz#egg=Sphinx-dev>`_.
''' '''
if sys.version_info < (2, 6): if sys.version_info < (2, 6) or (3, 0) <= sys.version_info < (3, 2):
print('ERROR: Sphinx requires at least Python 2.6 to run.') print('ERROR: Sphinx requires at least Python 2.6 or 3.2 to run.')
sys.exit(1) sys.exit(1)
requires = ['Pygments>=1.2', 'docutils>=0.7'] requires = ['Pygments>=1.2', 'docutils>=0.7']

View File

@ -133,12 +133,6 @@ class PygmentsBridge(object):
# just replace all non-ASCII characters. # just replace all non-ASCII characters.
src = src.encode('ascii', 'replace') 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: if parser is None:
return True return True

View File

@ -70,7 +70,7 @@ def ensuredir(path):
# TODO: This function can be removed because this function is same as os.walk # 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 # HOWEVER, this function is customized to check UnicodeError that obstacle to
# replace the function with the os.walk. # replace the function with the os.walk.
def walk(top, topdown=True, followlinks=False): def walk(top, topdown=True, followlinks=False):

View File

@ -75,8 +75,8 @@ def execfile_(filepath, _globals):
finally: finally:
f.close() f.close()
# py26,py31 accept only LF eol instead of CRLF # py26 accept only LF eol instead of CRLF
if sys.version_info[:2] in ((2, 6), (3, 1)): if sys.version_info[:2] == (2, 6):
source = source.replace(b('\r\n'), b('\n')) source = source.replace(b('\r\n'), b('\n'))
# compile to a code object, handle syntax errors # compile to a code object, handle syntax errors

View File

@ -73,7 +73,7 @@ def teardown_module():
def elem_gettexts(elem): def elem_gettexts(elem):
def itertext(self): def itertext(self):
# this function copied from Python-2.7 'ElementTree.itertext'. # 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 tag = self.tag
if not isinstance(tag, basestring) and tag is not None: if not isinstance(tag, basestring) and tag is not None:
return return

View File

@ -1,5 +1,5 @@
[tox] [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] [testenv]
deps= deps=