-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_launcher fails on installed 3.11.0rc1 #96076
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
Comments
def py_ini(self, content):
local_appdata = os.environ.get("LOCALAPPDATA")
if not local_appdata:
raise unittest.SkipTest("LOCALAPPDATA environment variable is "
"missing or empty")
return PreservePyIni(Path(local_appdata) / "py.ini", content) |
If you run the tests as admin, do they pass? If they're failing because they can't write the required This seems to be a test-only issue, so it could go into 3.11.0 safely enough, or can also wait until 3.11.1 safely enough. |
Failing to write to the file should be handled, but also change |
As I said above, pass as admin. As user, I have no problem running as user with 'py', 'py -3.10 ...', 'py -m ...'. I am curious whether there any 'py ...' operation that writes the .ini. Anyway, Eryk's patch fixes the issue nicely. I'll make a PR, credit Eryk, and assign to Steve to decide whether to change anything and when to merge. EDIT: I spoke too soon as I needed to test on the installed 3.11 that failed before. But same result of pass with only skips being for 2.7 and 32-bit 3.x. Does the test run with repository main use the installed py.ini or a local one without a permission issue? |
Test is new in 3.11. It failed with an all-user (admin) install on Windows when run by non-admin user. Fix tested in same conditions as failure. Patch authored by Eryksun.
The launcher only reads from the "py.ini" file(s). It first tries the user .ini file. If it doesn't exist or doesn't define the command name in the target section (either "defaults" or "commands"), then the launcher tries the .ini that's beside the executable.
The tests check
Even with the change to write to the user "py.ini", |
….ini (pythonGH-96091) Patch authored by Eryksun. (cherry picked from commit 216ccac) Co-authored-by: Terry Jan Reedy <[email protected]>
…H-96091) Patch authored by Eryksun. (cherry picked from commit 216ccac) Co-authored-by: Terry Jan Reedy <[email protected]>
Close? or more to do? |
….ini (pythonGH-96091) Patch authored by Eryksun.
@zooba The new-in-3.11 test_launcher fails when run from the non-admin account used to install. It runs when I run command prompt as admin. I believe I installed for all users, which required the admin pin, and checked to (re)install the py launcher, to get any changes.
@pablogsal What is the policy with regard to installed-only failures like this?
Most test_py* tests and a couple of others fail with
If there is no way to make these tests pass, perhaps they could be skipped and 1, not 13, suggestions given to run as admin to completely test the py launcher.
The text was updated successfully, but these errors were encountered: