Vendoring process fails on Windows
See original GitHub issueEnvironment
- pip version: master
- Python version: 3.8
- OS: Windows 10
Description
Running tox -e vendoring
fails on Windows.
The reason for the failure seems to be newline normalization – see https://github.com/pypa/pip/commit/5563141d58bc17d5fab3bf4ca1649e136e25696c/checks/396942169/logs (from #7611). The patching process failed and vendoring
(the tool) did not error out immediately. The git diff --exit-code
catches the problem though. 😃
Expected behavior
tox -e vendoring
should work on all platforms.
How to Reproduce
- Checkout pip’s current master on Windows.
- Run
tox -e vendoring
- An error occurs.
Output
From the logs linked above, the relevant lines are:
2020-01-18T18:29:27.6652039Z Running git apply --verbose 'tools\automation\vendoring\patches\requests.patch'
2020-01-18T18:29:27.6652131Z error: corrupt patch at line 7
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
nox -s vendoring -- --upgrade fails on Windows #9462 - GitHub
Using nox -s vendoring -- --upgrade on Windows, causes extra newlines to be added to vendor.txt , resulting in the process failing.
Read more >Microsoft Vendor process - some issues and how I resolved ...
Once again – the process failed. During the Microsoft vendor process, the system asks for your IBAN number, and then it does a...
Read more >install failed. please contact your software vendor
1) failing to open a pdf file. the message ' install failed. please contact your software vendor' appeared. I have already had adobe...
Read more >How to troubleshoot Windows Installer errors - Microsoft Support
Describes how to troubleshoot problems that occur when you install, uninstall, or upgrade a program on a Windows-based computer by using Windows Installer....
Read more >Get help with Windows upgrade and installation errors
See some of the most common upgrade and installation errors for Windows 10 and Windows 11, and what you can do to try...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d prefer to go with native line endings, as that’s less likely to have odd side-effects (even though most editors work fine with
\n
line endings, they typically default to\r\n
for new files).Treating patch files as special makes more sense to me, because, well, they are - the patch utilities are what don’t handle mixed line endings cleanly.
Actually, it looks like the problem is far simpler than all this - when we moved the patches from
tasks
totools/automation
, the.gitattributes
file wasn’t updated! I’ve just filed #7641 to fix this - it works on my PC, but if anyone else can test it as well, that would be great (I may not wait for confirmation from others before merging - it’s the right change to make regardless).Yup!