]> git.pld-linux.org Git - packages/python-urllib3.git/blobdiff - python-urllib3-mock.patch
- docs build requires mock module: ensure using python3, added mock patch to use...
[packages/python-urllib3.git] / python-urllib3-mock.patch
diff --git a/python-urllib3-mock.patch b/python-urllib3-mock.patch
new file mode 100644 (file)
index 0000000..b869893
--- /dev/null
@@ -0,0 +1,14 @@
+--- urllib3-1.24.1/docs/conf.py.orig   2018-10-05 23:00:05.000000000 +0200
++++ urllib3-1.24.1/docs/conf.py        2018-12-02 09:35:52.593757249 +0100
+@@ -27,7 +27,10 @@
+ # Mock some expensive/platform-specific modules so build will work.
+ # (https://read-the-docs.readthedocs.io/en/latest/faq.html#\
+ #  i-get-import-errors-on-libraries-that-depend-on-c-modules)
+-import mock
++try:
++    import mock
++except ImportError:
++    from unittest import mock
+ class MockModule(mock.Mock):
This page took 0.066483 seconds and 4 git commands to generate.