Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip missing interpreters should be a toggle-able flag #903

Closed
gaborbernat opened this issue Jul 11, 2018 · 5 comments
Closed

skip missing interpreters should be a toggle-able flag #903

gaborbernat opened this issue Jul 11, 2018 · 5 comments
Labels
area:interpreter-discovery feature:new something does not exist yet, but should pr-merged
Milestone

Comments

@gaborbernat
Copy link
Member

It makes sense to set skip missing interpreters inside the tox file to ensure that users locally don't get failures for interpreters they don't have. In this cases, it should be still possible to override that and force not skipping missing interpreters in the CI environment for example.

@gaborbernat gaborbernat added feature:new something does not exist yet, but should area:interpreter-discovery labels Jul 11, 2018
@gaborbernat gaborbernat added this to the 3.2 milestone Jul 11, 2018
@anthrotype
Copy link

Yeah, I like the idea of being able to set skip_missing_interpreters to false, but only when running in a CI environment. Maybe some command-line option or environment variable could be used to override the default setting in the tox.ini.

@gaborbernat
Copy link
Member Author

Yeah, that was my thought too 👍 I might go for the command line version as that's more explicit I believe.

@obestwalter
Copy link
Member

obestwalter commented Jul 11, 2018

I think I am missing the point here. As far as I understand, I can call tox --skip-missing-interpreters already to get that effect and I can also configure it as a global option in tox.ini: http://tox.readthedocs.io/en/latest/config.html#confval-skip_missing_interpreters=BOOL - if this behaviour needs to be made more malleable/powerful, I would like to understand first what else is needed and by whom.

@gaborbernat
Copy link
Member Author

@obestwalter the fact is --skip-missing-interpreters is often what people want, so they set it more often than not to true via the config (we do this ourselves). The problem is once this is set to true inside the config there's no way at the moment to unset it at invocation side.

