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
Pathlib crashes when os module is missing 'link' method #82992
Comments
Just an FYI a raised exception isn't considered a crash. For us a crash is a C-level crash like a segfault. |
Right, sure, that makes sense; thanks for clarifying :) |
The change failed on x86 Windows7 3.x buildbot: Moreover, PR 17170 was merged whereas the CLA was not signed. So I created PR 17219 to revert the change to fix the Windows 7 failure and to wait until the CLA is signed. ====================================================================== Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_pathlib.py", line 2031, in test_symlink_to_not_implemented
link.symlink_to(target)
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\pathlib.py", line 1395, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\fileA' -> 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\dirA\\linkAA' ====================================================================== Traceback (most recent call last):
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_pathlib.py", line 2031, in test_symlink_to_not_implemented
link.symlink_to(target)
File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\pathlib.py", line 1395, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\fileA' -> 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\dirA\\linkAA' |
Thanks Toke Høiland-Jørgensen! I merged your fix. I don't really get why the Debian/Ubuntu image on Travis CI didn't get os.link() function, but I'm not really intersted to dig into this question. It's fine to simply skip the feature if it's not available, we do that in many places in Python. I asked Toke Høiland-Jørgensen to revert his changes about os.symlink(): the pathlib code to handle missing os.symlink() seems to be broken, but it also seems like Python no longer support platforms without os.symlink(). Only old Windows version didn't support os.symlink(), but Python don't support these versions anymore. I merged the os.link() change into master and made a 3.8 backport which will be merged automatically soon. I close the issue. |
If someone cares about the missing os.symlink code path: please open a separated issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: