scalene
scalene copied to clipboard
Inconsistent behaviour between win & linux, this also clashes with lo…
…ky spawn.py, loky backend spawn.py uses sys.executable expecting a str type
if sys.platform != 'win32': WINEXE = False WINSERVICE = False else: import msvcrt from multiprocessing.reduction import duplicate WINEXE = (sys.platform == 'win32' and getattr(sys, 'frozen', False)) WINSERVICE = str(sys.executable).lower().endswith("pythonservice.exe")
Can you discuss this here esp. in light of the discussion and commits? https://github.com/plasma-umass/scalene/issues/784
sys.executable
is changed to support multiple process tracking so the test is probably correct. I'd recommend you look at that logic (which involves forcing Python processes to use Scalene instead of just invoking python
).
sys.executable is initialised with python_alias_dir / all_python_names[0]
, shouldn't changing the type from Path to string be safe once initialized? sys.executable is a system variable accessed in other modules too. We are not keeping the original sys.executable value simply modifying the new value from Path type to string.
Edit: I understand the test case change should not be there,I have reverted the same
Looks like the required changes were previously implemented; closing.