Commit Graph

164 Commits

Author SHA1 Message Date
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