Commit Graph

226 Commits

Author SHA1 Message Date
Takeshi KOMIYA
00a5aa7301 Add extra requirements for docs (refs: #6336) 2019-05-04 12:42:17 +09:00
Takeshi KOMIYA
ab95fa5ded Add long_description_content_type to package metadata 2019-03-10 18:57:50 +09:00
Takeshi KOMIYA
65970a3033 Fix #6140: Use unittest.mock instead of mock 2019-03-09 15:16:04 +09:00
Takeshi KOMIYA
1ca210aab1 Separate json and pickle to sphinxcontrib package 2019-02-17 22:31:50 +09:00
Takeshi KOMIYA
3b49f9fe3d Separate htmlhelp to sphinxcontrib package 2019-02-15 01:44:32 +09:00
Takeshi KOMIYA
c4397318d3 Separate applehelp to sphinxcontrib package 2019-02-06 00:44:37 +09:00
Takeshi KOMIYA
2bd69350a7 Separate devhelp to sphinxcontrib package 2019-01-20 03:03:50 +09:00
Takeshi KOMIYA
6be9d2a08e Separate qthelp to sphinxcontrib package 2019-01-19 16:34:06 +09:00
Takeshi KOMIYA
9c52b4ed6c Drop dependency: sphinxcontrib-websupport 2019-01-14 19:44:12 +09:00
Takeshi KOMIYA
20bf74c637 Separate jsmath to sphinxcontrib package 2019-01-13 14:07:12 +09:00
Jon Dufresne
5d497d0083 Remove redundant mypy config 'incremental'
The mypy config 'incremental` has defaulted as true since version 0.590.
Can drop the local override. For details, see:

6b13652a46
2019-01-06 06:58:26 -08:00
Jon Dufresne
6978918ffc Replace use of six.text_type with str
This removes the last use of the six package allowing Sphinx to remove
it as a dependency.
2018-12-18 16:23:10 -08:00
Takeshi KOMIYA
f596439a0f
Merge pull request #5786 from tk0miya/requests-2.5
Update deps: requests-2.5.0 or above
2018-12-18 23:12:19 +09:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
19a187cb54 Update deps: requests-2.5.0 or above 2018-12-16 21:28:02 +09:00
Takeshi KOMIYA
9dfc5e7efe Add docutils-stubs to test deps 2018-12-15 02:42:43 +09:00
Jon Dufresne
8bb73c9fd3 Simplify open() call by removing default mode
The open() function opens files in read-only text mode by default. Drop
the mode argument to be slightly simpler and more idiomatic.

https://docs.python.org/3/library/functions.html#open

> The default mode is 'r' (open for reading text, synonym of 'rt').
2018-12-11 06:50:20 -08:00
Jon Dufresne
3bc938ceba Drop explicit dependency: typed_ast
typed-ast has been a required dependency of mypy since v0.470. Can rely
on it being installed as a transient dependency and not list it
explicitly. For the change in mypy, see:

a207754a7e
2018-11-16 05:23:56 -08:00
Jon Dufresne
1ae049b2ee Always prefer dict literals over calls to dict()
Dict literals are always slightly faster and are idiomatic modern
Python.
2018-11-13 18:44:16 -08:00
Jon Dufresne
490e4aed41 Remove unnecessary object from class definitions
In Python 3, all classes are new-style classes. The object in the
definition is redundant and unnecessary.
2018-09-11 07:07:01 -07:00
Takeshi KOMIYA
aa3e590d5e
Merge pull request #5370 from tk0miya/drop_deprecated_methods
Drop APIs deprecated in 2.0
2018-09-05 22:56:02 +09:00
Takeshi KOMIYA
a7cab001d9 Drop APIs deprecated in 2.0 2018-09-03 00:31:33 +09:00
Takeshi KOMIYA
98a9b50c52 Drop docutils 0.11 support 2018-08-30 01:03:57 +09:00
Takeshi KOMIYA
9412bd76b7 Drop python 2.7 and 3.4 support 2018-08-30 01:03:57 +09:00
Jon Dufresne
365c93f227 Update all pypi.python.org URLs to pypi.org
For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html
2018-04-18 19:51:48 -07:00
Takeshi KOMIYA
af4647c492 Merge branch '1.7' 2018-04-14 15:43:38 +09:00
Takeshi KOMIYA
eef9d13999 Update package classifiers 2018-04-02 21:09:16 +09:00
Takeshi KOMIYA
4cebc4399c Merge commit '6694981dd6939ab876b27d4e20a8128561c307ac' 2018-03-15 02:02:21 +09:00
Jon Dufresne
78c1fde692 Pass python_requires argument to setuptools
Helps pip decide what version of the library to install.

https://packaging.python.org/tutorials/distributing-packages/#python-requires

> If your project only runs on certain Python versions, setting the
> python_requires argument to the appropriate PEP 440 version specifier
> string will prevent pip from installing the project on other Python
> versions.

https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords

> python_requires
>
> A string corresponding to a version specifier (as defined in PEP 440)
> for the Python version, used to specify the Requires-Python defined in
> PEP 345.
2018-03-13 08:44:22 -07:00
Takeshi KOMIYA
e2f481c956 Merge branch '1.7' 2018-03-03 20:03:45 +09:00
Dmitry Shachnev
28ad1c5847 Remove CompileGrammarCommand, it uses removed sphinx.pycode.pgen2 module 2018-03-01 18:33:42 +03:00
Takeshi KOMIYA
18bb86a27f Catch errors on compiling catalogs (refs: #4655) 2018-03-01 16:48:06 +09:00
Takeshi KOMIYA
4344fa149c
Merge pull request #4505 from tk0miya/use_flake8-import-order
Use flake8-import-order
2018-01-29 22:13:48 +09:00
Takeshi KOMIYA
6926a3ed91
Merge branch '1.7-release' into use_flake8-import-order 2018-01-28 19:03:31 +09:00
Takeshi KOMIYA
d60ef2d6b2 Fix utils package is installed 2018-01-28 15:11:59 +09:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Stephen Finucane
f3074d1747 setup: Configure flake8 extension as a local plugin
We don't want to install this as a system plugin. Now that flake8 3.5.0
is in the wild, we can use this.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: #4492
2018-01-26 09:41:50 +00:00
Takeshi KOMIYA
7ba54500fc Fix #4183: doctest: `:pyversion:` option also follows PEP-440 specification 2018-01-08 11:59:50 +09:00
Stephen Finucane
393f59da00 Improve README
We're going to be adding additional badges to this but, before we do
that, we should improve the README and remove a lot of the duplication
that has built up here.

The 'long_description' from 'setup.py' is moved into the README as there
is serious value in displaying this on GitHub, as much as there is value
in including the badges and other content from README.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-19 15:00:06 +00:00
Stephen Finucane
a102e8e29b setup.py: Include 'flake8' in 'test' requirements
We are using this in our testing and actually need it for the flake8
plugin, so include this in the list of 'test' requirements.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 19:44:05 +00:00
Stephen Finucane
a5ef67b96a setup: Install mock for Python 3 too
'mock' is part of the standard library in Python 3 since Python 3.3.
However, it's found in 'unittest.mock' - not 'mock'. We should install
the version for PyPi in all cases to minimize differences between the
two. When Python 2.7 support is dropped, we can consider switching to
the standard library version.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes #4284
2017-12-13 19:59:45 +00:00
Takeshi KOMIYA
cfa2eff733 Merge pull request #4120 from stephenfin/the-great-toxification-4
The great toxification (part 4)
2017-10-18 01:48:45 +09:00
Hugo
dd91df0be2 Update classifiers with supported versions 2017-10-11 17:16:15 +03:00
Stephen Finucane
eb8efce7d8 requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in
'setup.py' are installed, meaning 'test-reqs.txt' need only contain
those necessary for testing.

The only notable change is that the 'simplejson' module is dropped from
the requirements list. This included as a dependency for the PyPy
target, but it appears that this is not necessary today (though it may
have been when the target was added in 2011).

This retains 'setup.py test' which, as noted in the tox docs [1], is
sometimes expected for downstream distribution testing. We may wish to
find a way to synchronize requirements between 'test-reqs.txt' and this
section in the future, but that's work for another day.

[1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:06:10 +01:00
Stephen Finucane
dbd58d4c51 setup.py: Stop caring about pip 1.5.6
This version is silly old and anyone that's _still_ using this is not
going to be building Sphinx from source. Simply remove it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:03:48 +01:00
Stephen Finucane
f5c0d64658 utils: Move "header check" to a flake8 plugin
If we want to check style, we run 'tox -e flake8': it shouldn't be
necessary to run some obscure 'make' command too. Make this possible by
moving the sole useful test from the target of this make command to a
flake8 plugin.

This includes a fix for a header that was previously excluded from
checks, but is now included.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
1f5ed02225 sphinx-quickstart: Move code to 'sphinx.cmd'
We're going to move the executable's here (or at least those that part
of the core library). The 'sphinx-build' executable was already moved,
so lets do 'sphinx-quickstart' next.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:42:23 +01:00
Stephen Finucane
89f9c7cab7 sphinx-build: Move code out of 'sphinx.__init__'
We have multiple executables in tree and, while 'sphinx-build' is
arguably the most important of these, there's no reason its importance
should warrant inclusion at the package level.

Create a new module, 'sphinx.cmd', and move the code from
'sphinx.__init__' into a 'build' submodule within. This name might be a
bit disingenuous at present, given the availability of 'make-mode' here
too, but that's an artifact of the current executable design and can be
cleaned up later.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:39:31 +01:00
Stephen Finucane
96cf498c9e apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] https://github.com/sphinx-doc/sphinx/pull/3485#issuecomment-288081223
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-09-20 13:42:57 +01:00
Takeshi KOMIYA
2d9034d3af Fix flake8 violations 2017-05-26 00:42:28 +09:00
Takeshi KOMIYA
ca6a1edd2f Merge branch 'stable' 2017-05-26 00:15:00 +09:00
Takeshi KOMIYA
180d665b6c setup.py: Add requires for installation from tarball 2017-05-26 00:13:47 +09:00
Takeshi KOMIYA
13a383e061 Refactor setup.py 2017-05-26 00:12:45 +09:00
Julien Schueller
ee286e4f27 Do not require typing module for python>=3.5
pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by Sphinx
2017-05-26 00:11:06 +09:00
Julien Schueller
3ea4ed9cad Do not require typing module for python>=3.5
pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by Sphinx
2017-05-25 09:48:22 +02:00
Takeshi KOMIYA
0135948485 Fix #3683: sphinx.websupport module is not provided by default 2017-05-03 23:00:03 +09:00
Takeshi KOMIYA
370bdddc7c make websupport-dependency optional 2017-04-29 15:29:51 +09:00
Takeshi KOMIYA
fef9f870d4 Split websupport to sphinxcontrib-websupport package 2017-04-22 17:54:20 +09:00
Brecht Machiels
ce5799a37a Builder entry points require pkg_resources/setuptools 2017-04-10 13:08:33 +02:00
Alexander Shadchin
992a795907 Fix test depend 2017-02-26 15:31:21 +03:00
Takeshi KOMIYA
d33cf04979 Merge branch 'stable' 2017-01-29 18:05:17 +09:00
Takeshi KOMIYA
14a864a637 Support requests-2.0.0 (experimental) (refs: #3367) 2017-01-29 13:15:49 +09:00
Takeshi KOMIYA
5c72b8cf47 Merge branch 'stable' 2017-01-07 15:36:55 +09:00
Takeshi KOMIYA
70cdc7be8f Dependency requirement updates: requests 2.4.0 or above (refs: #3268, #3310) 2017-01-07 14:29:36 +09:00
shimizukawa
0a7d039df5 Merge branch '1.5-release' into master 2016-12-05 23:14:25 +09:00
shimizukawa
37a41be2a2 small fix in setup.py and release-checklist. 2016-12-04 22:03:25 +09:00
Takeshi KOMIYA
db732ac0b8 Prepare to type-check using mypy 2016-11-16 12:05:44 +09:00
Takeshi KOMIYA
3c3c8e7533 Fix flake8 violation 2016-11-16 12:02:40 +09:00
Takeshi KOMIYA
c147f6496e Fix #2919: Drop py26 support 2016-09-15 22:47:47 +09:00
Takeshi KOMIYA
1da1a71511 Drop python 3.3 support 2016-08-30 00:43:15 +09:00
Takeshi KOMIYA
184bedef4b Merge branch 'stable' 2016-08-20 18:06:33 +09:00
Takeshi KOMIYA
dbac9aa8ec Add compile_grammar command to setup.py (ref: #2765) 2016-08-19 20:16:02 +09:00
Julien Schueller
626be8b5f3 Require six 1.5 for html_parser 2016-08-18 09:34:43 +02:00
Takeshi KOMIYA
2ccb75c98f Bundle sphinx/pycode/Grammar-*.pickle (ref: #2765)
So far, sphinx generates the grammar files on demand.
It causes uninstallation does not remove whole of files.
With this fix, Sphinx bundles the files in the package.
2016-07-12 12:15:12 +09:00
Ville Skyttä
e8a8be5788 Handle more file closing with "with" 2016-07-07 18:53:34 +03:00
Avram Lubkin
76b92ad24f Use html5lib to parse HTML in tests instead of XMLParser 2016-05-28 02:51:21 -04:00
Takeshi KOMIYA
2578f47664 Merge branch 'stable' 2016-05-26 20:55:26 +09:00
Dmitry Shachnev
65638c12b8 Make our custom compile_catalog command work with Babel 2.3
In new Babel versions, self.domain is a list rather than a string.
2016-05-17 15:43:59 +03:00
Darragh Bailey
0b9ee8d451 Switch to using requests for better charset detection
Python requests does a better job of detecting the charsets of
webpages, performing automatic decoding when the text content is
requested, avoiding issues around needing to do detection.

This allows checking the following urls & anchors correctly:

    http://www.yaml.org/spec/1.2/spec.html#id2761803
    http://www.yaml.org/spec/1.2/spec.html#id2765878
    http://www.yaml.org/spec/1.2/spec.html#id2765878
2016-04-21 13:20:02 +01:00
Alex Gaynor
7b759b1db7 Removed ez_setup.py
There are no common cases where it will be used anymore:

* pip always installs stuff with setuptools
* Modern pythons preinstall setuptools
2016-02-13 10:14:16 -05:00
Takeshi KOMIYA
fd674ef9f9 Fix #2199: Use `imagesize` package to obtain size of images 2016-02-10 00:46:22 +09:00
Takayuki SHIMIZUKAWA
4391521b81 Merge pull request #2087 from cppformat/optional-rtd
refs #2087, #2086, #1845, #2097: Make sphinx_rtd_theme optional
2016-01-15 11:55:09 +09:00
Takeshi KOMIYA
e4b9eb51f6 Merge branch 'stable' 2016-01-11 00:27:26 +09:00
shimizukawa
dc0873adf6 Fix #1820: On Windows, console coloring is broken with colorama version 0.3.3. Now sphinx use colorama>=0.3.5 to avoid this problem. 2016-01-06 07:27:34 +09:00
vitaut
12dde8afdb Make sphinx_rtd_theme optional 2015-10-16 06:58:12 -07:00
Takayuki SHIMIZUKAWA
a7723ff6f4 Merge pull request #2009 from ProgVal/determinism
Make files generation at install deterministic
2015-09-13 12:39:28 +09:00
Anthony Johnson
8cf1612e37 Tune sphinx_rtd_theme version
With some recent changes that are slightly backwards compatible, we were going
to bump the version of the RTD theme. We wanted to drop the current version
pattern for the semver scheme, but Sphinx's requirement on the RTD theme is
pinned at >=0.1,<0.2. For now, we're stuck releasing on the current scheme.

This relaxes the versioning requirement for the theme, with 2.0 being the
following release that could contain backwards incompatible API changes. We'd
likely wait to bump to 1.0 until the next Sphinx release, as to not break
experience for users.

Refs snide/sphinx_rtd_theme#244
2015-09-13 10:08:00 +09:00
Takayuki SHIMIZUKAWA
bf795b9000 Merge pull request #2031 from agjohnson/rtd-theme-version
Tune sphinx_rtd_theme version
2015-09-13 10:00:16 +09:00
shimizukawa
6bce0a1c10 Avoid "2.0" version of Babel because it doesn't work with Windows environment. Closes #1976.
see also:
* https://github.com/mitsuhiko/babel/issues/174
* https://github.com/mitsuhiko/babel/pull/188

Version spec syntax "babel>=1.3,!=2.0" is following PEP440: https://www.python.org/dev/peps/pep-0440/#version-exclusion and it works with pip 6.0 or later (I didn't check before pip 6.0).
2015-09-13 09:40:14 +09:00
Anthony Johnson
e6ddd326d1 Tune sphinx_rtd_theme version
With some recent changes that are slightly backwards compatible, we were going
to bump the version of the RTD theme. We wanted to drop the current version
pattern for the semver scheme, but Sphinx's requirement on the RTD theme is
pinned at >=0.1,<0.2. For now, we're stuck releasing on the current scheme.

This relaxes the versioning requirement for the theme, with 2.0 being the
following release that could contain backwards incompatible API changes. We'd
likely wait to bump to 1.0 until the next Sphinx release, as to not break
experience for users.

Refs snide/sphinx_rtd_theme#244
2015-09-09 11:38:03 -07:00
Valentin Lorentz
a9323e6f59 Make Javascript locale deterministic. 2015-08-19 20:38:23 +02:00
Takayuki SHIMIZUKAWA
b557b5665c Merge pull request #1759 from bitprophet/patch-1
Version-lock unlocked dependencies
2015-03-09 10:52:17 +09:00
Georg Brandl
548a6dc22e final pep8 fixes; reactivate most warnings in flake8 2015-03-08 17:15:54 +01:00
Jeff Forcier
2f76149acf Version-lock unlocked dependencies
As the author of one of the new theme dependencies (`alabaster`), having a wholly unqualified requirement scared me a bit re: ability to make non-bugfix releases without downstream users' sites changing underneath them in unexpected (visual) ways without them consciously upgrading Sphinx versions.

`alabaster` uses semantic versioning so the lock reflects this.

For consistency, I also updated the other new theme dependency similarly, and made `babel` match its fellow non-theme dependencies in having an optimistic (vs semantic) version lock, but I can revert these changes if desired.
2015-03-07 07:35:04 -08:00
shimizukawa
bc6df36d37 add extras_require for websupport and test. 2015-03-07 16:53:32 +09:00
shimizukawa
cdc4f5d8bb fix http/https 2015-02-28 01:10:03 +09:00
shimizukawa
68021b0bd3 refs #1346. Add new default theme.
- Rename 'default' theme to 'classic'.
  - rename `themes/default` to `themes/classic`
  - add new `themes/default` theme that derives from 'classic' theme for compatibility.
- setup.py depends to 'alabaster' and 'rtd' theme.
- theming.py import and run `alabaster.get_path()` to append path for alabaster theme.
- theming.py also import and run `sphinx_rtd_theme.get_html_theme_path()` to append path.
- sphinx-quickstart will generate `html_theme = 'alabaster'`.
- If user use 'default', sphinx emit notice (WARNING) suggestion to use 'alabaster' or use 'classic'.
- add documentation for new alabaster and readthedoc theme and link to original pages:
  - https://pypi.python.org/pypi/alabaster
  - https://pypi.python.org/pypi/sphinx_rtd_theme
2015-02-24 01:01:54 +09:00
shimizukawa
a9c1ab9828 Merge branch 'stable'
Conflicts:
	setup.py
2015-01-06 22:26:56 +09:00
shimizukawa
ddb7c9945d Exclude 'tests' instead of 'test'. Sphinx-1.2.3 wheel package includes 'tests' directory. It might be happen by this wrong parameter. 2015-01-06 22:23:05 +09:00
Georg Brandl
fadfa5ecf7 Require newer docutils and Pygments. 2015-01-01 19:02:19 +01:00