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
importlib.metadata test fails on Windows if symlinks aren't allowed #114107
test_packages_distributions_symlinked_top_level (test.test_importlib.test_main.PackagesDistributionsTest.test_packages_distributions_symlinked_top_level)
Distribution is resolvable from a simple top-level symlink in RECORD. ... ERROR
======================================================================
ERROR: test_packages_distributions_symlinked_top_level (test.test_importlib.test_main.PackagesDistributionsTest.test_packages_distributions_symlinked_top_level)
Distribution is resolvable from a simple top-level symlink in RECORD.
----------------------------------------------------------------------
Traceback (most recent call last):
File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_importlib\test_main.py", line 424, in test_packages_distributions_symlinked_top_level
fixtures.build_files(files, self.site_dir)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_importlib\_path.py", line 70, in build
create(contents, _ensure_tree_maker(prefix) / name)
~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\functools.py", line 911, in wrapperreturn dispatch(args[0].__class__)(*args, **kw)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\test\test_importlib\_path.py", line 91, in _
path.symlink_to(content)
~~~~~~~~~~~~~~~^^^^^^^^^
File "b:\uildarea\3.x.ware-win11.refleak\build\Lib\pathlib\__init__.py", line 806, in symlink_to
os.symlink(target, self, target_is_directory)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^OSError: [WinError 1314] A required privilege is not held by the client: '.symlink.target' -> 'b:\\uildworker_temp\\test_python_sby1_qjd\\tmp16dtmklg\\symlinked'
The test needs to be skipped when symlinks are not supported.
On python/buildmaster-config#454 I asked how to know if the Windows Developer Mode is enabled or not. I wrote #114121 which reads a registry value to log the state in test.pythoninfo.
@jaraco, do you have any comments?
I know importlib_resources is maintained as a backport repo, but I don't know the details of the workflow. As it is, the fix might cause issues in importlib_resources.
Ah, the Windows developer mode was not logged after my change. Maybe the registry key does not always exist on Windows 10.
Is this issue good to close now?
I let @encukou and @jaraco decide. At least, I can say that test_packages_distributions_symlinked_top_level() of Lib/test/test_importlib/test_main.py only exists in the main branch and was fixed.
changed the title [-]importlib.resources test fails on Windows if symlinks aren't allowed[/-][+]importlib.metadata test fails on Windows if symlinks aren't allowed[/+]on Mar 20, 2024
Activity
pythongh-114107: Fix symlink test if symlinks aren't supported
encukou commentedon Jan 16, 2024
This breaks a stable buildbot of a tier 1 platform. Per PEP-11, buildbot failures a any breakage should be fixed or reverted immediately.
I plan to skip the test with a
test.supporthelper; later we can find a fix more compatible with theimportlib_resourcesexternal repo.gh-114107: Fix importlib.resources symlink test if symlinks aren't su…
pythongh-114107: test.pythoninfo logs Windows Developer Mode
vstinner commentedon Jan 16, 2024
On python/buildmaster-config#454 I asked how to know if the Windows Developer Mode is enabled or not. I wrote #114121 which reads a registry value to log the state in test.pythoninfo.
gh-114107: test.pythoninfo logs Windows Developer Mode (#114121)
pythongh-114107: test.pythoninfo logs Windows Developer Mode (pythonG…
pythongh-114107: test.pythoninfo logs Windows Developer Mode (pythonG…
[3.11] gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121
[3.12] gh-114107: test.pythoninfo logs Windows Developer Mode (GH-114121
itamaro commentedon Jan 17, 2024
Is this issue good to close now?
encukou commentedon Jan 17, 2024
@jaraco, do you have any comments?
I know
importlib_resourcesis maintained as a backport repo, but I don't know the details of the workflow. As it is, the fix might cause issues inimportlib_resources.vstinner commentedon Jan 17, 2024
Build 648 of AMD64 Windows11 Refleaks 3.x passed. test.pythoninfo:
Ah, the Windows developer mode was not logged after my change. Maybe the registry key does not always exist on Windows 10.
I let @encukou and @jaraco decide. At least, I can say that test_packages_distributions_symlinked_top_level() of Lib/test/test_importlib/test_main.py only exists in the main branch and was fixed.
pythongh-114107: Fix importlib.resources symlink test if symlinks are…
pythongh-114107: test.pythoninfo logs Windows Developer Mode (python#…
pythongh-114107: Fix importlib.resources symlink test if symlinks are…
pythongh-114107: test.pythoninfo logs Windows Developer Mode (python#…
[-]importlib.resources test fails on Windows if symlinks aren't allowed[/-][+]importlib.metadata test fails on Windows if symlinks aren't allowed[/+]jaraco commentedon Aug 13, 2024
Sorry for the delay in review. I only just today managed to stumble on the notification.
I see I've already found the change in
importlib.metadatatests and they've been ported toimportlib_metadata, so it's all good.Thanks both for your help on this matter.
pythongh-114107: Fix importlib.resources symlink test if symlinks are…
pythongh-114107: test.pythoninfo logs Windows Developer Mode (python#…