CallList.requests dependency to the version of 2.22.0 or higher. See #584.@_recorder.record(file_path="out.toml") decorator.responses._add_from_file(file_path="out.toml") method.mock's patcher object. See #556CallListpassthrough argument to BaseResponse object. See #557registries leak. See #563OriginalResponseShim is removed. See #585loose version of json_params_matcher via named argument strict_match. See #551json_params_matcher. See #559delete, get, head, options, patch, post, put shortcuts are now implemented using functools.partialmethod.MaxRetryError exception. Replace exception by RetryError according to requests implementation. See #572.Retry is exhausted. See #580.threading.Lock() to allow responses working with threading module.urllib3 Retry mechanism. See #135_cookies_from_headers functionadd, upsert, replace methods return registered response.
remove method returns list of removed responses.urlencoded_params_matcher via allow_blank keyword argument@responses.activate(assert_all_requests_are_fired=True)
to your function to validate that all requests were executed in the wrapped function. See #183responses.assert_all_requests_are_fired, responses.passthru_prefixes, responses.target
since they are not actual properties of the class instance.
Use responses.mock.assert_all_requests_are_fired,
responses.mock.passthru_prefixes, responses.mock.target instead.reset() method was called in not stopped mock. See #511responses.registries.OrderedRegistry.responses.post() instead
of responses.add(responses.POST).responses.activate decorator to leak, if wrapped function called from within another
wrapped function. Also, allow calling of above mentioned chain. See #481 for more details.get_registry() method of RequestsMock object. Replaces internal _get_registry().query_param_matcher can now accept dictionaries with int and float values.loose version of query_param_matcher via named argument strict_match.async/await functions.response_callback is no longer executed on exceptions raised by failed Responses_get_url_and_path to comply with RFC 3986. Now URL match occurs by matching
schema, authority and path, where path is terminated by the first question mark ("?") or
number sign ("#") character, or by the end of the URI.content_type and headers[content-type] are provided as parameters.responses.activate decorator. See #468_is_string and _ensure_str functions_quote from test_responses.py_matches attribute of RequestsMock object.responses.add_callback due to match_querystring. See #464response.iter_content when chunk_size=None entered infinite looppassthru_prefixes persisted across tests.
Now add_passthru is valid only within a context manager or for a single function and
cleared on exitmatch_querystring argument in Response and CallbackResponse.
Use responses.matchers.query_param_matcher or responses.matchers.query_string_matcherresponses.matchers.multipart_matcherresponses.registries. Now user can create custom registries to
manipulate the order of responses in the match algorithm
responses.activate(registry=CustomRegistry)stream parameter deprecation, requests.session() and cookie handling.urllib.parse.match parameter to add_callback methodresponses.matchers.fragment_identifier_matcher. This matcher allows you
to match request URL fragment identifier.python-future is also installed.responses.PassthroughResponse and
reponses.BaseResponse.passthrough. These features make building passthrough
responses more compatible with dynamcially generated response objects._is_redirect() function from responses internals.responses.matchers.request_kwargs_matcher. This matcher allows you
to match additional request arguments like stream.responses.matchers.multipart_matcher. This matcher allows you
to match request body and headers for multipart/form-data dataresponses.matchers.query_string_matcher. This matcher allows you
to match request query string, similar to responses.matchers.query_param_matcher.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().stream argument in Response and CallbackResponseresponses.matchers.responses.json_params_matcher to responses.matchers.json_params_matcherresponses.urlencoded_params_matcher to
responses.matchers.urlencoded_params_matcherresponses.matchers.query_param_matcher. This matcher allows you
to match query strings with a dictionary.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.