tox
tox copied to clipboard
PythonSpec.satisfies fails to compare paths with different notations
# tox/interpreters/py_spec.py:12
def satisfies(self, req):
if req.is_abs and self.is_abs and self.path != req.path:
return False
Comparing self.path to req.path it might happen that self.path is a path string with backslashes and rep.path might be a path string with frontslashes. In my case i am setting TOXPYTHON37 = C:/python.3.7.9/python.exe, so self.path is C:\python.3.7.9\python.exe and req.path is C:/python.3.7.9/python.exe.
This should be replaced by proper path comparison using pathlib or whatever.
Tox version is 3.25.0
Thanks for this bug report.
Could you please test whether this issue still exists on the current pre-release?
pip install tox --pre
or
pip install tox==4.0.0b2
Seems to work, seems like there was a major overhaul :) Besides that on version 4.0.0b2 i can see other problems, don't know if they are known:
- Weird output characters in commandline when i execute tox
- Support for environment files seems to have changed. Lines starting with the file| inside setenv are leading to a fail now: tox.report.HandledError: replace failed in py38-dev.basepython with ValueError("invalid line 'file|ci/tox_setenv.txt' in set_env")
Thanks! Could you please create two new separate issues? Please include as much details about your terminal for the first issue, and a minimal reproducer for the second issue.
P.S.: And yes - tox 4 is a complete rewrite, with many many edge cases already fixed, but apparently not all :-) Especially not on Windows. Greatly appreciating your time to test it.
- Weird output characters in commandline when i execute tox
What terminal are you using, and what windows versions? Seems colours are not rendered by it.
I'm using the commandline terminal of PyCharm 2021.2.1, which in other cases is able to render colors. Win10.
Did you try with powershell and command prompt to see if you can replicate the issue?
3.0 is no longer supported, please try with 4.0.