rye
rye copied to clipboard
Cannot ctrl+c rye test
Steps to Reproduce
- run
rye sync
followed byrye test
in this repository - observe that pytest takes a bloody long time to collect tests
- hit
ctrl+c
- observe how
rye
exists butpytest
continues to run
Expected Result
pytest
should stop running.
Actual Result
pytest
continues to run.
Version Info
rye 0.28.0 commit: 0.28.0 (c44dc7ec8 2024-03-07) platform: macos (aarch64) self-python: [email protected] symlink support: true uv enabled: true
Stacktrace
No response
I cannot reproduce, can you specify the project this happens? For some personal project, it works well
Could not reproduce in my checkout of rye
rye 0.28.0
commit: 0.28.0 (c44dc7ec8 2024-03-07)
platform: linux (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true
Happens on my mac at least. Curious.
Does not happen on mine
rye 0.28.0
commit: 0.28.0 (c44dc7ec8 2024-03-07)
platform: macos (aarch64)
self-python: [email protected]
symlink support: true
uv enabled: true
rye test --all works. I found --all. It's nice :)
Could not reproduce either on Windows 11
rye 0.29.0
commit: 0.28.0+8 (93f00db73 2024-03-09)
platform: windows (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true
@mitsuhiko is it similar to https://asciinema.org/a/Qz0UBIeFmQdHNYqwymDb5ixBy ? I can repro this on MacOS
rye 0.29.0
commit: 0.29.0 (42b179f36 2024-03-11)
platform: macos (aarch64)
self-python: [email protected]
symlink support: true
uv enabled: true
@mitsuhiko is it similar to https://asciinema.org/a/Qz0UBIeFmQdHNYqwymDb5ixBy ? I can repro this on MacOS
rye 0.29.0 commit: 0.29.0 (42b179f36 2024-03-11) platform: macos (aarch64) self-python: [email protected] symlink support: true uv enabled: true
What happens if you just run pytest directly, is this a bug on pytest or rye?
Same behaviour when running it directly:
/Users/dsp/src/sl-rye/.venv/bin/python /Users/dsp/src/sl-rye/.venv/bin/pytest --rootdir /Users/dsp/src/sl-rye --ignore /Users/dsp/src/sl-rye/rye-devtools
While it is "collecting" tests, CTRL+C is ignored. So this is not an issue with std::process:Command::status
but rather the underlying pytest implementation.
I wonder if this is not related to the use of anyio plugin, I cannot reproduce on personal projects that not use it. It could be related to the async nature of it.
Ha, I think this should be fixed in #893