Skip to content
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

GH-73991: Support copying directory symlinks on older Windows #120807

Merged
merged 2 commits into from
Jul 3, 2024

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.
Lib/pathlib/_os.py Outdated Show resolved Hide resolved
Lib/pathlib/_os.py Outdated Show resolved Hide resolved
@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
33 checks passed
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