Merge pull request #5342 from tk0miya/drop_py2_support

Update requirements and dependencies for Sphinx-2.0
This commit is contained in:
Takeshi KOMIYA
2018-09-05 22:55:07 +09:00
committed by GitHub
7 changed files with 20 additions and 39 deletions

View File

@@ -5,8 +5,6 @@ environment:
PYTHONWARNINGS: all PYTHONWARNINGS: all
matrix: matrix:
- PYTHON: 27
TEST_IGNORE: --ignore py35
- PYTHON: 37 - PYTHON: 37
- PYTHON: 37-x64 - PYTHON: 37-x64

View File

@@ -11,16 +11,9 @@ env:
matrix: matrix:
include: include:
- python: 'pypy' - python: '3.5'
env: TOXENV=pypy
- python: '2.7'
env: env:
- TOXENV=du13 - TOXENV=du13
- PYTEST_ADDOPTS="--cov ./ --cov-append --cov-config setup.cfg"
- python: '3.4'
env: TOXENV=py34
- python: '3.5'
env: TOXENV=py35
- python: '3.6' - python: '3.6'
env: env:
- TOXENV=py36 - TOXENV=py36

View File

@@ -4,9 +4,14 @@ Release 2.0.0 (in development)
Dependencies Dependencies
------------ ------------
* LaTeX builder now depends on TeX Live 2015 or above
Incompatible changes Incompatible changes
-------------------- --------------------
* Drop python 2.7 and 3.4 support
* Drop docutils 0.11 support
Deprecated Deprecated
---------- ----------

View File

@@ -165,16 +165,17 @@ The builder's "name" must be given to the **-b** command-line option of
* ``texlive-fonts-recommended`` * ``texlive-fonts-recommended``
* ``texlive-latex-extra`` * ``texlive-latex-extra``
* ``latexmk`` (for ``make latexpdf`` on GNU/Linux and MacOS X) * ``latexmk`` (for ``make latexpdf`` on GNU/Linux and MacOS X)
* ``latex-xcolor`` (old Ubuntu)
* ``texlive-luatex``, ``texlive-xetex`` (see :confval:`latex_engine`) * ``texlive-luatex``, ``texlive-xetex`` (see :confval:`latex_engine`)
The testing of Sphinx LaTeX is done on Ubuntu trusty with the above The testing of Sphinx LaTeX is done on Ubuntu xenial with the above mentioned
mentioned packages, which are from a TeXLive 2013 snapshot dated packages, which are from a TeXLive 2015 snapshot dated March 2016.
February 2014.
.. versionchanged:: 1.6 .. versionchanged:: 1.6
Formerly, testing had been done on Ubuntu precise (TeXLive 2009). Formerly, testing had been done on Ubuntu precise (TeXLive 2009).
.. versionchanged:: 2.0
Formerly, testing had been done on Ubuntu trusty (TeXLive 2013).
.. note:: .. note::
Since 1.6, ``make latexpdf`` uses ``latexmk`` (not on Windows). This Since 1.6, ``make latexpdf`` uses ``latexmk`` (not on Windows). This

View File

