]> git.pld-linux.org Git - packages/python-urllib3.git/blame - python-urllib3-mock.patch
- updated to 1.25.11 (last compatible with requests 2.23.x)
[packages/python-urllib3.git] / python-urllib3-mock.patch
CommitLineData
70df9369
JB
1--- urllib3-1.24.1/docs/conf.py.orig 2018-10-05 23:00:05.000000000 +0200
2+++ urllib3-1.24.1/docs/conf.py 2018-12-02 09:35:52.593757249 +0100
3@@ -27,7 +27,10 @@
4 # Mock some expensive/platform-specific modules so build will work.
5 # (https://read-the-docs.readthedocs.io/en/latest/faq.html#\
6 # i-get-import-errors-on-libraries-that-depend-on-c-modules)
7-import mock
8+try:
9+ import mock
10+except ImportError:
11+ from unittest import mock
12
13
14 class MockModule(mock.Mock):
f5006321
JB
15--- urllib3-1.25.9/test/test_connection.py.orig 2020-04-16 14:42:30.000000000 +0200
16+++ urllib3-1.25.9/test/test_connection.py 2020-06-07 22:20:50.841614447 +0200
17@@ -1,5 +1,8 @@
18 import datetime
19-import mock
20+try:
21+ import mock
22+except ImportError:
23+ from unittest import mock
24
25 import pytest
26
b07e9d23
JB
27--- urllib3-1.25.11/test/test_connectionpool.py.orig 2020-10-19 16:17:05.000000000 +0200
28+++ urllib3-1.25.11/test/test_connectionpool.py 2021-02-14 14:23:15.248962491 +0100
29@@ -2,7 +2,10 @@
30
31 import ssl
32 import pytest
33-from mock import Mock
34+try:
35+ from mock import Mock
36+except ImportError:
37+ from unittest.mock import Mock
38
39 from urllib3.connectionpool import (
40 connection_from_url,
f5006321
JB
41--- urllib3-1.25.9/test/test_queue_monkeypatch.py.orig 2020-04-16 14:42:30.000000000 +0200
42+++ urllib3-1.25.9/test/test_queue_monkeypatch.py 2020-06-07 22:31:23.954851245 +0200
43@@ -1,6 +1,9 @@
44 from __future__ import absolute_import
45
46-import mock
47+try:
48+ import mock
49+except ImportError:
50+ from unittest import mock
51
52 import pytest
53
54--- urllib3-1.25.9/test/test_response.py.orig 2020-04-16 14:42:30.000000000 +0200
55+++ urllib3-1.25.9/test/test_response.py 2020-06-07 22:25:48.023337809 +0200
56@@ -7,7 +7,10 @@
57 from io import BytesIO, BufferedReader, TextIOWrapper
58
59 import pytest
60-import mock
61+try:
62+ import mock
63+except ImportError:
64+ from unittest import mock
65 import six
66
67 from urllib3.response import HTTPResponse, brotli
b07e9d23
JB
68--- urllib3-1.25.11/test/test_retry.py.orig 2021-02-14 13:38:08.446959829 +0100
69+++ urllib3-1.25.11/test/test_retry.py 2021-02-14 13:39:36.619815489 +0100
70@@ -1,4 +1,7 @@
f5006321
JB
71-import mock
72+try:
73+ import mock
74+except ImportError:
75+ from unittest import mock
76 import pytest
f5006321 77
b07e9d23 78 from urllib3.response import HTTPResponse
f5006321
JB
79--- urllib3-1.25.9/test/test_ssl.py.orig 2020-04-16 14:42:30.000000000 +0200
80+++ urllib3-1.25.9/test/test_ssl.py 2020-06-07 22:22:15.301156891 +0200
81@@ -1,4 +1,7 @@
82-import mock
83+try:
84+ import mock
85+except ImportError:
86+ from unittest import mock
87 import pytest
88 from urllib3.util import ssl_
89 from urllib3.exceptions import SNIMissingWarning
90--- urllib3-1.25.9/test/test_util.py.orig 2020-04-16 14:42:30.000000000 +0200
91+++ urllib3-1.25.9/test/test_util.py 2020-06-07 22:21:18.341465468 +0200
92@@ -7,7 +7,10 @@
93 import socket
94 from itertools import chain
95
96-from mock import patch, Mock
97+try:
98+ from mock import patch, Mock
99+except ImportError:
100+ from unittest.mock import patch, Mock
101 import pytest
102
103 from urllib3 import add_stderr_logger, disable_warnings
104--- urllib3-1.25.9/test/contrib/test_pyopenssl.py.orig 2020-04-16 14:42:30.000000000 +0200
105+++ urllib3-1.25.9/test/contrib/test_pyopenssl.py 2020-06-07 22:30:33.011793894 +0200
106@@ -1,7 +1,10 @@
107 # -*- coding: utf-8 -*-
108 import os
109
110-import mock
111+try:
112+ import mock
113+except ImportError:
114+ from unittest import mock
115 import pytest
116
117 try:
118--- urllib3-1.25.9/test/contrib/test_pyopenssl_dependencies.py.orig 2020-04-16 14:42:30.000000000 +0200
119+++ urllib3-1.25.9/test/contrib/test_pyopenssl_dependencies.py 2020-06-07 22:31:07.291608185 +0200
120@@ -1,7 +1,10 @@
121 # -*- coding: utf-8 -*-
122 import pytest
123
124-from mock import patch, Mock
125+try:
126+ from mock import patch, Mock
127+except ImportError:
128+ from unittest.mock import patch, Mock
129
130 try:
131 from urllib3.contrib.pyopenssl import inject_into_urllib3, extract_from_urllib3
132--- urllib3-1.25.9/test/with_dummyserver/test_connectionpool.py.orig 2020-04-16 14:42:30.000000000 +0200
133+++ urllib3-1.25.9/test/with_dummyserver/test_connectionpool.py 2020-06-07 22:20:19.205119170 +0200
134@@ -6,7 +6,10 @@
135 import warnings
136 import pytest
137
138-import mock
139+try:
140+ import mock
141+except ImportError:
142+ from unittest import mock
143
144 from .. import TARPIT_HOST, VALID_SOURCE_ADDRESSES, INVALID_SOURCE_ADDRESSES
145 from ..port_helpers import find_unused_port
146--- urllib3-1.25.9/test/with_dummyserver/test_https.py.orig 2020-04-16 14:42:30.000000000 +0200
147+++ urllib3-1.25.9/test/with_dummyserver/test_https.py 2020-06-07 22:18:03.172522789 +0200
148@@ -8,7 +8,10 @@
149 import tempfile
150 import warnings
151
152-import mock
153+try:
154+ import mock
155+except ImportError:
156+ from unittest import mock
157 import pytest
158 import trustme
159
160--- urllib3-1.25.9/test/with_dummyserver/test_socketlevel.py.orig 2020-04-16 14:42:30.000000000 +0200
161+++ urllib3-1.25.9/test/with_dummyserver/test_socketlevel.py 2020-06-07 22:18:29.705712380 +0200
162@@ -44,7 +44,10 @@
163 import shutil
164 import ssl
165 import tempfile
166-import mock
167+try:
168+ import mock
169+except ImportError:
170+ from unittest import mock
171
172 import pytest
173 import trustme
This page took 0.102165 seconds and 4 git commands to generate.