forked from getsentry/responses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
284 lines (209 loc) · 7.99 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
0.16.0
------
* Fixed regression with `stream` parameter deprecation, requests.session() and cookie handling.
* Replaced adhoc URL parsing with `urllib.parse`.
* Added ``match`` parameter to ``add_callback`` method
* Added `responses.matchers.fragment_identifier_matcher`. This matcher allows you
to match request URL fragment identifier.
* Improved test coverage.
* Fixed failing test in python 2.7 when `python-future` is also installed.
0.15.0
------
* Added `responses.PassthroughResponse` and
`reponses.BaseResponse.passthrough`. These features make building passthrough
responses more compatible with dynamcially generated response objects.
* Removed the unused ``_is_redirect()`` function from responses internals.
* Added `responses.matchers.request_kwargs_matcher`. This matcher allows you
to match additional request arguments like `stream`.
* Added `responses.matchers.multipart_matcher`. This matcher allows you
to match request body and headers for ``multipart/form-data`` data
* Added `responses.matchers.query_string_matcher`. This matcher allows you
to match request query string, similar to `responses.matchers.query_param_matcher`.
* Added `responses.matchers.header_matcher()`. This matcher allows you to match
request headers. By default only headers supplied to `header_matcher()` are checked.
You can make header matching exhaustive by passing `strict_match=True` to `header_matcher()`.
* Changed all matchers output message in case of mismatch. Now message is aligned
between Python2 and Python3 versions
* Deprecate ``stream`` argument in ``Response`` and ``CallbackResponse``
* Added Python 3.10 support
0.14.0
------
* Added `responses.matchers`.
* Moved `responses.json_params_matcher` to `responses.matchers.json_params_matcher`
* Moved `responses.urlencoded_params_matcher` to
`responses.matchers.urlencoded_params_matcher`
* Added `responses.matchers.query_param_matcher`. This matcher allows you
to match query strings with a dictionary.
* Added `auto_calculate_content_length` option to `responses.add()`. When
enabled, this option will generate a `Content-Length` header
based on the number of bytes in the response body.
0.13.4
------
* Improve typing support
* Use URLs with normalized hostnames when comparing URLs.
0.13.3
------
* Switch from Travis to GHA for deployment.
0.13.2
------
* Fixed incorrect type stubs for `add_callback`
0.13.1
------
* Fixed packages not containing type stubs.
0.13.0
------
* `responses.upsert()` was added. This method will `add()` a response if one
has not already been registered for a URL, or `replace()` an existing
response.
* `responses.registered()` was added. The method allows you to get a list of
the currently registered responses. This formalizes the previously private
`responses.mock._matches` method.
* A more useful `__repr__` has been added to `Response`.
* Error messages have been improved.
0.12.1
------
* `responses.urlencoded_params_matcher` and `responses.json_params_matcher` now
accept None to match empty requests.
* Fixed imports to work with new `urllib3` versions.
* `request.params` now allows parameters to have multiple values for the same key.
* Improved ConnectionError messages.
0.12.0
------
- Remove support for Python 3.4.
0.11.0
------
- Added the `match` parameter to `add()`.
- Added `responses.urlencoded_params_matcher()` and `responses.json_params_matcher()`.
0.10.16
-------
- Add a requirements pin to urllib3. This helps prevent broken install states where
cookie usage fails.
0.10.15
-------
- Added `assert_call_count` to improve ergonomics around ensuring a mock was called.
- Fix incorrect handling of paths with query strings.
- Add Python 3.9 support to CI matrix.
0.10.14
-------
- Retag of 0.10.13
0.10.13
-------
- Improved README examples.
- Improved handling of unicode bodies. The inferred content-type for unicode
bodies is now `text/plain; charset=utf-8`.
- Streamlined querysting matching code.
0.10.12
-------
- Fixed incorrect content-type in `add_callback()` when headers are provided as a list of tuples.
0.10.11
-------
- Fixed invalid README formatted.
- Fixed string formatting in error message.
0.10.10
------
- Added Python 3.8 support
- Remove Python 3.4 from test suite matrix.
- The `response.request` object now has a `params` attribute that contains the query string parameters from the request that was captured.
- `add_passthru` now supports `re` pattern objects to match URLs.
- ConnectionErrors raised by responses now include more details on the request that was attempted and the mocks registered.
0.10.9
------
- Fixed regression with `add_callback()` and content-type header.
- Fixed implicit dependency on urllib3>1.23.0
0.10.8
------
- Fixed cookie parsing and enabled multiple cookies to be set by using a list of
tuple values.
0.10.7
------
- Added pypi badges to README.
- Fixed formatting issues in README.
- Quoted cookie values are returned correctly now.
- Improved compatibility for pytest 5
- Module level method names are no longer generated dynamically improving IDE navigation.
0.10.6
------
- Improved documentation.
- Improved installation requirements for py3
- ConnectionError's raised by responses now indicate which request
path/method failed to match a mock.
- `test_responses.py` is no longer part of the installation targets.
0.10.5
------
- Improved support for raising exceptions from callback mocks. If a mock
callback returns an exception object that exception will be raised.
0.10.4
------
- Fixed generated wrapper when using `@responses.activate` in Python 3.6+
when decorated functions use parameter and/or return annotations.
0.10.3
------
- Fixed deprecation warnings in python 3.7 for inspect module usage.
0.10.2
------
- Fixed build setup to use undeprecated `pytest` bin stub.
- Updated `tox` configuration.
- Added example of using responses with `pytest.fixture`
- Removed dependency on `biscuits` in py3. Instead `http.cookies` is being used.
0.10.1
------
- Packaging fix to distribute wheel (#219)
0.10.0
------
- Fix passing through extra settings (#207)
- Fix collections.abc warning on Python 3.7 (#215)
- Use 'biscuits' library instead of 'cookies' on Python 3.4+ (#218)
0.9.0
-----
- Support for Python 3.7 (#196)
- Support streaming responses for BaseResponse (#192)
- Support custom patch targets for mock (#189)
- Fix unicode support for passthru urls (#178)
- Fix support for unicode in domain names and tlds (177)
0.8.0
-----
- Added the ability to passthru real requests via ``add_passthru()``
and ``passthru_prefixes`` configurations.
0.7.0
-----
- Responses will now be rotated until the final match is hit, and
then persist using that response (GH-171).
0.6.2
-----
- Fixed call counting with exceptions (GH-163).
- Fixed behavior with arbitrary status codes (GH-164).
- Fixed handling of multiple responses with the same match (GH-165).
- Fixed default path behavior with ``match_querystring`` (GH-166).
0.6.1
-----
- Restored ``adding_headers`` compatibility (GH-160).
0.6.0
-----
- Allow empty list/dict as json object (GH-100).
- Added `response_callback` (GH-151).
- Added ``Response`` interfaces (GH-155).
- Fixed unicode characters in querystring (GH-153).
- Added support for streaming IO buffers (GH-154).
- Added support for empty (unset) Content-Type (GH-139).
- Added reason to mocked responses (GH-132).
- ``yapf`` autoformatting now enforced on codebase.
0.5.1
-----
- Add LICENSE, README and CHANGES to the PyPI distribution (GH-97).
0.5.0
-----
- Allow passing a JSON body to `response.add` (GH-82)
- Improve ConnectionError emulation (GH-73)
- Correct assertion in assert_all_requests_are_fired (GH-71)
0.4.0
-----
- Requests 2.0+ is required
- Mocking now happens on the adapter instead of the session
0.3.0
-----
- Add the ability to mock errors (GH-22)
- Add responses.mock context manager (GH-36)
- Support custom adapters (GH-33)
- Add support for regexp error matching (GH-25)
- Add support for dynamic bodies via `responses.add_callback` (GH-24)
- Preserve argspec when using `responses.activate` decorator (GH-18)