Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tox-dev/tox
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.11.1
Choose a base ref
...
head repository: tox-dev/tox
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.11.2
Choose a head ref
  • 8 commits
  • 10 files changed
  • 6 contributors

Commits on Sep 6, 2023

  1. Copy the full SHA
    277632c View commit details
  2. Bump actions/checkout from 3 to 4 (#3114)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 6, 2023
    Copy the full SHA
    9d07c06 View commit details

Commits on Sep 7, 2023

  1. Copy the full SHA
    1b9c225 View commit details
  2. Copy the full SHA
    53bbb37 View commit details

Commits on Sep 8, 2023

  1. Copy the full SHA
    4e55bbc View commit details
  2. Update 3119.bugfix.rst

    gaborbernat authored Sep 8, 2023
    Copy the full SHA
    633d56f View commit details
  3. Copy the full SHA
    335a63a View commit details
  4. release 4.11.2

    gaborbernat committed Sep 8, 2023
    Copy the full SHA
    1371e98 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install self-tox
@@ -67,7 +67,7 @@ jobs:
exclude:
- { os: windows-latest, tox_env: pkg_meta }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python 3.11
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
python-version: "3.11"
- name: Install build
run: python -m pip install build
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build package
15 changes: 11 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -8,18 +8,25 @@ repos:
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
args: ["--ignore-words-list", "crate,releas", "--skip", "*.svg"]
additional_dependencies:
- tomli
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: 1.3.1
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.1.0"
rev: 1.1.0
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.10"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
rev: v3.0.3
hooks:
- id: prettier
args: ["--print-width=120", "--prose-wrap=always"]
@@ -29,7 +36,7 @@ repos:
- id: blacken-docs
additional_dependencies: [black==23.7]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.287"
rev: v0.0.287
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
19 changes: 16 additions & 3 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -4,6 +4,19 @@ Release History

.. towncrier release notes start
v4.11.2 (2023-09-07)
--------------------

Bugfixes - 4.11.2
~~~~~~~~~~~~~~~~~
- Fix bug in ``config.rst`` by removing stray colons left over from (:issue:`3111`) - by :user:`posita`. (:issue:`3118`)
- Provide example to make CLI help more helpful for ``-x`/``--override`` - by :user:`posita`. (:issue:`3119`)

Improved Documentation - 4.11.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Fix typos discovered by codespell - by :user:`cclauss`. (:issue:`3113`)


v4.11.1 (2023-09-01)
--------------------

@@ -114,7 +127,7 @@ v4.6.0 (2023-06-05)

Features - 4.6.0
~~~~~~~~~~~~~~~~
- Addded ``--list-dependencies`` and ``--no-list-dependencies`` CLI parameters.
- Added ``--list-dependencies`` and ``--no-list-dependencies`` CLI parameters.
If unspecified, defaults to listing when in CI, but not otherwise. (:issue:`3024`)

Misc - 4.6.0
@@ -273,7 +286,7 @@ Bugfixes - 4.4.0
esoteric quoting.

To make this transition easier, on Windows, the backslash path separator will not treated as an escape character unless
it preceeds a quote, whitespace, or another backslash chracter. This allows paths to mostly be written in single or
it precedes a quote, whitespace, or another backslash character. This allows paths to mostly be written in single or
double backslash style.

Note that **double-backslash will no longer be escaped to a single backslash in substitutions**, instead the double
@@ -338,7 +351,7 @@ v4.3.2 (2023-01-16)

Bugfixes - 4.3.2
~~~~~~~~~~~~~~~~
- Fix regression introduced in 4.3.0 which occured when a substitution expression
- Fix regression introduced in 4.3.0 which occurred when a substitution expression
for an environment variable that had previously been substituted appears in the
ini file after a substitution expression for a different environment variable.
This situation erroneously resulted in an exception about "circular chain
10 changes: 5 additions & 5 deletions docs/config.rst
Original file line number Diff line number Diff line change
@@ -935,7 +935,7 @@ It's possible to inject a config value only when tox is running in interactive s
{tty:ON_VALUE:OFF_VALUE}

The first value is the value to inject when the interactive terminal is
available, the second value is the value to use when it's not (optiona). A good
available, the second value is the value to use when it's not (optional). A good
use case for this is e.g. passing in the ``--pdb`` flag for pytest.

.. _`command positional substitution`:
@@ -1023,19 +1023,19 @@ For example, given this config:
foo=bar
commands = pytest tests
You could enable ``ignore_errors`` by running::
You could enable ``ignore_errors`` by running:

.. code-block:: bash
tox --override testenv.ignore_errors=True
You could add additional dependencies by running::
You could add additional dependencies by running:

.. code-block:: bash
tox --override testenv.deps+=pytest-xdist,pytest-cov
You could set additional environment variables by running::
You could set additional environment variables by running:

.. code-block:: bash
@@ -1045,7 +1045,7 @@ Set CLI flags via environment variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All CLI flags can be set via environment variables too, the naming convention here is ``TOX_<option>``. E.g.
``TOX_WORKDIR`` sets the ``--workdir`` flag, or ``TOX_OVERRIDE`` sets the ``--override`` flag. For flags accepting more
than one arguments (such as override) use the ``;`` character to separate these values:
than one argument, use the ``;`` character to separate these values:

.. code-block:: bash
4 changes: 2 additions & 2 deletions docs/faq.rst
Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@ Here is a non-exhaustive list of these.
changed via ``TOX_CONFIG_FILE`` environment variable).
- All tox defaults can now be changed via an environment variable: ``TOX_`` prefix followed by the settings key,
e.g. ``TOX_PACKAGE=wheel``.
- Any configuration can be overwritten via the CLI ``-x`` or ``--override`` flag, e.g.
``tox run -e py311 -x testenv:py310.package=editable`` would force the packaging of environment ``py311`` to be an
- Any configuration can be overridden via the CLI ``-x`` or ``--override`` flag, e.g.
``tox run -e py311 -x testenv:py311.package=editable`` would force the packaging of environment ``py311`` to be an
editable install independent what's in the configuration file.
- :ref:`basepython` is now a list, the first successfully detected python will be used to generate python environment.
- We now have support for inline tox plugins via the ``toxfile.py`` at the root of your project. At a later time this
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ Installing an unreleased version is discouraged and should be only done for test
a pip version of at least ``18.0.0`` and use the following command:


.. code-block:: console
.. code-block:: bash
pip install git+https://github.com/tox-dev/tox.git@rewrite
5 changes: 3 additions & 2 deletions src/tox/config/loader/api.py
Original file line number Diff line number Diff line change
@@ -177,14 +177,15 @@ def build( # noqa: PLR0913

@impl
def tox_add_option(parser: ToxParser) -> None:
override_short_option = "-x"
parser.add_argument(
"-x",
override_short_option,
"--override",
action="append",
type=Override,
default=[],
dest="override",
help="configuration override(s)",
help=f"configuration override(s), e.g., {override_short_option} testenv:pypy3.ignore_errors=True",
)


2 changes: 1 addition & 1 deletion src/tox/tox_env/python/api.py
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ def version_dot(self) -> str:
PY_FACTORS_RE = re.compile(
r"""
^(?!py$) # don't match 'py' as it doesn't provide any info
(?P<impl>py|pypy|cpython|jython|rustpython|ironpython) # the interpeter; most users will simply use 'py'
(?P<impl>py|pypy|cpython|jython|rustpython|ironpython) # the interpreter; most users will simply use 'py'
(?P<version>[2-9]\.?[0-9]?[0-9]?)?$ # the version; one of: MAJORMINOR, MAJOR.MINOR
""",
re.VERBOSE,
2 changes: 1 addition & 1 deletion src/tox/tox_env/python/pip/pip_install.py
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ def _register_config(self) -> None:
keys=["list_dependencies_command"],
of_type=Command,
default=Command(["python", "-m", "pip", "freeze", "--all"]),
desc="command used to list isntalled packages",
desc="command used to list installed packages",
)

def default_install_command(self, conf: Config, env_name: str | None) -> Command: # noqa: ARG002