diff options
author | shimizukawa <shimizukawa@gmail.com> | 2013-12-15 16:04:23 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2013-12-15 16:04:23 +0900 |
commit | 8b375619a7a91d26f07f1ba944757700ae82827f (patch) | |
tree | 542c6d528412f9850fb8bd23fc77020d71af8309 | |
parent | 3a19adb976393dc4066def880d0db11e2f7378d7 (diff) | |
download | sphinx-8b375619a7a91d26f07f1ba944757700ae82827f.tar.gz |
Drop python-3.1 and remove support codes
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | doc/install.rst | 2 | ||||
-rw-r--r-- | doc/intro.rst | 2 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | sphinx/highlighting.py | 6 | ||||
-rw-r--r-- | sphinx/util/osutil.py | 2 | ||||
-rw-r--r-- | sphinx/util/pycompat.py | 4 | ||||
-rw-r--r-- | tests/test_intl.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
9 files changed, 10 insertions, 16 deletions
@@ -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 828dc3b4..bc969b0b 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 f0593cee..b2c25023 100644 --- a/doc/intro.rst +++ b/doc/intro.rst @@ -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. @@ -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'] diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 7a3927d3..807a1826 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 e8655fe1..d2f8679e 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 68e6d8fb..a0e09965 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 c241c0ae..0119d677 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 @@ -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= |