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鈥檒l 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
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.

None yet

2 participants