run.py: Python solutions are skipped on Windows when run via python instead of python3
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Anfängerfreundlichkeit
- 15/100
Rechercherichtung
The bug is in run.py, where LANGUAGES[".py"] hardcodes "python3" as the interpreter, so Python solutions are skipped on Windows when only python exists. Check whether the runner can use sys.executable for the .py entry instead, then run python run.py --lang py on Windows and confirm the six solution.py and solution_naive.py files execute and are checked against cases.txt. Pull request #32 already targets this, so review it before starting new work.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What I did
- Fresh checkout of
mainon Windows 11 with Python installed via the standard python.org Windows installer (providingpython.exeon PATH, with nopython3.exesymlink/binary). - Run the solution check using the command specified in the README:
python run.py --lang py
What I expected
The README section "Running the checks" says:
"It needs Python 3. On Windows the command is
python. Solutions in languages you don't have installed are skipped."
Because Python 3 is installed and running run.py, the 6 Python solutions (solution.py across problems) should be executed and checked against cases.txt.
What happened instead
Every Python solution is skipped because run.py looks specifically for python3:
anagram
binary-search
skip solution.py (python3 isn't installed)
fibonacci
skip solution.py (python3 isn't installed)
skip solution_naive.py (python3 isn't installed)
palindrome
skip solution.py (python3 isn't installed)
prime
skip solution.py (python3 isn't installed)
roman-numerals
skip solution.py (python3 isn't installed)
Summary: 0 passed, 0 failed, 6 skipped
The runner exits 0, skipping all Python checks even though Python 3 is actively executing the runner. On Windows machines with Microsoft Store app aliases enabled, shutil.which('python3') resolves to the WindowsApps stub, which errors out with "Python was not found", causing every Python solution to fail spuriously.
In run.py, LANGUAGES[".py"] hardcodes "python3":
".py": ("python3", None, ["python3", "{src}"])
Instead, using sys.executable ensures the runner launches solutions with the same Python 3 interpreter currently executing run.py.
Environment
Windows 11, Python 3.14 (python.exe), code-corner main @ 0c95800.
I would like to work on this fix.
- Vorherrschende Sprache
- Python
- Sterne
- 1
- Forks
- 6
- Ø Merge
- 17 Std. 52 Min.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus techcsispit/code-corner
-
prime/solution.java doesn't compile: public class PrimeCheck in solution.java, README requires Solution.java with a Solution classEvtl. vergeben @tanujb03 hat das vor 1 Tag übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
techcsispit/code-corner#35 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Prime solution in C++ incorrectly returns true for some composite numbersEvtl. vergeben @paramsj hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 25/100
techcsispit/code-corner#38 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Failed compilations always report 0.000 secondsEvtl. vergeben @Shivangi-singh18 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
techcsispit/code-corner#37 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
fibonacci/solution.c: prints negative numbers for n of 47 or more (F(90) prints -1581614984)Evtl. vergeben @tanujb03 hat das vor 1 Tag übernommen. Offenbug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
techcsispit/code-corner#27 ·
Maintainer antworten meist innerhalb von 1 Tag
-
binary-search/Solution.java: prints -1 when the target is the last element (`9 1 3 5 7 9`) or in a 1-element list (`5 5`)Evtl. vergeben @tanujb03 hat das vor 1 Tag übernommen. Offenbug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 22/100
techcsispit/code-corner#26 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in techcsispit/code-corner
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
vllm-project/vllm#61131 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
kubernetes-client/python#2735 ·
Maintainer antworten meist innerhalb von 1 Tag
-
desktop help wanted test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
docs pydanty:is-working
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
pydantic/pydantic-ai#10113 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Tutorial unit test leaks sample data into tutorial doctestEvtl. vergeben @Gambit-Checkmate hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100