A simple use case of this is that if you set skip-missing-interpreters to true inside the config and then miss-configure your CI (so that a given Python is not available) the CI will succeed even though the tests could not be run (because you'll just fail).

I think the root problem here is that skip missing interpreters should really default to true. And then have a flag of fail-on-missing-interpreters that the people can use in the CI env. However, this would break our backward compatibility so what I envision is skip-missing-interpreters[=1] so that inside the CI people can do skip-missing-interpreters=0 to force failure if a given Python is missing.

@obestwalter
Copy link
Member

Now I understand - thanks. I like your solution also. Keeps the default, but would make the config setting overridable by the commandline then.

@asottile asottile changed the title skip missing interpreters should be a toogle-able flag skip missing interpreters should be a toggle-able flag Jul 18, 2018
@helpr helpr bot added the pr-available label Sep 14, 2018
@gaborbernat gaborbernat modified the milestones: 3.2, 3.4 Sep 14, 2018
@helpr helpr bot added pr-merged and removed pr-available labels Sep 15, 2018
DmytroLitvinov referenced this issue in DmytroLitvinov/kuna Sep 24, 2018



### Update [tox](https://pypi.org/project/tox) from **3.2.1** to **3.4.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 3.4.0
   ```
   ------------------

Bugfixes
^^^^^^^^

- add ``--exists-action w`` to default pip flags to handle better VCS dependencies (`pip documentation on this &lt;https://pip.pypa.io/en/latest/reference/pip/exists-action-option&gt;`_) - by :user:`gaborbernat` (`503 &lt;https://github.com/tox-dev/tox/issues/503&gt;`_)
- instead of assuming the Python version from the base python name ask the interpreter to reveal the version for the ``ignore_basepython_conflict`` flag - by :user:`gaborbernat` (`908 &lt;https://github.com/tox-dev/tox/issues/908&gt;`_)
- PEP-517 packaging fails with sdist already exists, fixed via ensuring the dist folder is empty before invoking the backend and `pypa/setuptools 1481 &lt;https://github.com/pypa/setuptools/pull/1481&gt;`_ - by :user:`gaborbernat` (`1003 &lt;https://github.com/tox-dev/tox/issues/1003&gt;`_)


Features
^^^^^^^^

- add ``commands_pre`` and ``commands_post`` that run before and after running
  the ``commands`` (setup runs always, commands only if setup suceeds, teardown always - all
  run until the first failing command)  - by :user:`gaborbernat` (`167 &lt;https://github.com/tox-dev/tox/issues/167&gt;`_)
- ``pyproject.toml`` config support initially by just inline the tox.ini under ``tool.tox.legacy_tox_ini`` key; config source priority order is ``pyproject.toml``, ``tox.ini`` and then ``setup.cfg`` - by :user:`gaborbernat` (`814 &lt;https://github.com/tox-dev/tox/issues/814&gt;`_)
- use the os environment variable ``TOX_SKIP_ENV`` to filter out tox environment names from the run list (set by ``envlist``)  - by :user:`gaborbernat` (`824 &lt;https://github.com/tox-dev/tox/issues/824&gt;`_)
- always set ``PIP_USER=0`` (do not install into the user site package, but inside the virtual environment created) and ``PIP_NO_DEPS=0`` (installing without dependencies can cause broken package installations) inside tox - by :user:`gaborbernat` (`838 &lt;https://github.com/tox-dev/tox/issues/838&gt;`_)
- tox will inject some environment variables that to indicate a command is running within tox: ``TOX_WORK_DIR`` env var is set to the tox work directory,
  ``TOX_ENV_NAME`` is set to the current running tox environment name, ``TOX_ENV_DIR`` is set to the current tox environments working dir - by :user:`gaborbernat` (`847 &lt;https://github.com/tox-dev/tox/issues/847&gt;`_)
- While running tox invokes various commands (such as building the package, pip installing dependencies and so on), these were printed in case they failed as Python arrays. Changed the representation to a shell command, allowing the users to quickly replicate/debug the failure on their own - by :user:`gaborbernat` (`851 &lt;https://github.com/tox-dev/tox/issues/851&gt;`_)
- skip missing interpreters value from the config file can now be overridden via the ``--skip-missing-interpreters`` cli flag - by :user:`gaborbernat` (`903 &lt;https://github.com/tox-dev/tox/issues/903&gt;`_)
- keep additional environments config order when listing them - by :user:`gaborbernat` (`921 &lt;https://github.com/tox-dev/tox/issues/921&gt;`_)
- allow injecting config value inside the ini file dependent of the fact that we&#39;re connected to an interactive shell or not  - by :user:`gaborbernat` (`947 &lt;https://github.com/tox-dev/tox/issues/947&gt;`_)
- do not build sdist if skip install is specified for the envs to be run - by :user:`gaborbernat` (`974 &lt;https://github.com/tox-dev/tox/issues/974&gt;`_)
- when verbosity level increases above two start passing through verbosity flags to pip - by :user:`gaborbernat` (`982 &lt;https://github.com/tox-dev/tox/issues/982&gt;`_)
- when discovering the interpreter to use check if the tox host Python matches and use that if so - by :user:`gaborbernat` (`994 &lt;https://github.com/tox-dev/tox/issues/994&gt;`_)
- ``-vv`` will print out why a virtual environment is re-created whenever this operation is triggered - by :user:`gaborbernat` (`1004 &lt;https://github.com/tox-dev/tox/issues/1004&gt;`_)


Documentation
^^^^^^^^^^^^^

- clarify that ``python`` and ``pip`` refer to the virtual environments executable - by :user:`gaborbernat` (`305 &lt;https://github.com/tox-dev/tox/issues/305&gt;`_)
- add Sphinx and mkdocs example of generating documentation via tox - by :user:`gaborbernat` (`374 &lt;https://github.com/tox-dev/tox/issues/374&gt;`_)
- specify that ``setup.cfg`` tox configuration needs to be inside the ``tox:tox`` namespace - by :user:`gaborbernat` (`545 &lt;https://github.com/tox-dev/tox/issues/545&gt;`_)
   ```
   
  
  
   ### 3.3.0
   ```
   ------------------

Bugfixes
^^^^^^^^

- fix ``TOX_LIMITED_SHEBANG`` when running under python3 - by :user:`asottile` (`931 &lt;https://github.com/tox-dev/tox/issues/931&gt;`_)


Features
^^^^^^^^

- `PEP-517 &lt;https://www.python.org/dev/peps/pep-0517/&gt;`_ source distribution support (create a
  ``.package`` virtual environment to perform build operations inside) by :user:`gaborbernat` (`573 &lt;https://github.com/tox-dev/tox/issues/573&gt;`_)
- `flit &lt;https://flit.readthedocs.io&gt;`_ support via implementing ``PEP-517`` by :user:`gaborbernat` (`820 &lt;https://github.com/tox-dev/tox/issues/820&gt;`_)
- packaging now is exposed as a hook via ``tox_package(session, venv)`` - by :user:`gaborbernat` (`951 &lt;https://github.com/tox-dev/tox/issues/951&gt;`_)


Miscellaneous
^^^^^^^^^^^^^

- Updated the VSTS build YAML to use the latest jobs and pools syntax - by :user:`davidstaheli` (`955 &lt;https://github.com/tox-dev/tox/issues/955&gt;`_)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/tox
  - Changelog: https://pyup.io/changelogs/tox/
  - Docs: https://tox.readthedocs.org/
</details>





### Update [Sphinx](https://pypi.org/project/Sphinx) from **1.8.0** to **1.8.1**.


<details>
  <summary>Changelog</summary>
  
  
   ### 1.8.1
   ```
   =====================================

Incompatible changes
--------------------

* LaTeX ``\pagestyle`` commands have been moved to the LaTeX template. No
  changes in PDF, except possibly if ``\sphinxtableofcontents``, which
  contained them, had been customized in :file:`conf.py`. (refs: 5455)

Bugs fixed
----------

* 5418: Incorrect default path for sphinx-build -d/doctrees files
* 5421: autodoc emits deprecation warning for :confval:`autodoc_default_flags`
* 5422: lambda object causes PicklingError on storing environment
* 5417: Sphinx fails to build with syntax error in Python 2.7.5
* 4911: add latexpdf to make.bat for non make-mode
* 5436: Autodoc does not work with enum subclasses with properties/methods
* 5437: autodoc: crashed on modules importing eggs
* 5433: latex: ImportError: cannot import name &#39;DEFAULT_SETTINGS&#39;
* 5431: autodoc: ``autofunction`` emits a warning for callable objects
* 5457: Fix TypeError in error message when override is prohibited
* 5453: PDF builds of &#39;howto&#39; documents have no page numbers
* 5463: mathbase: math_role and MathDirective was disappeared in 1.8.0
* 5454: latex: Index has disappeared from PDF for Japanese documents
* 5432: py domain: ``:type:`` field can&#39;t process ``:term:`` references
* 5426: py domain: TypeError has been raised for class attribute
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/sphinx
  - Changelog: https://pyup.io/changelogs/sphinx/
  - Homepage: http://sphinx-doc.org/
</details>





### Update [twine](https://pypi.org/project/twine) from **1.11.0** to **1.12.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 1.12.0
   ```
   * :feature:`395 major` Add ``twine check`` command to check long description
* :feature:`392 major` Drop support for Python 3.3
* :feature:`363` Empower ``--skip-existing`` for Artifactory repositories
* 🐛`367` Avoid MD5 when Python is compiled in FIPS mode
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/twine
  - Changelog: https://pyup.io/changelogs/twine/
  - Docs: https://twine.readthedocs.io/
</details>
guykisel referenced this issue in guykisel/inline-plz Sep 24, 2018
This PR updates [tox](https://pypi.org/project/tox) from **3.1.2** to **3.4.0**.



<details>
  <summary>Changelog</summary>
  
  
   ### 3.4.0
   ```
   ------------------

Bugfixes
^^^^^^^^

- add ``--exists-action w`` to default pip flags to handle better VCS dependencies (`pip documentation on this &lt;https://pip.pypa.io/en/latest/reference/pip/exists-action-option&gt;`_) - by :user:`gaborbernat` (`503 &lt;https://github.com/tox-dev/tox/issues/503&gt;`_)
- instead of assuming the Python version from the base python name ask the interpreter to reveal the version for the ``ignore_basepython_conflict`` flag - by :user:`gaborbernat` (`908 &lt;https://github.com/tox-dev/tox/issues/908&gt;`_)
- PEP-517 packaging fails with sdist already exists, fixed via ensuring the dist folder is empty before invoking the backend and `pypa/setuptools 1481 &lt;https://github.com/pypa/setuptools/pull/1481&gt;`_ - by :user:`gaborbernat` (`1003 &lt;https://github.com/tox-dev/tox/issues/1003&gt;`_)


Features
^^^^^^^^

- add ``commands_pre`` and ``commands_post`` that run before and after running
  the ``commands`` (setup runs always, commands only if setup suceeds, teardown always - all
  run until the first failing command)  - by :user:`gaborbernat` (`167 &lt;https://github.com/tox-dev/tox/issues/167&gt;`_)
- ``pyproject.toml`` config support initially by just inline the tox.ini under ``tool.tox.legacy_tox_ini`` key; config source priority order is ``pyproject.toml``, ``tox.ini`` and then ``setup.cfg`` - by :user:`gaborbernat` (`814 &lt;https://github.com/tox-dev/tox/issues/814&gt;`_)
- use the os environment variable ``TOX_SKIP_ENV`` to filter out tox environment names from the run list (set by ``envlist``)  - by :user:`gaborbernat` (`824 &lt;https://github.com/tox-dev/tox/issues/824&gt;`_)
- always set ``PIP_USER=0`` (do not install into the user site package, but inside the virtual environment created) and ``PIP_NO_DEPS=0`` (installing without dependencies can cause broken package installations) inside tox - by :user:`gaborbernat` (`838 &lt;https://github.com/tox-dev/tox/issues/838&gt;`_)
- tox will inject some environment variables that to indicate a command is running within tox: ``TOX_WORK_DIR`` env var is set to the tox work directory,
  ``TOX_ENV_NAME`` is set to the current running tox environment name, ``TOX_ENV_DIR`` is set to the current tox environments working dir - by :user:`gaborbernat` (`847 &lt;https://github.com/tox-dev/tox/issues/847&gt;`_)
- While running tox invokes various commands (such as building the package, pip installing dependencies and so on), these were printed in case they failed as Python arrays. Changed the representation to a shell command, allowing the users to quickly replicate/debug the failure on their own - by :user:`gaborbernat` (`851 &lt;https://github.com/tox-dev/tox/issues/851&gt;`_)
- skip missing interpreters value from the config file can now be overridden via the ``--skip-missing-interpreters`` cli flag - by :user:`gaborbernat` (`903 &lt;https://github.com/tox-dev/tox/issues/903&gt;`_)
- keep additional environments config order when listing them - by :user:`gaborbernat` (`921 &lt;https://github.com/tox-dev/tox/issues/921&gt;`_)
- allow injecting config value inside the ini file dependent of the fact that we&#39;re connected to an interactive shell or not  - by :user:`gaborbernat` (`947 &lt;https://github.com/tox-dev/tox/issues/947&gt;`_)
- do not build sdist if skip install is specified for the envs to be run - by :user:`gaborbernat` (`974 &lt;https://github.com/tox-dev/tox/issues/974&gt;`_)
- when verbosity level increases above two start passing through verbosity flags to pip - by :user:`gaborbernat` (`982 &lt;https://github.com/tox-dev/tox/issues/982&gt;`_)
- when discovering the interpreter to use check if the tox host Python matches and use that if so - by :user:`gaborbernat` (`994 &lt;https://github.com/tox-dev/tox/issues/994&gt;`_)
- ``-vv`` will print out why a virtual environment is re-created whenever this operation is triggered - by :user:`gaborbernat` (`1004 &lt;https://github.com/tox-dev/tox/issues/1004&gt;`_)


Documentation
^^^^^^^^^^^^^

- clarify that ``python`` and ``pip`` refer to the virtual environments executable - by :user:`gaborbernat` (`305 &lt;https://github.com/tox-dev/tox/issues/305&gt;`_)
- add Sphinx and mkdocs example of generating documentation via tox - by :user:`gaborbernat` (`374 &lt;https://github.com/tox-dev/tox/issues/374&gt;`_)
- specify that ``setup.cfg`` tox configuration needs to be inside the ``tox:tox`` namespace - by :user:`gaborbernat` (`545 &lt;https://github.com/tox-dev/tox/issues/545&gt;`_)
   ```
   
  
  
   ### 3.3.0
   ```
   ------------------

Bugfixes
^^^^^^^^

- fix ``TOX_LIMITED_SHEBANG`` when running under python3 - by :user:`asottile` (`931 &lt;https://github.com/tox-dev/tox/issues/931&gt;`_)


Features
^^^^^^^^

- `PEP-517 &lt;https://www.python.org/dev/peps/pep-0517/&gt;`_ source distribution support (create a
  ``.package`` virtual environment to perform build operations inside) by :user:`gaborbernat` (`573 &lt;https://github.com/tox-dev/tox/issues/573&gt;`_)
- `flit &lt;https://flit.readthedocs.io&gt;`_ support via implementing ``PEP-517`` by :user:`gaborbernat` (`820 &lt;https://github.com/tox-dev/tox/issues/820&gt;`_)
- packaging now is exposed as a hook via ``tox_package(session, venv)`` - by :user:`gaborbernat` (`951 &lt;https://github.com/tox-dev/tox/issues/951&gt;`_)


Miscellaneous
^^^^^^^^^^^^^

- Updated the VSTS build YAML to use the latest jobs and pools syntax - by :user:`davidstaheli` (`955 &lt;https://github.com/tox-dev/tox/issues/955&gt;`_)
   ```
   
  
  
   ### 3.2.1
   ```
   ------------------

Bugfixes
^^^^^^^^

- ``--parallel--safe-build`` no longer cleans up its folders (``distdir``, ``distshare``, ``log``). - by :user:`gaborbernat` (`849 &lt;https://github.com/tox-dev/tox/issues/849&gt;`_)
   ```
   
  
  
   ### 3.2.0
   ```
   ------------------

Features
^^^^^^^^

- Switch pip invocations to use the module ``-m pip`` instead of direct invocation. This could help
  avoid some of the shebang limitations.  - by :user:`gaborbernat` (`935 &lt;https://github.com/tox-dev/tox/issues/935&gt;`_)
- Ability to specify package requirements for the tox run via the ``tox.ini`` (``tox`` section under key ``requires`` - PEP-508 style): can be used to specify both plugin requirements or build dependencies. - by :user:`gaborbernat` (`783 &lt;https://github.com/tox-dev/tox/issues/783&gt;`_)
- Allow to run multiple tox instances in parallel by providing the
  ``--parallel--safe-build`` flag. - by :user:`gaborbernat` (`849 &lt;https://github.com/tox-dev/tox/issues/849&gt;`_)
   ```
   
  
  
   ### 3.1.3
   ```
   ------------------

Bugfixes
^^^^^^^^

- A caching issue that caused the ``develop-inst-nodeps`` action, which
  reinstalls the package under test, to always run has been resolved. The
  ``develop-inst-noop`` action, which, as the name suggests, is a no-op, will now
  run unless there are changes to ``setup.py`` or ``setup.cfg`` files that have
  not been reflected - by stephenfin (`909 &lt;https://github.com/tox-dev/tox/issues/909&gt;`_)


Features
^^^^^^^^

- Python version testenvs are now automatically detected instead of comparing
  against a hard-coded list of supported versions.  This enables ``py38`` and
  eventually ``py39`` / ``py40`` / etc. to work without requiring an upgrade to
  ``tox``.  As such, the following public constants are now deprecated
  (and scheduled for removal in ``tox`` 4.0: ``CPYTHON_VERSION_TUPLES``,
  ``PYPY_VERSION_TUPLES``, ``OTHER_PYTHON_INTERPRETERS``, and ``DEFAULT_FACTORS`` -
  by :user:`asottile` (`914 &lt;https://github.com/tox-dev/tox/issues/914&gt;`_)


Documentation
^^^^^^^^^^^^^

- Add a system overview section on the index page that explains briefly how tox works -
  by :user:`gaborbernat`. (`867 &lt;https://github.com/tox-dev/tox/issues/867&gt;`_)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/tox
  - Changelog: https://pyup.io/changelogs/tox/
  - Docs: https://tox.readthedocs.org/
</details>
leycec added a commit to beartype/beartype that referenced this issue Dec 3, 2020
This commit corrects our GitHub Actions-based continuous integration
(CI) configuration to correctly exercise itself against Python 3.9 by
explicitly passing the `--skip-missing-interpreters=false` CLI option to
force CI failures when one or more Python environments are unavailable,
resolving the upstream tox-dev/tox#903 issue for us. Unrelatedly, this
commit also substantially improves the introductory leda in our
front-facing `README.rst` to better highlight beartype's merits versus
conventional static type checkers.

## Tests Improved

* **Python 3.9 exercised under CI.** Our GitHub Actions-based continuous
  integration (CI) configuration now correctly exercises itself against
  Python 3.9 by explicitly passing the
  `--skip-missing-interpreters=false` CLI option to force CI failures
  when one or more Python environments are unavailable, resolving the
  upstream tox-dev/tox#903 issue for `@beartype`.

(*Thistles and whistlepigs alike abjure Spring sprigs!*)
leycec added a commit to beartype/beartype that referenced this issue Dec 6, 2020
This stable release significantly improves our front-facing `README.rst`
as well as resolving an unrelated suite of minor issues.

Specific changes include:

## Documentation Improved

* **_Overview_ commentary.** The new top-level *Overview* section
  better outlines beartype's various tradeoffs, advantages, and
  disadvantages versus competing type checkers.
* **_Decorator_ commentary.** The new top-level *Decorator* section
  documents code generated by `@beartype` under real-world use cases.
* **_Developer_ commentary.** The new top-level *Developer* section
  assists other developers in contributing to `@beartype`.

## Issues Resolved

* **Deeply ignorable new types.** `@beartype` now correctly ignores
  calls to `typing.NewType` passed ignorable type hints rather than
  merely `object`.
* **PEP 544-compliant protocol detection.** `@beartype` now reports all
  builtin types (e.g., `int`) to *not* be PEP 544-compliant protocols,
  despite a proper subset of builtin types erroneously claiming to be
  PEP 544-compliant protocols for strange and probably spurious reasons.

## Tests Improved

* **Python 3.9 exercised under CI.** Our GitHub Actions-based continuous
  integration (CI) configuration now correctly exercises itself against
  Python 3.9 by explicitly passing the
  `--skip-missing-interpreters=false` CLI option to force CI failures
  when one or more Python environments are unavailable, resolving the
  upstream tox-dev/tox#903 issue for `@beartype`.

(*Fastidious fast tracks blast perfidious racks!*)
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:interpreter-discovery feature:new something does not exist yet, but should pr-merged
Projects
None yet
Development

No branches or pull requests

3 participants