@@ -11,15 +11,15 @@ import sphinx
with open('README.rst') as f: with open('README.rst') as f:
long_desc = f.read() long_desc = f.read()
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 4): if sys.version_info < (3, 5):
print('ERROR: Sphinx requires at least Python 2.7 or 3.4 to run.') print('ERROR: Sphinx requires at least Python 3.5 to run.')
sys.exit(1) sys.exit(1)
install_requires = [ install_requires = [
'six>=1.5', 'six>=1.5',
'Jinja2>=2.3', 'Jinja2>=2.3',
'Pygments>=2.0', 'Pygments>=2.0',
'docutils>=0.11', 'docutils>=0.12',
'snowballstemmer>=1.1', 'snowballstemmer>=1.1',
'babel>=1.3,!=2.0', 'babel>=1.3,!=2.0',
'alabaster>=0.7,<0.8', 'alabaster>=0.7,<0.8',
@@ -35,9 +35,6 @@ extras_require = {
':sys_platform=="win32"': [ ':sys_platform=="win32"': [
'colorama>=0.3.5', 'colorama>=0.3.5',
], ],
':python_version<"3.5"': [
'typing'
],
'websupport': [ 'websupport': [
'sqlalchemy>=0.9', 'sqlalchemy>=0.9',
'whoosh>=2.0', 'whoosh>=2.0',
@@ -49,11 +46,6 @@ extras_require = {
'html5lib', 'html5lib',
'flake8>=3.5.0', 'flake8>=3.5.0',
'flake8-import-order', 'flake8-import-order',
],
'test:python_version<"3"': [
'enum34',
],
'test:python_version>="3"': [
'mypy', 'mypy',
'typed_ast', 'typed_ast',
], ],
@@ -195,12 +187,11 @@ setup(
'License :: OSI Approved :: BSD License', 'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy', 'Programming Language :: Python :: Implementation :: PyPy',
'Framework :: Setuptools Plugin', 'Framework :: Setuptools Plugin',
@@ -235,7 +226,7 @@ setup(
'build_sphinx = sphinx.setup_command:BuildDoc', 'build_sphinx = sphinx.setup_command:BuildDoc',
], ],
}, },
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", python_requires=">=3.5",
install_requires=install_requires, install_requires=install_requires,
extras_require=extras_require, extras_require=extras_require,
cmdclass=cmdclass, cmdclass=cmdclass,

View File

@@ -11,12 +11,10 @@
from docutils import nodes from docutils import nodes
from docutils.writers.manpage import ( from docutils.writers.manpage import (
MACRO_DEF,
Writer, Writer,
Translator as BaseTranslator Translator as BaseTranslator
) )
import sphinx.util.docutils
from sphinx import addnodes from sphinx import addnodes
from sphinx.locale import admonitionlabels, _ from sphinx.locale import admonitionlabels, _
from sphinx.util import logging from sphinx.util import logging
@@ -111,10 +109,6 @@ class ManualPageTranslator(BaseTranslator):
self._docinfo['version'] = builder.config.version self._docinfo['version'] = builder.config.version
self._docinfo['manual_group'] = builder.config.project self._docinfo['manual_group'] = builder.config.project
# In docutils < 0.11 self.append_header() was never called
if sphinx.util.docutils.__version_info__ < (0, 11):
self.body.append(MACRO_DEF)
# Overwrite admonition label translations with our own # Overwrite admonition label translations with our own
for label, translation in admonitionlabels.items(): for label, translation in admonitionlabels.items():
self.language.labels[label] = self.deunicode(translation) self.language.labels[label] = self.deunicode(translation)

View File

@@ -1,14 +1,14 @@
[tox] [tox]
minversion = 2.0 minversion = 2.0
envlist = docs,flake8,mypy,coverage,py{27,34,35,36,37,38,py},du{11,12,13,14} envlist = docs,flake8,mypy,coverage,py{35,36,37,38,py},du{12,13,14}
[testenv] [testenv]
usedevelop = True usedevelop = True
passenv = passenv =
https_proxy http_proxy no_proxy PERL PERL5LIB PYTEST_ADDOPTS EPUBCHECK_PATH https_proxy http_proxy no_proxy PERL PERL5LIB PYTEST_ADDOPTS EPUBCHECK_PATH
description = description =
py{27,34,35,36,37,38,py}: Run unit tests against {envname}. py{35,36,37,38,py}: Run unit tests against {envname}.
du{11,12,13,14}: Run unit tests with the given version of docutils. du{12,13,14}: Run unit tests with the given version of docutils.
# TODO(stephenfin) Replace this with the 'extras' config option when tox 2.4 is # TODO(stephenfin) Replace this with the 'extras' config option when tox 2.4 is
# widely available, likely some time after the Ubuntu 18.04 release # widely available, likely some time after the Ubuntu 18.04 release
@@ -16,7 +16,6 @@ description =
# https://tox.readthedocs.io/en/latest/config.html#confval-extras=MULTI-LINE-LIST # https://tox.readthedocs.io/en/latest/config.html#confval-extras=MULTI-LINE-LIST
deps = deps =
.[test,websupport] .[test,websupport]
du11: docutils==0.11
du12: docutils==0.12 du12: docutils==0.12
du13: docutils==0.13.1 du13: docutils==0.13.1
du14: docutils==0.14 du14: docutils==0.14