Skip to content

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale 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.
@barneygale barneygale requested review from zooba and eryksun June 27, 2024 18:11
Copy link
Contributor

@eryksun eryksun 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
Contributor Author

Thank you Eryk!

@barneygale barneygale merged commit f09d184 into python:main Jul 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 free to 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