Skip to content

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

Merged
barneygale merged 2 commits into
python:mainfrom
barneygale:copy-symlink-win
Jul 3, 2024
Merged

GH-73991: Support copying directory symlinks on older Windows#120807
barneygale merged 2 commits into
python:mainfrom
barneygale:copy-symlink-win

Conversation

@barneygale

@barneygalebarneygale commented Jun 20, 2024

Copy link
Copy Markdown
Contributor

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.
Comment threadLib/pathlib/_os.py
Comment threadLib/pathlib/_os.py Outdated
@barneygale
barneygale requested review from eryksun and zoobaJune 27, 2024 18:11

@eryksuneryksun left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

Thank you Eryk!

@barneygale
barneygale 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