summaryrefslogtreecommitdiff
path: root/src/tox/execute
Commit message (Collapse)AuthorAgeFilesLines
* Avoid UnicodeDecodeError from command output (#2970)Masen Furer2023-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | * test_sync_write_decode_surrogate: utf-8 decode When SyncWrite decodes bytes as utf-8, it should replace unknown sequences with the unicode surrogate codepoint instead of crashing the program. Test case for #2969 * SyncWrite: decode with errors='surrogateescape' Avoid bubbling UnicodeDecodeError up from stream handling internals. Tox has no way of knowing that the bytestream emitted by a command will be valid utf-8, even if utf-8 is ostensibly the "correct" encoding for the stream. It's always possible for an arbitrary command to return non-utf-8 bytes, and this situation should not break tox. Fix #2969
* implement pseudo tty on stdout/stderr (#2711)Masen Furer2022-12-162-10/+68
|
* Better handling of build backend without editable support and add ↵Bernát Gábor2022-12-051-0/+1
| | | | | | --exit-and-dump-after flag (#2597) Resolves https://github.com/tox-dev/tox/issues/2567 Resolves https://github.com/tox-dev/tox/issues/2595
* Do not set COLUMNS or LINES if already set by user (#2580)Bernát Gábor2022-12-021-3/+3
| | | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Use PEP-621 to load project dependencies (#2499)Bernát Gábor2022-09-101-1/+1
|
* Display registered plugins with --version (#2413)Max Droy2022-09-091-1/+1
| | | | Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
* Drop python 3.6 support (#2275)Bernát Gábor2021-11-1710-72/+94
|
* Use pyproject-api package (#2274)Bernát Gábor2021-11-161-1/+2
|
* Update setup changelogBernát Gábor2021-11-163-5/+28
| | | | Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Support for external packages and builders (#2235)Bernát Gábor2021-09-261-1/+1
|
* Fix list/depends cmd creates package env as run envBernát Gábor2021-09-241-1/+2
| | | | | | | This happens if you declare configuration for a packaging environment. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Fix CTRL+C not working on WindowsBernát Gábor2021-09-241-8/+4
| | | | | | | | | | | | | | | | | | Seems sending CTRL_C event on Windows to a new process group does not work in general. It registers on cmd.exe and powershell.exe on its own, however is ignored on powershell when ran within Windows Terminal or Wezterm. Sending CTRL_BREAK seems to work, but on the later brings down the shell itself. However, Windows works differently with signals than Linux. On Linux only the root process gets the signal. On Windows when a signal is sent to a process all processes within that process group will get an instance of that signal. This means that on Windows we don't need to forward signals. All child automatically gets it. The only thing we do is escalate the unanswered interrupt to process kill (there's no SIGTERM on Windows). Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Add support for TOX_LIMITED_SHEBANG (#2226)Bernát Gábor2021-09-202-2/+37
| | | | | | | | | * Add support for TOX_LIMITED_SHEBANG Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com> * Fix Windows Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Expose the configuration load mechanism to plugins (#2217)Bernát Gábor2021-09-152-9/+9
|
* Fix coverage for windows on local subprocessBernát Gábor2021-08-181-5/+6
| | | | Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Add support for execute interrupt timeouts (#2158)Bernát Gábor2021-08-153-76/+106
|
* Add support for allowlist_externals (#2134)Bernát Gábor2021-08-022-3/+25
| | | | | | | | | | | | * Add support for allowlist_externals Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com> * Apply suggestions from code review Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com> Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
* Start plugin interface documentation and installer (#1991)Bernát Gábor2021-04-053-18/+50
| | | | | | | | - Add documentation for the plugin interface - Introduce the installer abstraction - Rework how we handle tox deps section, requirement and constraint files - Support for escaping comments in tox.ini configs Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
* Fix tox is not exiting because package env thread holding it upBernát Gábor2021-02-152-4/+27
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Support running python 2 targets (#1900)Bernát Gábor2021-02-091-0/+2
|
* Add more flake8 checks (#1899)Bernát Gábor2021-02-065-9/+23
| | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Cleanup local subprocess file handlers (#1863)Bernát Gábor2021-01-221-0/+7
|
* Add support for virtualenv configuration options (#1862)Bernát Gábor2021-01-211-1/+1
| | | Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Better handling of set_env (#1784)Bernát Gábor2021-01-111-1/+0
|
* Stable deps and eat-our-own dogfood4.0.0a2Bernát Gábor2021-01-081-1/+1
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Add tty replacerBernát Gábor2021-01-082-8/+10
| | | | | | | This allows users to force isatty until we fix https://github.com/tox-dev/tox/issues/1773. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Fix stdin (but loose isatty support for stdout/stderr)Bernát Gábor2021-01-082-24/+20
| | | | | | | For now sacrificed isatty support on subprocess-es, see https://github.com/tox-dev/tox/issues/1773 for more details. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Requirement files support within depsBernát Gábor2021-01-073-6/+13
| | | | | | | | | | | | | | | | | | | | | | | To support -r/-c/etc within deps we consider the deps section itself a requirements file. We forward this as such to the installer. We validate and traverse the entries within the requirements file, build the keys so we know when we need to rebuild the tox environment. If only add operation has been observed do not recreate the environment, bur rather just update it with a new requirement file install. Also added a mechanism into tox.pytest that allows enabling a short circuit into the execute API. This is useful for example to auto pass all install steps with success and a noop. All install steps now have a run id starting with install. Run ids have been altered to use the _ over the - as separator. This is to bring it inline with how the PEP-517 backend uses the function name as run it, and as such uses the _ as separator. Fold legacy dev build requires package install into install-deps from a dedicated step. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Better handling and error messages on backend failedBernát Gábor2021-01-031-2/+27
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Add keyboard interrupt support for parallelBernát Gábor2021-01-034-81/+72
| | | | | | Part of this unify the sequential and parallel execution engines. Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Add base coverage for PEP-517Bernát Gábor2020-12-291-1/+5
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Fix some code coverage issuesBernát Gábor2020-12-281-12/+8
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Improve coverageBernát Gábor2020-12-283-14/+14
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Rework and simplify local subprocess executor handlersBernát Gábor2020-12-273-28/+55
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Rework and simplify local subprocess executor handlersBernát Gábor2020-12-276-149/+94
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Fix keyboard interrupt can failBernát Gábor2020-12-251-8/+14
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* More Windows fixbgabor82020-12-241-4/+9
|
* Fix Windows overlapped I/O handling - no longer blocksbgabor82020-12-241-4/+13
|
* Windows fixesbgabor82020-12-242-4/+14
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* General rework of the parallel, execute and reportingBernát Gábor2020-12-248-121/+375
| | | | | | | | | | | | | | | | | | | | | - move environment marker always at start of output - use single char logging level representation - skip support for parallel runs - rework parallel run to collect output per env, and also collect logging lines, fix logging timestamps by materializing the log messages when they are emited (collect the resulting output, instead replaying the log records at a later stage) - support for the -c file to specify tox configuration file at custom path - fix PEP-517 implementation by implementing a new type hinted PEP-517 frontend/backend interface - add a executor for PEP-517 communication that starts up just one process and then reuses that one process for all subsequent messages, this also collects stdout/stderr for executed commands - introduce async executor for the commands (alongside the current sync) - add prefix to threads to ease of identification in debugging Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* tests: add coverage for the local subprocess executorBernát Gábor2020-11-063-40/+32
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Handle requirement files for depsBernát Gábor2020-11-041-1/+1
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* tests: add platform specific pragma no coverage for thread reader win/unixBernát Gábor2020-11-032-11/+11
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* tests: add platform specific no pragma for platform branchesBernát Gábor2020-11-023-10/+11
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* report: duration of the setup and the individual commands and fix devenvBernát Gábor2020-10-301-2/+5
| | | | | | | - devenv mode: don't run tests and ensure there's only one target environment selected Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Better shell cmd report, fix list env not working with testsBernát Gábor2020-10-272-8/+11
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Better run output, and fix failing cmd not being reportedBernát Gábor2020-10-261-4/+4
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Add typing to test suiteBernát Gábor2020-10-261-1/+4
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* More fixesBernát Gábor2020-10-251-1/+1
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
* Various fixesBernát Gábor2020-10-252-2/+6
| | | | Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>