Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour between win & linux, this also clashes with lo… #789

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alphabetagamer
Copy link

@alphabetagamer alphabetagamer commented Mar 5, 2024

…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")

@emeryberger
Copy link
Member

Can you discuss this here esp. in light of the discussion and commits? #784

@emeryberger emeryberger self-assigned this Mar 6, 2024
@emeryberger
Copy link
Member

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).

@alphabetagamer
Copy link
Author

alphabetagamer commented Mar 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants