GeezerVison is showing github.com — GH-109187: Improve symlink loop handling in `pathlib.Path.resolve()` by barneygale · Pull Request #109192 · python/cpython
Conversation
barneygale
commented
Sep 9, 2023
•
edited by github-actions
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ve()`
Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.
barneygale
commented
Sep 23, 2023
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Hey @zooba, please could you review this if you have the time/inclination? It's a sort-of follow-up to #25264, which you reviewed a couple years ago. No worries if not! Thank you.
Previously we decided to raise RuntimeError from Path.resolve(), regardless of the value of strict, when a symlink loop was encountered. This behaviour differs from os.path.realpath(), but maintains compatibility with older pathlib.
Now we're looking at adding a new PathBase class with its own resolve() method, which provides an additional incentive to straighten out how symlink loops are handled, and makes the minor backwards compatibility break worthwhile IMHO.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot s390x Debian 3.x has failed when building commit ecd813f.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/49/builds/6673) and take a look at the build logs.
- Check if the failure is related to this commit (ecd813f) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/49/builds/6673
Failed tests:
Failed subtests:
- test_freeze_simple_script - test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_tools/test_freeze.py", line 32, in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script, outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Tools/freeze/test/freeze.py", line 146, in prepare
copy_source_tree(srcdir, SRCDIR)
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Tools/freeze/test/freeze.py", line 95, in copy_source_tree
shutil.copytree(oldroot, newroot, ignore=ignore_non_src)
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/shutil.py", line 588, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/shutil.py", line 542, in _copytree
raise Error(errors)
shutil.Error: [('/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/build/test_python_3316406æ/test_python_qj_0d1oo.sock', '/tmp/test_python_qsnyutqh/tmpcgick913/cpython/build/test_python_3316406æ/test_python_qj_0d1oo.sock', "[Errno 6] No such device or address: '/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/build/test_python_3316406æ/test_python_qj_0d1oo.sock'")]
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Debian root 3.x has failed when building commit ecd813f.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/345/builds/5925) and take a look at the build logs.
- Check if the failure is related to this commit (ecd813f) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/all/#builders/345/builds/5925
Failed tests:
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1287, in test_stress_delivery_dependent
self.assertEqual(len(sigs), N, "Some signals were lost")
AssertionError: 4525 != 10000 : Some signals were lost
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
csm10495
pushed a commit
to csm10495/cpython
that referenced
this pull request
Sep 28, 2023
…ve()` (pythonGH-109192)
Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
…ve()` (pythonGH-109192)
Treat symlink loops like other errors: in strict mode, raise `OSError`, and
in non-strict mode, do not raise any exception.
Reviewers
zooba
zooba approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|