The demise of Python 2.7 is not far off and we intend to drop support
for it in Sphinx 2.0. As a result, there probably isn't a better time
than now to start testing with Python 3 by default. There are a couple
of advantages to this:
- flake8 is stricter under Python 3 and we don't need to ignore files
with Python 3 syntax
- We get to dogfood Sphinx against its own documentation using Python 3
- pylint gains support for Python 3 syntax
Signed-off-by: Stephen Finucane <stephen@that.guru>
distutils/__init__.py:4: DeprecationWarning: the imp module is
deprecated in favour of importlib; see the module's documentation
for alternative uses
import imp
Signed-off-by: Stephen Finucane <stephen@that.guru>
Given that we install Sphinx as part of the dependencies, there's no
reason to do it twice. Skip that step.
Signed-off-by: Stephen Finucane <stephen@that.guru>
There's an issue with 'pkgutils' and namespace packages. This has been
reported against setuptools [1], but until this is resolved, we simply
need to live with it. Ensure said warnings are filtered from tox too and
remove some unnecessary ones.
[1] https://github.com/pypa/setuptools/issues/1111
Signed-off-by: Stephen Finucane <stephen@that.guru>
This is no longer necessary. One test needs to be modified to deal with
how 'python -m pytest' modifies the PATH.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Run 'coverage report' after a successful coverage run. There's enough
coverage-related stuff here at this point to warrant its own section.
Signed-off-by: Stephen Finucane <stephen@that.guru>
This necessitates adding some basic coverage-py configuration [1] and
making sure the pytest-cov plugin uses said configuration [2]. Badges
are included.
Note that we do not run the 'coverage' tox target, which is reserved for
users.
[1] https://github.com/codecov/example-python
[2] https://bitbucket.org/ned/coveragepy/issues/512/
Signed-off-by: Stephen Finucane <stephen@that.guru>
Enabling coverage results in an increase in runtime, and while this may
be an acceptable compromise for some developers, it's not necessarily
something we need to run all the time. Move it to a separate target so
it can be run only by those who wish to use it.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Per the pytest docs [1], this is the preferred way to ignore tests. This
necessitates removing the 'test-async' target as it no longer makes any
sense.
[1] https://docs.pytest.org/en/latest/example/pythoncollection.html
Signed-off-by: Stephen Finucane <stephen@that.guru>
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>
We were never really using this file for its specified purpose [1]. Now
that we have everything cleanly organized in 'setup.py', there really
isn't any reason to keep it around. Remove it.
[1] https://caremad.io/posts/2013/07/setup-vs-requirement/
Signed-off-by: Stephen Finucane <stephen@that.guru>
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>
As I've previously discovered [1], this doesn't actually do anything in
modern tox. Simply remove it.
[1] https://review.openstack.org/#/c/369986/
Signed-off-by: Stephen Finucane <stephen@that.guru>
Turns out this requires Python 3.2 at a minimum. Who knew? We don't
support Python 3.1 so simply fix to 'python3'.
Signed-off-by: Stephen Finucane <stephen@that.guru>
There is value in examining coverage for something like Sphinx. Start
doing this by default, in anticipation of increasing coverage over time.
Signed-off-by: Stephen Finucane <stephen@that.guru>
This isn't enabled by default because it throws so many damn errors.
Perhaps we should simply remove this?
Signed-off-by: Stephen Finucane <stephen@that.guru>
Now websupport modules has separated and move into
sphinxcontrib-websupport package. They are also tested in the
package. Hence, we should test the bridge code for them.
Like the recently added 'docs' target, this is easier than creating a
virtualenv, installing deps and running make.
Signed-off-by: Stephen Finucane <stephen@that.guru>
This is easier than creating a virtualenv, installing deps and running
make. It also makes explicit use of the setuptool integration that is
now documented.
Signed-off-by: Stephen Finucane <stephen@that.guru>