nixpkgs/pkgs/applications/version-management/git-repo/import-ssl-module.patch
Michael Weiss 14e53a0508
gitRepo: Rewrite the "urllib.request.urlopen" patch for Python 3
The old variant is still working but setting "cafile" is deprecated
since version 3.6 [0] and generates a warning:
DeprecationWarning: cafile, capath and cadefault are deprecated, use a custom context instead.

But without this patch "fetchRepoProject" still fails with
"error no host given" (see 337380ea1de).

[0]: https://docs.python.org/3.7/library/urllib.request.html#urllib.request.urlopen
2020-02-05 21:34:49 +01:00

11 lines
227 B
Diff

--- a/repo 2020-02-05 21:11:52.773854798 +0100
+++ b/repo 2020-02-05 21:12:34.018329462 +0100
@@ -137,6 +137,7 @@
import stat
import subprocess
import sys
+import ssl
if sys.version_info[0] == 3:
import urllib.request