You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
We don't have a dedicated Windows bot with disabled symlinks #454
Given that no-symlinks (i.e. “developer mode” disabled) is the default on Widows, we should probably have a dedicated builder for it.
Strange, I don't recall that I changed this option in my Windows 11 VM and I can create symlinks. Does test.pythoninfo log this "Windows Developer Mode" info?
I'm curious, do you have info on this mode, how to check if it's enabled or not, and how to turn it on or off?
However, if you're writing software with Visual Studio on a computer for the first time, you will need to enable Developer Mode on both the development PC and on any devices you'll use to test your code.
Ah. Maybe installed Visual Studio installs it. So any Windows machine where Python is built with VS has this mode enabled? Good to know.
The issue title is:
We don't have a dedicated Windows bot with disabled symlinks #454
How would Python be built in this case? If VS requires the developer mode to be enabled?
Or another kind of test is needed: get pre-built Python, run tests. That's way more complicated than just "set up a Windows buildbot" since something should frequently build Python on Windows with whatever is needed to run tests (including Python source code?).
From what I saw, os.symlink() is allowed if the user is running with Administrator rights or if the Developer Mode is enabled.
I checked again my Windows 11 VM: in fact, the Developer Mode was disabled, and os.symlink() was disallowed. Moreover, can_symlink() of test.support.os_helper returns False as expected. If I enable the Developer Mode, os.symlink() works as expected, and can_symlink() returns True.
I checked again my Windows 11 VM: in fact, the Developer Mode was disabled, and os.symlink() was disallowed. Moreover, can_symlink() of test.support.os_helper returns False as expected. If I enable the Developer Mode, os.symlink() works as expected, and can_symlink() returns True.
Oh. I got confused by something...
I'm mostly working on Windows via SSH. But SSH logs me as an administrator. In this case, can_symlink() returns True, even if the Developer Mode is enabled :-) I modified my PR to also log if the user is an adminstrator or not.
Activity
vstinner commentedon Jan 16, 2024
Strange, I don't recall that I changed this option in my Windows 11 VM and I can create symlinks. Does test.pythoninfo log this "Windows Developer Mode" info?
I'm curious, do you have info on this mode, how to check if it's enabled or not, and how to turn it on or off?
encukou commentedon Jan 16, 2024
How did you install the VM? Is it a development image?
I suggest that you search the Web for Windows developer mode; when it comes to info about Windows, its better than asking me :)
vstinner commentedon Jan 16, 2024
Hum, I don't recall. Maybe yes, maybe no.
https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development says:
Ah. Maybe installed Visual Studio installs it. So any Windows machine where Python is built with VS has this mode enabled? Good to know.
The issue title is:
How would Python be built in this case? If VS requires the developer mode to be enabled?
Or another kind of test is needed: get pre-built Python, run tests. That's way more complicated than just "set up a Windows buildbot" since something should frequently build Python on Windows with whatever is needed to run tests (including Python source code?).
encukou commentedon Jan 16, 2024
Well,
AMD64 Windows11 Refleakscaught the issue, so it must be possible somehow :)Perhaps you can disable it after installing Visual Studio.
vstinner commentedon Jan 16, 2024
Oh. That's even more interesting.
vstinner commentedon Jan 16, 2024
I wrote python/cpython#114121 to log the Windows Developer Mode in test.pythoninfo.
From what I saw, os.symlink() is allowed if the user is running with Administrator rights or if the Developer Mode is enabled.
I checked again my Windows 11 VM: in fact, the Developer Mode was disabled, and os.symlink() was disallowed. Moreover,
can_symlink()oftest.support.os_helperreturns False as expected. If I enable the Developer Mode, os.symlink() works as expected, andcan_symlink()returns True.vstinner commentedon Jan 16, 2024
Oh. I got confused by something...
I'm mostly working on Windows via SSH. But SSH logs me as an administrator. In this case, can_symlink() returns True, even if the Developer Mode is enabled :-) I modified my PR to also log if the user is an adminstrator or not.