Skip to content

Commit ff7143e

Browse files
authored
Spring cleaning (#788)
closes #797 closes #798 closes #799 closes #800 closes #801 closes #754 Also (no extra issues for that): removed all experimental markers from docstrings (most of them have been there for a few years already). If they turn out wrong/bad, we just have to deprecate them and remove them in a major release hookimpl is instantiated twice - mark one of them as deprecated and get rid of it later moved hookimpl to __init__.py - having a hookimpl object in the hookspecs module is unnecessary and confusing. Access to hookimpl should happen as module attribute of tox (clearer where it comes from) - also kept a deprecated reference there for compatibilty. removed some redundant rst references in hookspecs. If they are initialized once in any namespace they are defined globally (I don't like it either but that is how it works in restructuredText and ignoring that and defining the same things several times is confusing) move _dummy object to only class where it is needed and name it like the constant that it is use six for py2/3 compatibility where noticed it and where it is cheap to do remove dead code move exception related code into its own module rather than having it hang around in a class looking like a module in __init__.py there is no need to have an intermediate run_main - that is used everywhere only under the name tox.cmdline rename function and use it directly, just like client code is using it add a fixture for working in a clean tmpdir
1 parent c33fb2d commit ff7143e

40 files changed

+1087
-1397
lines changed

.pre-commit-config.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ repos:
77
- id: check-yaml
88
- id: debug-statements
99
- id: flake8
10-
- repo: https://github.com/asottile/reorder_python_imports
11-
sha: v0.3.5
12-
hooks:
13-
- id: reorder-python-imports
14-
language_version: python3.6
1510
- repo: https://github.com/asottile/pyupgrade
1611
sha: v1.2.0
1712
hooks:

CHANGELOG.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on Github:
1818
- `2.8 series of releases <https://github.com/tox-dev/tox/projects/6>`_
1919

2020
..
21-
Everything below here is generated by `towncrier <https://pypi.python.org/pypi/towncrier>`_.
21+
Everything below here is generated by `towncrier <https://pypi.org/project/towncrier>`_.
2222
It is generated once as part of the release process rendering fragments from the `changelog`
2323
folder. If necessary, the generated text can be edited afterwards to e.g. merge rc changes
2424
into the final release notes.
@@ -781,7 +781,7 @@ Improved Documentation
781781
location ({envtmpdir}/pseudo-home). If an index url was specified
782782
a .pydistutils.cfg file will be written with an index_url setting
783783
so that packages defining ``setup_requires`` dependencies will not
784-
silently use your HOME-directory settings or https://pypi.python.org/pypi.
784+
silently use your HOME-directory settings or PyPi.
785785

786786
- fix `#1 <https://github.com/tox-dev/tox/issues/1>`_: empty setup files are properly detected, thanks Anthon van
787787
der Neuth

HOWTORELEASE.rst

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ If you want to use the scripts in `task/` you need a `.pypirc` with a correctly
3838
.. code-block:: ini
3939
4040
[pypi]
41-
;repository=https://pypi.python.org/pypi
4241
;repository=https://upload.pypi.io/legacy/
4342
username=<your username>
4443
password=<your password>

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ include setup.py
66
include tox.ini
77
graft doc
88
graft tests
9+
10+
global-exclude __pycache__
11+
global-exclude *.py[cod]

changelog/754.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
filter out unwanted files in package - by @obestwalter

changelog/797.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend the plugin documentation and make lot of small fixes and improvements - by @obestwalter

changelog/798.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
introduce a constants module to be used internally and as experimental API - by @obestwalter

changelog/799.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tidy up tests - remove unused fixtures, update old cinstructs, etc. - by @obestwalter

changelog/800.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
make the already existing implicit API explicit - by @obestwalter

changelog/801.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
improve tox quickstart and corresponding tests - @obestwalter

changelog/examples.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
.. examples for changelog entries adding to your Pull Requests
2+
3+
file ``544.doc.rst``::
4+
5+
explain everything much better - by @passionate_technicalwriter
6+
17
file ``544.feature.rst``::
28

3-
``tox --version`` now shows information about all registered plugins - by @obestwalter.
9+
``tox --version`` now shows information about all registered plugins - by @obestwalter
410

511

612
file ``571.bugfix.rst``::
713

814
``skip_install`` overrides ``usedevelop`` (``usedevelop`` is an option to choose the
915
installation type if the package is installed and `skip_install` determines if it should be
10-
installed at all) - by @ferdonline.
16+
installed at all) - by @ferdonline
17+
18+
.. see tox/pyproject.toml for all available categories

doc/example/basic.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ configuration:
8888
/bin/bash
8989
9090
91-
.. _virtualenv: https://pypi.python.org/pypi/virtualenv
91+
.. _virtualenv: https://pypi.org/project/virtualenv
9292

9393
.. _multiindex:
9494

@@ -175,8 +175,8 @@ like this:
175175

176176
.. code-block:: shell
177177
178-
tox -i DEV=http://pypi.python.org/simple # changes :DEV: package URLs
179-
tox -i http://pypi.python.org/simple # changes default
178+
tox -i DEV=http://pypi.org/simple # changes :DEV: package URLs
179+
tox -i http://pypi.org/simple # changes default
180180
181181
further customizing installation
182182
---------------------------------

doc/example/pytest.rst

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ It is easy to integrate `pytest`_ runs with tox. If you encounter
55
issues, please check if they are `listed as a known issue`_ and/or use
66
the :doc:`support channels <../support>`.
77

