GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-81881: Raise a shutil.SpecialFileError when copying a Unix socket by AWhetter · Pull Request #16575 · python/cpython Conversation
|
|
Thanks for the PR @AWhetter! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I would maybe just change the NEWS entry to be less wordy:
:func:`shutil.copyfile` always raises a :exc:`shutil.SpecialFileError` when trying to copy a Unix socket.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Good idea. I'll get that changed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think it helps everyone follow the flow of the PR when things aren't force pushed and history isn't rewritten. It will get squashed in the end, anyways! I just break up my commits so that the individual diffs are easy to follow. So if I'm editing and moving a function, I'll do those in separate commits in order to preserve an easy-to-follow storyline. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Similar to the issue mentioned in bpo-37701, this raises |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| else: | ||
| self.fail("shutil.Error should have been raised") | ||
| finally: | ||
| shutil.rmtree(TESTFN2, ignore_errors=True) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessary as per:
self.addCleanup(shutil.rmtree, TESTFN, ignore_errors=True)
...some lines above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| shutil.rmtree(TESTFN2, ignore_errors=True) | ||
|
|
||
| @unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'requires socket.AF_UNIX') | ||
| def test_copytree_socket(self): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
IMO testing also copytree() is not very useful since internally it uses copyfile (which you are testing).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I was copying what was done for named pipes for consistency. But having a test for copytree() makes sense to me because if in the future copytree() stopped using copyfile() for some reason, we would still want copytree() to raise an error?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| *dst* and return *dst* in the most efficient way possible. | ||
| *src* and *dst* are path-like objects or path names given as strings. | ||
|
|
||
| When *src* is a named pipe or a Unix socket, a :exc:`SpecialFileError` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
- When *src* is a named pipe or a Unix socket, a :exc:`SpecialFileError` + When *src* is a named pipe or a Unix socket, :exc:`SpecialFileError`
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes! @giampaolo: please review the changes made to this pull request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is there anything else that I can do to help progress this review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@giampaolo can this PR be unblocked? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@arhadthedev thanks for the quick response! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.