question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vendoring process fails on Windows

See original GitHub issue

Environment

  • 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

  1. Checkout pip’s current master on Windows.
  2. Run tox -e vendoring
  3. 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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pfmoorecommented, Jan 23, 2020

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 to tools/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).

0reactions
pradyunsgcommented, Feb 3, 2020

Yup!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found