8-
.. _`pytest`: https://docs.pytest.org/en/latest/
9-
108
Basic example
119
--------------------------
1210

doc/example/unittest.rst

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ unittest2, discover and tox
44
Running unittests with 'discover'
55
------------------------------------------
66

7-
.. _Pygments: https://pypi.python.org/pypi/Pygments
8-
97
The discover_ project allows to discover and run unittests
108
and we can easily integrate it in a ``tox`` run. As an example,
11-
perform a checkout of Pygments_:
9+
perform a checkout of `Pygments <https://pypi.org/project/Pygments>`_:
1210

1311
.. code-block:: shell
1412
@@ -34,7 +32,6 @@ Running unittest2 and sphinx tests in one go
3432
-----------------------------------------------------
3533

3634
.. _`Michael Foord`: http://www.voidspace.org.uk/
37-
.. _tox.ini: https://github.com/testing-cabal/mock/blob/master/tox.ini
3835

3936
`Michael Foord`_ has contributed a ``tox.ini`` file that
4037
allows you to run all tests for his mock_ project,
@@ -45,7 +42,8 @@ its repository with:
4542
4643
git clone https://github.com/testing-cabal/mock.git
4744
48-
the checkout has a tox.ini_ that looks like this:
45+
The checkout has a `tox.ini file <https://github.com/testing-cabal/mock/blob/master/tox.ini>`_
46+
that looks like this:
4947

5048
.. code-block:: ini
5149

doc/index.rst

+7-9
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ right next to your ``setup.py`` file::
3333
# content of: tox.ini , put in same dir as setup.py
3434
[tox]
3535
envlist = py27,py36
36+
3637
[testenv]
37-
deps=pytest # install pytest in the venvs
38-
commands=pytest # or 'nosetests' or ...
38+
deps = pytest # install pytest in the virtualenv where commands will be executed
39+
commands =
40+
# whatever extra steps before testing might be necessary
41+
pytest # or any other test runner that you might use
3942

4043
You can also try generating a ``tox.ini`` file automatically, by running
4144
``tox-quickstart`` and then answering a few simple questions.
@@ -63,13 +66,12 @@ Current features
6366

6467
- test-tool agnostic: runs pytest, nose or unittests in a uniform manner
6568

66-
* :doc:`(new in 2.0) plugin system <plugins>` to modify tox execution with simple hooks.
69+
* :doc:`plugin system <plugins>` to modify tox execution with simple hooks.
6770

6871
* uses pip_ and setuptools_ by default. Support for configuring the installer command
6972
through :confval:`install_command=ARGV`.
7073

71-
* **cross-Python compatible**: CPython-2.7, 3.4 and higher,
72-
Jython and pypy_.
74+
* **cross-Python compatible**: CPython-2.7, 3.4 and higher, Jython and pypy_.
7375

7476
* **cross-platform**: Windows and Unix style environments
7577

@@ -92,10 +94,6 @@ Current features
9294
* supports :ref:`using different / multiple PyPI index servers <multiindex>`
9395

9496

95-
.. _pypy: http://pypy.org
96-
97-
.. _`tox.ini`: :doc:configfile
98-
9997
.. toctree::
10098
:hidden:
10199

doc/links.rst

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
1+
.. _`Cookiecutter`: https://cookiecutter.readthedocs.io
2+
.. _`pluggy`: https://pluggy.readthedocs.io
3+
.. _`cookiecutter-tox-plugin`: https://github.com/tox-dev/cookiecutter-tox-plugin
24
.. _devpi: http://doc.devpi.net
35
.. _Python: http://www.python.org
4-
.. _virtualenv: https://pypi.python.org/pypi/virtualenv
5-
.. _virtualenv3: https://pypi.python.org/pypi/virtualenv3
6-
.. _virtualenv5: https://pypi.python.org/pypi/virtualenv5
7-
.. _`py.test`: http://pytest.org
6+
.. _virtualenv: https://pypi.org/project/virtualenv
7+
.. _`pytest`: https://pytest.org
88
.. _nosetests:
9-
.. _`nose`: https://pypi.python.org/pypi/nose
9+
.. _`nose`: https://pypi.org/project/nose
1010
.. _`Holger Krekel`: https://twitter.com/hpk42
11-
.. _`pytest-xdist`: https://pypi.python.org/pypi/pytest-xdist
11+
.. _`pytest-xdist`: https://pypi.org/project/pytest-xdist
1212

1313
.. _`easy_install`: http://peak.telecommunity.com/DevCenter/EasyInstall
14-
.. _pip: https://pypi.python.org/pypi/pip
15-
.. _setuptools: https://pypi.python.org/pypi/setuptools
14+
.. _pip: https://pypi.org/project/pip
15+
.. _setuptools: https://pypi.org/project/setuptools
1616
.. _`jenkins`: https://jenkins.io/index.html
17-
.. _sphinx: https://pypi.python.org/pypi/Sphinx
18-
.. _discover: https://pypi.python.org/pypi/discover
19-
.. _unittest2: https://pypi.python.org/pypi/unittest2
20-
.. _mock: https://pypi.python.org/pypi/mock/
17+
.. _sphinx: https://pypi.org/project/Sphinx
18+
.. _discover: https://pypi.org/project/discover
19+
.. _unittest2: https://pypi.org/project/unittest2
20+
.. _mock: https://pypi.org/project/mock/
21+
.. _pypy: http://pypy.org
22+
23+
.. _`Python Packaging Guide`: https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project
24+
.. _`tox.ini`: :doc:configfile

0 commit comments

Comments
 (0)