-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
tempfile.mkdtemp and pip fail on non-English Windows with 3.13.0b1 #118773
Comments
This looks like it'll be specific to your configuration (at least somewhat) - it doesn't trivially reproduce. If you run |
Result from running ./python -m test -v test_tempfile
Running Debug|x64 interpreter...
== CPython 3.14.0a0 (heads/bump_lib_version:a8d31d432c, May 8 2024, 18:48:28) [MSC v.1933 64 bit (AMD64)]
== Windows-10-10.0.19043-SP0 little-endian
== Python build: debug
== cwd: C:\Users\KIRILL-1\CLionProjects\cpython\build\test_python_worker_23724æ
== CPU count: 16
== encodings: locale=cp1251 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
Using random seed: 3435261986
0:00:00 Run 1 test sequentially
0:00:00 [1/1] test_tempfile
test_nonempty_list (test.test_tempfile.TestCandidateTempdirList.test_nonempty_list) ... ok
test_wanted_dirs (test.test_tempfile.TestCandidateTempdirList.test_wanted_dirs) ... ok
test_exports (test.test_tempfile.TestExports.test_exports) ... ok
test_retval (test.test_tempfile.TestGetCandidateNames.test_retval) ... ok
test_same_thing (test.test_tempfile.TestGetCandidateNames.test_same_thing) ... ok
test_no_files_left_behind (test.test_tempfile.TestGetDefaultTempdir.test_no_files_left_behind) ... ERROR
test_case_sensitive (test.test_tempfile.TestGetTempDir.test_case_sensitive) ... ERROR
test_directory_exists (test.test_tempfile.TestGetTempDir.test_directory_exists) ... ok
test_directory_writable (test.test_tempfile.TestGetTempDir.test_directory_writable) ... ok
test_same_thing (test.test_tempfile.TestGetTempDir.test_same_thing) ... ok
test_sane_template (test.test_tempfile.TestGetTempPrefix.test_sane_template) ... ok
test_usable_template (test.test_tempfile.TestGetTempPrefix.test_usable_template) ... ERROR
test_infer_return_type_multiples (test.test_tempfile.TestLowLevelInternals.test_infer_return_type_multiples) ... ok
test_infer_return_type_multiples_and_none (test.test_tempfile.TestLowLevelInternals.test_infer_return_type_multiples_and_none) ... ok
test_infer_return_type_pathlib (test.test_tempfile.TestLowLevelInternals.test_infer_return_type_pathlib) ... ok
test_infer_return_type_pathlike (test.test_tempfile.TestLowLevelInternals.test_infer_return_type_pathlike) ... ok
test_infer_return_type_singles (test.test_tempfile.TestLowLevelInternals.test_infer_return_type_singles) ... ok
test_basic (test.test_tempfile.TestMkdtemp.test_basic) ... ERROR
test_basic_many (test.test_tempfile.TestMkdtemp.test_basic_many) ... ERROR
test_basic_with_bytes_names (test.test_tempfile.TestMkdtemp.test_basic_with_bytes_names) ... ERROR
test_choose_directory (test.test_tempfile.TestMkdtemp.test_choose_directory) ... ERROR
test_collision_with_existing_directory (test.test_tempfile.TestMkdtemp.test_collision_with_existing_directory) ... ERROR
test_collision_with_existing_file (test.test_tempfile.TestMkdtemp.test_collision_with_existing_file) ... ERROR
test_for_tempdir_is_bytes_issue40701_api_warts (test.test_tempfile.TestMkdtemp.test_for_tempdir_is_bytes_issue40701_api_warts) ... ERROR
test_mode (test.test_tempfile.TestMkdtemp.test_mode) ... ERROR
test_mode_win32 (test.test_tempfile.TestMkdtemp.test_mode_win32) ... ERROR
test_non_directory (test.test_tempfile.TestMkdtemp.test_non_directory) ... ERROR
test_nonexisting_directory (test.test_tempfile.TestMkdtemp.test_nonexisting_directory) ... ERROR
test_path_is_absolute (test.test_tempfile.TestMkdtemp.test_path_is_absolute) ... ERROR
test_read_only_directory (test.test_tempfile.TestMkdtemp.test_read_only_directory) ... ERROR
test_basic (test.test_tempfile.TestMkstemp.test_basic) ... ok
test_basic_with_bytes_names (test.test_tempfile.TestMkstemp.test_basic_with_bytes_names) ... ok
test_choose_directory (test.test_tempfile.TestMkstemp.test_choose_directory) ... ERROR
test_for_tempdir_is_bytes_issue40701_api_warts (test.test_tempfile.TestMkstemp.test_for_tempdir_is_bytes_issue40701_api_warts) ... ok
test_basic (test.test_tempfile.TestMkstempInner.test_basic) ... ok
test_basic_many (test.test_tempfile.TestMkstempInner.test_basic_many) ... ok
test_basic_with_bytes_names (test.test_tempfile.TestMkstempInner.test_basic_with_bytes_names) ... ok
test_choose_directory (test.test_tempfile.TestMkstempInner.test_choose_directory) ... ERROR
test_collision_with_existing_directory (test.test_tempfile.TestMkstempInner.test_collision_with_existing_directory) ... ERROR
test_collision_with_existing_file (test.test_tempfile.TestMkstempInner.test_collision_with_existing_file) ... ERROR
test_file_mode (test.test_tempfile.TestMkstempInner.test_file_mode) ... ok
test_noinherit (test.test_tempfile.TestMkstempInner.test_noinherit) ... minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(50) : Assertion failed: (_osfile(fh) & FOPEN)
ok
test_non_directory (test.test_tempfile.TestMkstempInner.test_non_directory) ... ERROR
test_nonexisting_directory (test.test_tempfile.TestMkstempInner.test_nonexisting_directory) ... ERROR
test_read_only_directory (test.test_tempfile.TestMkstempInner.test_read_only_directory) ... ERROR
test_textmode (test.test_tempfile.TestMkstempInner.test_textmode) ... ok
test_basic (test.test_tempfile.TestMktemp.test_basic) ... ERROR
test_many (test.test_tempfile.TestMktemp.test_many) ... ERROR
test_bad_encoding (test.test_tempfile.TestNamedTemporaryFile.test_bad_encoding) ... ERROR
test_bad_mode (test.test_tempfile.TestNamedTemporaryFile.test_bad_mode) ... ERROR
test_basic (test.test_tempfile.TestNamedTemporaryFile.test_basic) ... ok
test_context_man_not_del_if_delete_false (test.test_tempfile.TestNamedTemporaryFile.test_context_man_not_del_if_delete_false) ... ERROR
test_context_man_not_del_on_close_if_delete_on_close_false (test.test_tempfile.TestNamedTemporaryFile.test_context_man_not_del_on_close_if_delete_on_close_false) ... ERROR
test_context_man_ok_to_delete_manually (test.test_tempfile.TestNamedTemporaryFile.test_context_man_ok_to_delete_manually) ... ERROR
test_context_manager (test.test_tempfile.TestNamedTemporaryFile.test_context_manager) ... ok
test_correct_finalizer_work_if_already_deleted (test.test_tempfile.TestNamedTemporaryFile.test_correct_finalizer_work_if_already_deleted) ... ok
test_creates_named (test.test_tempfile.TestNamedTemporaryFile.test_creates_named) ... ok
test_del_by_finalizer (test.test_tempfile.TestNamedTemporaryFile.test_del_by_finalizer) ... ERROR
test_del_on_close (test.test_tempfile.TestNamedTemporaryFile.test_del_on_close) ... ERROR
test_dis_del_on_close (test.test_tempfile.TestNamedTemporaryFile.test_dis_del_on_close) ... ERROR
test_iter (test.test_tempfile.TestNamedTemporaryFile.test_iter) ... ok
test_method_lookup (test.test_tempfile.TestNamedTemporaryFile.test_method_lookup) ... ok
test_multiple_close (test.test_tempfile.TestNamedTemporaryFile.test_multiple_close) ... ok
test_unexpected_error (test.test_tempfile.TestNamedTemporaryFile.test_unexpected_error) ... ERROR
test_get_eight_char_str (test.test_tempfile.TestRandomNameSequence.test_get_eight_char_str) ... ok
test_many (test.test_tempfile.TestRandomNameSequence.test_many) ... ok
test_process_awareness (test.test_tempfile.TestRandomNameSequence.test_process_awareness) ... skipped 'requires working os.fork()'
test_basic (test.test_tempfile.TestSpooledTemporaryFile.test_basic) ... ok
test_bound_methods (test.test_tempfile.TestSpooledTemporaryFile.test_bound_methods) ... ok
test_class_getitem (test.test_tempfile.TestSpooledTemporaryFile.test_class_getitem) ... ok
test_context_manager_after_rollover (test.test_tempfile.TestSpooledTemporaryFile.test_context_manager_after_rollover) ... ok
test_context_manager_before_rollover (test.test_tempfile.TestSpooledTemporaryFile.test_context_manager_before_rollover) ... ok
test_context_manager_during_rollover (test.test_tempfile.TestSpooledTemporaryFile.test_context_manager_during_rollover) ... ok
test_del_on_close (test.test_tempfile.TestSpooledTemporaryFile.test_del_on_close) ... ERROR
test_del_rolled_file (test.test_tempfile.TestSpooledTemporaryFile.test_del_rolled_file) ... ok
test_del_unrolled_file (test.test_tempfile.TestSpooledTemporaryFile.test_del_unrolled_file) ... ok
test_fileno (test.test_tempfile.TestSpooledTemporaryFile.test_fileno) ... ok
test_iobase_interface (test.test_tempfile.TestSpooledTemporaryFile.test_iobase_interface) ... ok
test_is_iobase (test.test_tempfile.TestSpooledTemporaryFile.test_is_iobase) ... ok
test_multiple_close_after_rollover (test.test_tempfile.TestSpooledTemporaryFile.test_multiple_close_after_rollover) ... ok
test_multiple_close_before_rollover (test.test_tempfile.TestSpooledTemporaryFile.test_multiple_close_before_rollover) ... ok
test_properties (test.test_tempfile.TestSpooledTemporaryFile.test_properties) ... ok
test_rewrite_small (test.test_tempfile.TestSpooledTemporaryFile.test_rewrite_small) ... ok
test_sparse (test.test_tempfile.TestSpooledTemporaryFile.test_sparse) ... ok
test_text_mode (test.test_tempfile.TestSpooledTemporaryFile.test_text_mode) ... ok
test_text_newline_and_encoding (test.test_tempfile.TestSpooledTemporaryFile.test_text_newline_and_encoding) ... ok
test_truncate_with_size_parameter (test.test_tempfile.TestSpooledTemporaryFile.test_truncate_with_size_parameter) ... ok
test_write_sequential (test.test_tempfile.TestSpooledTemporaryFile.test_write_sequential) ... ok
test_writelines (test.test_tempfile.TestSpooledTemporaryFile.test_writelines) ... ok
test_writelines_sequential (test.test_tempfile.TestSpooledTemporaryFile.test_writelines_sequential) ... ok
test_cleanup_with_symlink_flags (test.test_tempfile.TestTemporaryDirectory.test_cleanup_with_symlink_flags) ... skipped 'requires os.chflags'
test_cleanup_with_symlink_modes (test.test_tempfile.TestTemporaryDirectory.test_cleanup_with_symlink_modes) ... skipped 'Requires functional symlink implementation'
test_cleanup_with_symlink_to_a_directory (test.test_tempfile.TestTemporaryDirectory.test_cleanup_with_symlink_to_a_directory) ... skipped 'Requires functional symlink implementation'
test_cleanup_with_used_directory (test.test_tempfile.TestTemporaryDirectory.test_cleanup_with_used_directory) ... ERROR
test_context_manager (test.test_tempfile.TestTemporaryDirectory.test_context_manager) ... ERROR
test_del_on_collection (test.test_tempfile.TestTemporaryDirectory.test_del_on_collection) ... ERROR
test_del_on_collection_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_del_on_collection_ignore_errors)
Test that ignoring errors works when TemporaryDirectory is gced. ... ERROR
test_del_on_shutdown (test.test_tempfile.TestTemporaryDirectory.test_del_on_shutdown) ... ERROR
test_del_on_shutdown_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_del_on_shutdown_ignore_errors)
Test ignoring errors works when a tempdir is gc'ed on shutdown. ... ERROR
test_delete_false (test.test_tempfile.TestTemporaryDirectory.test_delete_false) ... ERROR
test_exit_on_shutdown (test.test_tempfile.TestTemporaryDirectory.test_exit_on_shutdown) ... ERROR
test_explicit_cleanup (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup) ... ERROR
test_explicit_cleanup_correct_error (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup_correct_error) ... ERROR
test_explicit_cleanup_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup_ignore_errors)
Test that cleanup doesn't return an error when ignoring them. ... ERROR
test_flags (test.test_tempfile.TestTemporaryDirectory.test_flags) ... skipped 'requires os.chflags'
test_mkdtemp_failure (test.test_tempfile.TestTemporaryDirectory.test_mkdtemp_failure) ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) ...
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='000') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='100') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='200') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='300') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='400') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='500') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='600') ... ERROR
test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='700') ... ERROR
test_multiple_close (test.test_tempfile.TestTemporaryDirectory.test_multiple_close) ... ERROR
test_warnings_on_cleanup (test.test_tempfile.TestTemporaryDirectory.test_warnings_on_cleanup) ... ERROR
======================================================================
ERROR: test_no_files_left_behind (test.test_tempfile.TestGetDefaultTempdir.test_no_files_left_behind)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 277, in test_no_files_left_behind
with tempfile.TemporaryDirectory() as our_temp_directory:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_case_sensitive (test.test_tempfile.TestGetTempDir.test_case_sensitive)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 614, in test_case_sensitive
case_sensitive_tempdir = tempfile.mkdtemp("-Temp")
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_usable_template (test.test_tempfile.TestGetTempPrefix.test_usable_template)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 570, in test_usable_template
d = tempfile.mkdtemp(prefix="")
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_basic (test.test_tempfile.TestMkdtemp.test_basic)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 748, in test_basic
os.rmdir(self.do_create())
~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 737, in do_create
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_basic_many (test.test_tempfile.TestMkdtemp.test_basic_many)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 774, in test_basic_many
extant[i] = self.do_create(pre="aa")
~~~~~~~~~~~~~~^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 737, in do_create
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_basic_with_bytes_names (test.test_tempfile.TestMkdtemp.test_basic_with_bytes_names)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 757, in test_basic_with_bytes_names
os.rmdir(self.do_create(dir=d))
~~~~~~~~~~~~~~^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 737, in do_create
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_choose_directory (test.test_tempfile.TestMkdtemp.test_choose_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 782, in test_choose_directory
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_collision_with_existing_directory (test.test_tempfile.TestMkdtemp.test_collision_with_existing_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 848, in test_collision_with_existing_directory
with _inside_empty_temp_dir(), \
...<4 lines>...
self.assertTrue(dir2.endswith('bbb'))
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_collision_with_existing_file (test.test_tempfile.TestMkdtemp.test_collision_with_existing_file)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 837, in test_collision_with_existing_file
with _inside_empty_temp_dir(), \
...<5 lines>...
self.assertTrue(dir.endswith('bbb'))
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_for_tempdir_is_bytes_issue40701_api_warts (test.test_tempfile.TestMkdtemp.test_for_tempdir_is_bytes_issue40701_api_warts)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 859, in test_for_tempdir_is_bytes_issue40701_api_warts
path = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_mode (test.test_tempfile.TestMkdtemp.test_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 793, in test_mode
dir = self.do_create()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 737, in do_create
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_mode_win32 (test.test_tempfile.TestMkdtemp.test_mode_win32)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 813, in test_mode_win32
dir = self.do_create()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 737, in do_create
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_non_directory (test.test_tempfile.TestMkdtemp.test_non_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 363, in test_non_directory
with _inside_empty_temp_dir():
...<4 lines>...
self.make_temp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_nonexisting_directory (test.test_tempfile.TestMkdtemp.test_nonexisting_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 356, in test_nonexisting_directory
with _inside_empty_temp_dir():
...<3 lines>...
self.make_temp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_path_is_absolute (test.test_tempfile.TestMkdtemp.test_path_is_absolute)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 885, in test_path_is_absolute
path = tempfile.mkdtemp(dir=".")
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 888, in test_path_is_absolute
os.rmdir(path)
^^^^
UnboundLocalError: cannot access local variable 'path' where it is not associated with a value
======================================================================
ERROR: test_read_only_directory (test.test_tempfile.TestMkdtemp.test_read_only_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 342, in test_read_only_directory
with _inside_empty_temp_dir():
...<10 lines>...
os.chmod(tempfile.tempdir, oldmode)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_choose_directory (test.test_tempfile.TestMkstemp.test_choose_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 681, in test_choose_directory
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_choose_directory (test.test_tempfile.TestMkstempInner.test_choose_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 443, in test_choose_directory
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_collision_with_existing_directory (test.test_tempfile.TestMkstempInner.test_collision_with_existing_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 538, in test_collision_with_existing_directory
with _inside_empty_temp_dir(), \
...<6 lines>...
self.assertTrue(name.endswith('bbb'))
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_collision_with_existing_file (test.test_tempfile.TestMkstempInner.test_collision_with_existing_file)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 525, in test_collision_with_existing_file
with _inside_empty_temp_dir(), \
...<7 lines>...
self.assertTrue(name2.endswith('bbb'))
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_non_directory (test.test_tempfile.TestMkstempInner.test_non_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 363, in test_non_directory
with _inside_empty_temp_dir():
...<4 lines>...
self.make_temp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_nonexisting_directory (test.test_tempfile.TestMkstempInner.test_nonexisting_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 356, in test_nonexisting_directory
with _inside_empty_temp_dir():
...<3 lines>...
self.make_temp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_read_only_directory (test.test_tempfile.TestMkstempInner.test_read_only_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 342, in test_read_only_directory
with _inside_empty_temp_dir():
...<10 lines>...
os.chmod(tempfile.tempdir, oldmode)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\contextlib.py", line 141, in __enter__
return next(self.gen)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 322, in _inside_empty_temp_dir
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_basic (test.test_tempfile.TestMktemp.test_basic)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 897, in setUp
self.dir = tempfile.mkdtemp()
~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_many (test.test_tempfile.TestMktemp.test_many)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 897, in setUp
self.dir = tempfile.mkdtemp()
~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_bad_encoding (test.test_tempfile.TestNamedTemporaryFile.test_bad_encoding)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1161, in test_bad_encoding
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_bad_mode (test.test_tempfile.TestNamedTemporaryFile.test_bad_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1152, in test_bad_mode
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_context_man_not_del_if_delete_false (test.test_tempfile.TestNamedTemporaryFile.test_context_man_not_del_if_delete_false)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1100, in test_context_man_not_del_if_delete_false
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_context_man_not_del_on_close_if_delete_on_close_false (test.test_tempfile.TestNamedTemporaryFile.test_context_man_not_del_on_close_if_delete_on_close_false)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1060, in test_context_man_not_del_on_close_if_delete_on_close_false
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_context_man_ok_to_delete_manually (test.test_tempfile.TestNamedTemporaryFile.test_context_man_ok_to_delete_manually)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1086, in test_context_man_ok_to_delete_manually
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_by_finalizer (test.test_tempfile.TestNamedTemporaryFile.test_del_by_finalizer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1127, in test_del_by_finalizer
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_close (test.test_tempfile.TestNamedTemporaryFile.test_del_on_close)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1011, in test_del_on_close
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_dis_del_on_close (test.test_tempfile.TestNamedTemporaryFile.test_dis_del_on_close)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1023, in test_dis_del_on_close
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_unexpected_error (test.test_tempfile.TestNamedTemporaryFile.test_unexpected_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1168, in test_unexpected_error
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_close (test.test_tempfile.TestSpooledTemporaryFile.test_del_on_close)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1225, in test_del_on_close
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_cleanup_with_used_directory (test.test_tempfile.TestTemporaryDirectory.test_cleanup_with_used_directory)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1684, in test_cleanup_with_used_directory
with tempfile.TemporaryDirectory() as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_context_manager (test.test_tempfile.TestTemporaryDirectory.test_context_manager)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1964, in test_context_manager
d = self.do_create()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_collection (test.test_tempfile.TestTemporaryDirectory.test_del_on_collection)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1815, in test_del_on_collection
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_collection_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_del_on_collection_ignore_errors)
Test that ignoring errors works when TemporaryDirectory is gced.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1828, in test_del_on_collection_ignore_errors
with tempfile.TemporaryDirectory() as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_shutdown (test.test_tempfile.TestTemporaryDirectory.test_del_on_shutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1848, in test_del_on_shutdown
with self.do_create() as dir:
~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_del_on_shutdown_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_del_on_shutdown_ignore_errors)
Test ignoring errors works when a tempdir is gc'ed on shutdown.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1880, in test_del_on_shutdown_ignore_errors
with tempfile.TemporaryDirectory() as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_delete_false (test.test_tempfile.TestTemporaryDirectory.test_delete_false)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 2016, in test_delete_false
with tempfile.TemporaryDirectory(delete=False) as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_exit_on_shutdown (test.test_tempfile.TestTemporaryDirectory.test_exit_on_shutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1917, in test_exit_on_shutdown
with self.do_create() as dir:
~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_explicit_cleanup (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1637, in test_explicit_cleanup
dir = tempfile.mkdtemp()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_explicit_cleanup_correct_error (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup_correct_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1674, in test_explicit_cleanup_correct_error
with tempfile.TemporaryDirectory() as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_explicit_cleanup_ignore_errors (test.test_tempfile.TestTemporaryDirectory.test_explicit_cleanup_ignore_errors)
Test that cleanup doesn't return an error when ignoring them.
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1650, in test_explicit_cleanup_ignore_errors
with tempfile.TemporaryDirectory() as working_dir:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_mkdtemp_failure (test.test_tempfile.TestTemporaryDirectory.test_mkdtemp_failure)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1629, in test_mkdtemp_failure
with tempfile.TemporaryDirectory() as nonexistent:
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='000')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='100')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='200')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='300')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='400')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='500')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='600')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_modes (test.test_tempfile.TestTemporaryDirectory.test_modes) (mode='700')
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1974, in test_modes
d = self.do_create(recurse=3, dirs=2, files=2)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_multiple_close (test.test_tempfile.TestTemporaryDirectory.test_multiple_close)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1957, in test_multiple_close
d = self.do_create()
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
======================================================================
ERROR: test_warnings_on_cleanup (test.test_tempfile.TestTemporaryDirectory.test_warnings_on_cleanup)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1941, in test_warnings_on_cleanup
with self.do_create() as dir:
~~~~~~~~~~~~~~^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\test\test_tempfile.py", line 1607, in do_create
tmp = tempfile.TemporaryDirectory(
dir=dir, prefix=pre, suffix=suf,
ignore_cleanup_errors=ignore_cleanup_errors)
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 882, in __init__
self.name = mkdtemp(suffix, prefix, dir)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KIRILL-1\CLionProjects\cpython\Lib\tempfile.py", line 384, in mkdtemp
_os.mkdir(file, 0o700)
~~~~~~~~~^^^^^^^^^^^^^
OSError: [WinError 1332] No mapping between account names and security IDs was done
----------------------------------------------------------------------
Ran 109 tests in 1.002s
FAILED (errors=57, skipped=5)
test test_tempfile failed
test_tempfile failed (57 errors)
== Tests result: FAILURE ==
1 test failed:
test_tempfile
Total duration: 1.6 sec
Total tests: run=109 skipped=5
Total test files: run=1/1 failed=1
Result: FAILURE |
Can you try running |
PS C:\Users\KIRILL-1\CLionProjects\cpython> icacls "%TEMP%"
%TEMP%: The system cannot find the file specified.
Successfully processed 0 files; Failed processing 1 files
PS C:\Users\KIRILL-1\CLionProjects\cpython> icacls $env:TEMP
C:\Users\KIRILL-1\AppData\Local\Temp NT AUTHORITY\СИСТЕМА:(I)(OI)(CI)(F)
BUILTIN\Администраторы:(I)(OI)(CI)(F)
HOME-PC\KIRILL-1:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
PS C:\Users\KIRILL-1\CLionProjects\cpython> |
Okay, that looks fairly like what I expected (but not what I hoped for!). I'm going to have to do some research into what this error code is caused by, and may have to ask you to try some more things if I can't repro it. |
FWIW, I just started |
@zooba, it's probably because of the localized names of "NT AUTHORITY\SYSTEM" and "BUILTIN\Administrators". I was hoping this wouldn't be an issue, and maybe it isn't. I overlooked that you misclassified the "SYSTEM" account as an alias (i.e. |
Oh that would make sense. I suspected the localised names, but hadn't figured out the actual reason. |
Edit: Actually, hold a minute. With some more reading, I'm betting ADMINISTRATORS is wrong too. @Eclips4 Can you try applying this patch and running the test again? It's one line:
|
"Administrators" is a "BUILTIN" alias group implemented by LSA, not a well-known group in the "NT Authority": >>> LookupAccountName(None, 'SYSTEM')[2] == SidTypeWellKnownGroup
True
>>> LookupAccountName(None, 'Administrators')[2] == SidTypeAlias
True |
I've applied your patch and rebuilt the interpreter, but the error from the test suite remains the same :(. |
This comment was marked as resolved.
This comment was marked as resolved.
This was my first attempt and it didn't work. I'll sleep on it before trying it again - we aren't likely to ship the fix this week (sorry, non-English users), so there's a bit of time. I think my main concern is maintainability, but it's not really any more opaque than the current arrangement. |
This comment was marked as resolved.
This comment was marked as resolved.
Agreed. Not sure what I was getting wrong the first time around, but it's working now. Removing the infrastructure around setting up (As an aside, I'm recommending to the security team that we don't sit on patches in the future while waiting for a release. There will be some nuance, of course, but for most things that we have to deal with I think we're better off having the patch out in the open ASAP and associated with the CVE so that the open-source model can do its job and we end up with better fixes. Unfortunately, the CVE system has "rules" that don't allow this, so we'll likely have to fight with them before we can do it officially...) |
I've updated #118800 to use the SDDL string rather than the far more complicated manual code. It's adapted from my own version of the code rather than Eryk's message (because I didn't see the full one until after I did it!), but I greatly appreciate the confirmation. Looking for a review on the PR before I merge and backport (and merge into my manual backports for 3.8-3.12). |
…s for ACLs. (pythonGH-118800) (cherry picked from commit 8af84b5) Co-authored-by: Steve Dower <[email protected]>
…ACLs. (GH-118800) (cherry picked from commit 8af84b5) Co-authored-by: Steve Dower <[email protected]>
Just updating the title to hopefully help people find this before they report again. |
Bug report
Bug description:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: