Repository navigation
microskills: read the Windows py launcher as the Python interpreter - #341
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Conversation
`py` runs the default Python, or the one a `-V:<tag>` or `-3.x` option chooses (CPython's "Using Python on Windows": "To launch your default runtime, run `python` or `py`"). The observer read `python.exe` and `C:\Python312\python.exe` as the interpreter but not `py`, so `py -m pytest` was not observed, and a repository whose tests run that way never got a fact about them. `py` (also `py.exe`, by path) is now one of the Python interpreters. Its version option stays in the form, `py -3.12 -m pytest`, since it chooses which Python runs. `py.test` (pytest's own name) and `pyright` are read as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyruns the default Python, or the one a-V:<tag>or-3.xoption chooses (CPython's "Using Python on Windows": "To launch your default runtime, runpythonorpy"). The observer readpython.exeandC:\Python312\python.exeas the interpreter but notpy, sopy -m pytestwas not observed, and a repository whose tests run that way never got a fact about them.Fix:
py(alsopy.exe, by path) is one of the Python interpreters. Its version option stays in the form,py -3.12 -m pytest, since it chooses which Python runs.py.test(pytest's own name) andpyrightare read as before, and 48 other commands classify the same before and after. The loop guard's side ofpyis a separate PR.Tests, in a new
tests/test_observe_py_launcher.py:pycommands read as test runs, an interpreter run or an environment probe, with the version option kept (all fail on main);py.test,pyrightandpython -m pytestread as before;EnvFactsDistilleron four made-up Codex sessions wherepython -m pytestfails andpy -3.12 -m pytestpasses: the rendered block namespy -3.12 -m pytest. It fails on main and passes with the fix.The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.
Fixes #340