about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-repo/import-ssl-module.patch
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-02-05 21:25:08 +0100
committerMichael Weiss <dev.primeos@gmail.com>2020-02-05 21:34:49 +0100
commit14e53a05086150e38e9ea7e8e584c5cf6281db8f (patch)
treeed48216a1b393b57484beed4d615f306189927ec /pkgs/applications/version-management/git-repo/import-ssl-module.patch
parent87c12d7dd1c163ff36ac9c03a00d0dc65cd85920 (diff)
downloadnixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar.gz
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar.bz2
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar.lz
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar.xz
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.tar.zst
nixlib-14e53a05086150e38e9ea7e8e584c5cf6281db8f.zip
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
Diffstat (limited to 'pkgs/applications/version-management/git-repo/import-ssl-module.patch')
-rw-r--r--pkgs/applications/version-management/git-repo/import-ssl-module.patch10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-repo/import-ssl-module.patch b/pkgs/applications/version-management/git-repo/import-ssl-module.patch
new file mode 100644
index 000000000000..783a2c17dee9
--- /dev/null
+++ b/pkgs/applications/version-management/git-repo/import-ssl-module.patch
@@ -0,0 +1,10 @@
+--- 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