mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Drop python-3.1 and remove support codes
This commit is contained in:
parent
a8fc938d1b
commit
f7cb510ebd
2
CHANGES
2
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)
|
||||
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -50,7 +50,7 @@ See the :ref:`pertinent section in the FAQ list <usingwith>`.
|
||||
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.
|
||||
|
4
setup.py
4
setup.py
@ -44,8 +44,8 @@ A development egg can be found `here
|
||||
<http://bitbucket.org/birkenfeld/sphinx/get/tip.gz#egg=Sphinx-dev>`_.
|
||||
'''
|
||||
|
||||
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']
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user