]> git.pld-linux.org Git - packages/python-urllib3.git/blame_incremental - python-urllib3-mock.patch
rebuild with python 3.10
[packages/python-urllib3.git] / python-urllib3-mock.patch
... / ...
CommitLineData
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):
15--- urllib3-1.26.2/test/test_connection.py.orig 2021-01-17 21:03:32.174782572 +0100
16+++ urllib3-1.26.2/test/test_connection.py 2021-01-17 21:06:45.107070701 +0100
17@@ -1,6 +1,9 @@
18 import datetime
19
20-import mock
21+try:
22+ import mock
23+except ImportError:
24+ from unittest import mock
25 import pytest
26
27 from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
28--- urllib3-1.26.2/test/test_queue_monkeypatch.py.orig 2021-01-17 21:03:32.174782572 +0100
29+++ urllib3-1.26.2/test/test_queue_monkeypatch.py 2021-01-17 21:07:04.446965928 +0100
30@@ -1,6 +1,9 @@
31 from __future__ import absolute_import
32
33-import mock
34+try:
35+ import mock
36+except ImportError:
37+ from unittest import mock
38 import pytest
39
40 from urllib3 import HTTPConnectionPool
41--- urllib3-1.26.2/test/test_response.py.orig 2021-01-17 21:03:32.174782572 +0100
42+++ urllib3-1.26.2/test/test_response.py 2021-01-17 21:07:27.800172746 +0100
43@@ -9,7 +9,10 @@
44 from io import BufferedReader, BytesIO, TextIOWrapper
45 from test import onlyBrotlipy
46
47-import mock
48+try:
49+ import mock
50+except ImportError:
51+ from unittest import mock
52 import pytest
53 import six
54
55--- urllib3-1.26.2/test/test_retry.py.orig 2021-01-17 21:03:32.174782572 +0100
56+++ urllib3-1.26.2/test/test_retry.py 2021-01-17 21:07:44.043418082 +0100
57@@ -1,6 +1,9 @@
58 import warnings
59
60-import mock
61+try:
62+ import mock
63+except ImportError:
64+ from unittest import mock
65 import pytest
66
67 from urllib3.exceptions import (
68--- urllib3-1.26.2/test/test_ssl.py.orig 2021-01-17 21:03:32.174782572 +0100
69+++ urllib3-1.26.2/test/test_ssl.py 2021-01-17 21:07:59.646666886 +0100
70@@ -1,6 +1,9 @@
71 from test import notPyPy2
72
73-import mock
74+try:
75+ import mock
76+except ImportError:
77+ from unittest import mock
78 import pytest
79
80 from urllib3.exceptions import SNIMissingWarning
81--- urllib3-1.26.2/test/test_util.py.orig 2021-01-17 21:03:32.178115887 +0100
82+++ urllib3-1.26.2/test/test_util.py 2021-01-17 21:08:29.376505825 +0100
83@@ -9,7 +9,10 @@
84 from test import notBrotlipy, onlyBrotlipy, onlyPy2, onlyPy3
85
86 import pytest
87-from mock import Mock, patch
88+try:
89+ from mock import Mock, patch
90+except ImportError:
91+ from unittest.mock import Mock, patch
92
93 from urllib3 import add_stderr_logger, disable_warnings, util
94 from urllib3.exceptions import (
95--- urllib3-1.25.9/test/contrib/test_pyopenssl.py.orig 2020-04-16 14:42:30.000000000 +0200
96+++ urllib3-1.25.9/test/contrib/test_pyopenssl.py 2020-06-07 22:30:33.011793894 +0200
97@@ -1,7 +1,10 @@
98 # -*- coding: utf-8 -*-
99 import os
100
101-import mock
102+try:
103+ import mock
104+except ImportError:
105+ from unittest import mock
106 import pytest
107
108 try:
109--- urllib3-1.26.2/test/contrib/test_pyopenssl_dependencies.py.orig 2021-01-17 21:10:14.782601458 +0100
110+++ urllib3-1.26.2/test/contrib/test_pyopenssl_dependencies.py 2021-01-17 21:12:17.745268645 +0100
111@@ -1,6 +1,9 @@
112 # -*- coding: utf-8 -*-
113 import pytest
114-from mock import Mock, patch
115+try:
116+ from mock import Mock, patch
117+except ImportError:
118+ from unittest.mock import Mock, patch
119
120 try:
121 from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3
122--- urllib3-1.26.2/test/with_dummyserver/test_connectionpool.py.orig 2021-01-17 21:10:14.782601458 +0100
123+++ urllib3-1.26.2/test/with_dummyserver/test_connectionpool.py 2021-01-17 21:12:56.965056174 +0100
124@@ -10,7 +10,10 @@
125 from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
126 from threading import Event
127
128-import mock
129+try:
130+ import mock
131+except ImportError:
132+ from unittest import mock
133 import pytest
134 import six
135
136--- urllib3-1.26.8/test/with_dummyserver/test_https.py.orig 2022-03-10 06:29:38.588432315 +0100
137+++ urllib3-1.26.8/test/with_dummyserver/test_https.py 2022-03-10 06:30:20.714870763 +0100
138@@ -19,7 +19,10 @@ from test import (
139 resolvesLocalhostFQDN,
140 )
141
142-import mock
143+try:
144+ import mock
145+except ImportError:
146+ from unittest import mock
147 import pytest
148 import trustme
149
150--- urllib3-1.26.2/test/with_dummyserver/test_socketlevel.py.orig 2021-01-17 21:10:14.782601458 +0100
151+++ urllib3-1.26.2/test/with_dummyserver/test_socketlevel.py 2021-01-17 21:18:48.833149940 +0100
152@@ -52,7 +52,10 @@
153 )
154 from threading import Event
155
156-import mock
157+try:
158+ import mock
159+except ImportError:
160+ from unittest import mock
161 import pytest
162 import trustme
163
This page took 0.053851 seconds and 4 git commands to generate.