-
-
Notifications
You must be signed in to change notification settings - Fork 312
Handle safe_copy failing to hardlink on Windows due to too many existing links#2394
Handle safe_copy failing to hardlink on Windows due to too many existing links #2394akrieger wants to merge 1 commit into
Conversation
@akrieger thanks for the effort here. Much more is required however. In short, Pex does not support Windows yet. There is more recent commentary here: #259 (comment) but one very broken thing is file locking which Pex relies on in its cache handling. That is currently Posix-only. There are many other issues though, including handling venv .exe console script wrappers and more.
My basic stance is that I need green CI on a platform to support that platform. We don't have CI setup for Windows yet. I put a fair chunk of effort towards this in https://github.com/jsirois/pex/tree/Windows/wip ~2 years ago. I'm picking that up again, but you'll truly know when Pex supports Windows by looking here in the "Operating System" section: https://pypi.org/project/pex/ (or here:
Lines 38 to 40 in 1921ba4
akrieger
commented
Apr 11, 2024
Well, I wrote this because it fixed an issue we were having and I wanted to make sure no one else it hit too. When the project is ready to merge this, it'll be available.
jsirois
commented
Apr 12, 2024
Thanks. I'll make sure to include this in the initial Windows support release.
Well, I wrote this because it fixed an issue we were having and I wanted to make sure no one else it hit too.
The thing is, no one at all should be using Pex on Windows right now. I can't support it sanely without (green) CI or a Windows-using prospective Pex user providing that green CI baseline.
akrieger
commented
Apr 15, 2025
It seems like there is some work around Windows builds recently :)
jsirois
commented
Apr 15, 2025
It seems like there is some work around Windows builds recently :)
There has been, but man is it painful. The filesystem differences from Posix are brutal to come to grips with when your app really uses the filesystem, like Pex does.
Windows does support hard links, and os.link() supports Windows as of Python 3.2. There is a specific error that can be thrown on Windows when you try to create too many hardlinks to a file. Handle that case explicitly in its own test. It's more precise than trying to infer an errno for it which may be mapped to by various kinds of errors.