-
Notifications
You must be signed in to change notification settings - Fork 103
Description
I was looking at the readme, and saw this
At runtime, check whether a possibly unsupported Windows API function exists on the current system and use an alternative if it does not.
In nearly every case, the newer functions unnecessarily complicate things, and I think having the code to switch between new function and old function is just worse than only using the old function. There may be some cases where you get better performance with a newer function, but Python isn't very performant anyways, and from my understanding, nothing touched here in the patch actually impacts performance in any meaningful amount.
For Python 3.9+, include the file api-ms-win-core-path-l1-1-0.dll in the distribution. This file was obtained from https://github.com/adang1345/api-ms-win-core-path and is necessary for Python to run on older Windows versions.
In the past I just used original Python because I only ever needed the portable version, or to run a packaged application, and I would just manually do this myself. I never used this, because if you're building it yourself and repackaging it, you should fix the root cause (requiring this dll) instead of packaging a workaround. Unless this is actually required for core functionality and a massive effort to undo/replace (I highly doubt), or compiler hell makes it very hard or impossible to do (Usually only pre-Vista).
I did some research and it first started on 3.9.0a3 (3.9.0a4 is the first to not run), and I pretty quickly found this. python/cpython@6a65eba Which literally goes back to the first point. Why do they do both? I'd just remove the mentions of pathcch and replace the PathCchCombineEx and PathCchCanonicalizeEx code with their older counterparts.
I actually missed the above commit at first because I filtered out commits that affected earlier than 3.8, but this also was something fixed on 3.8 and earlier, although in a different way python/cpython@ad4a20b