Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commented Jun 20, 2024

Check for ERROR_INVALID_PARAMETER when calling _winapi.CopyFile2() and raise UnsupportedOperation. In Path.copy(), handle this exception and fall back to the PathBase.copy() implementation.

No news as Path.copy() is brand new.


📚 Documentation preview 📚: https://cpython-previews--120807.org.readthedocs.build/

Check for `ERROR_INVALID_PARAMETER` when calling `_winapi.CopyFile2()` and raise `UnsupportedOperation`. In `Path.copy()`, handle this exception and fall back to the `PathBase.copy()` implementation.
@barneygalebarneygale requested review from eryksun and zoobaJune 27, 2024 18:11
Copy link
Contributor

@eryksuneryksun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for this. 🚀

@barneygale
Copy link
ContributorAuthor

Thank you Eryk!

@barneygalebarneygale merged commit f09d184 into python:mainJul 3, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ython#120807) Check for `ERROR_INVALID_PARAMETER` when calling `_winapi.CopyFile2()` and raise `UnsupportedOperation`. In `Path.copy()`, handle this exception and fall back to the `PathBase.copy()` implementation.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ython#120807) Check for `ERROR_INVALID_PARAMETER` when calling `_winapi.CopyFile2()` and raise `UnsupportedOperation`. In `Path.copy()`, handle this exception and fall back to the `PathBase.copy()` implementation.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@eryksun