Allan Crooks
c5487384ee
Fix handling of encoded content in HTTPX stub.
...
Also copied over and adjusted some of the tests from
test_requests.py relating to gzipped handling to show
that the HTTPX stub is behaving in a consistent way to
how the requests stub is.
2024-01-22 23:13:10 -03:00
Allan Crooks
5cf23298ac
HTTPX stub now generates cassettes in the same format as other stubs.
...
As part of this, I've removed the tests which inspect the
data type of the response content in the cassette. That
behaviour should be controlled via the inbuilt serializers.
2024-01-22 23:13:10 -03:00
Allan Crooks
5fa7010712
Allow HTTPX stub to read cassettes generated by other stubs.
...
This was due to a custom format being defined in the HTTPX stub.
2024-01-22 23:13:10 -03:00
Jair Henrique
88cf01aa14
Fix format code
2023-12-12 14:24:22 -03:00
Parker Hancock
85ae012d9c
fix linting
2023-12-12 14:24:22 -03:00
Parker Hancock
db1e9e7180
make cassettes human readable
2023-12-12 14:24:22 -03:00
Parker Hancock
5532c0b4cf
more attempts to make the linters happy
2023-12-08 16:38:33 -03:00
Parker Hancock
e8e9a4af9f
remove unnecssary comment
2023-12-08 16:38:33 -03:00
Parker Hancock
7bf8f65815
fixes for httpx
2023-12-08 16:38:33 -03:00
Michał Górny
69621c67fb
Copy debuglevel and _http_vsn attrs into response classes
...
Copy the `debuglevel` and `_http_vsn` attributes from base connection
class into response classes, in order to fix compatibility with
Python 3.12. For reasons I don't comprehend, these end up being called
on the class rather than instance, so regular proxying logic does not
work.
Fixes #707
2023-08-09 10:09:12 -03:00
Jair Henrique
6446d00e27
Drop boto 2 support
2023-07-31 08:49:23 -03:00
Sebastian Pipping
8336d66976
aiohttp_stubs.py: Stop leaking unfiltered URL into cassette responses
2023-07-10 16:11:26 +02:00
Jair Henrique
6b2fc182c3
Improve string format
2023-06-26 20:46:09 -03:00
Jair Henrique
a77173c002
Use ruff as linter
2023-06-26 20:46:09 -03:00
Jair Henrique
b827cbe2da
Drop support to python 3.7
2023-06-26 11:46:20 -03:00
Sebastian Pipping
3411bedc06
Make response.raw.stream() work for urllib3 v2
2023-06-21 14:52:13 +02:00
Matt Ghantous
0add77d5ae
Add read1 method to VCRHTTPResponse
2023-06-05 23:20:52 -04:00
Sebastian Pipping
89f2005250
Fix VCRHTTPResponse for requests.cookies.extract_cookies_to_jar
2023-05-26 10:55:44 -05:00
Sebastian Pipping
1b3a1235f2
Make VCRHTTPResponse interface satisfy urllib3.response.HTTPResponse
2023-05-26 10:55:44 -05:00
Sebastian Pipping
fd1aaab3bf
Respect urllib3.response.HTTPResponse.data
2023-05-26 10:55:44 -05:00
Sebastian Pipping
ac20cd1dd3
Tolerate urllib3.response.HTTPResponse.msg being None
2023-05-26 10:55:44 -05:00
Sonny V
51c99bb9df
fix: use urllib3.connection where needed.
...
Since urllib3 v2 the re-export of connection.HTTPConnection in
urllib3.connectionpool was removed.
In this commit we use urllib3.connection where needed. Some references
to connectionpool.HTTPConnection are still there for backward
compatibility.
Closes #688
2023-05-26 10:55:44 -05:00
Sebastian Pipping
31c8dc0a1e
Drop support for requests <2.16.2
2023-05-15 14:06:26 +02:00
Sebastian Pipping
24af48d468
Drop support for botocore <1.11.0
2023-05-15 14:06:26 +02:00
Sebastian Pipping
4994c53590
Fix formatting with regard to black 23.3.0
2023-05-05 10:14:46 -03:00
Jair Henrique
0eece7f96e
Add isort to code lint
2022-10-09 11:35:37 -03:00
Ville Skyttä
c3767c2fdb
fix(aiohttp): record body of first request in redirect chain
...
The first could be e.g. a POST with one, only the remaining ones are
expected to be GETs without one.
2022-08-31 14:11:55 -05:00
Tim Gates
35378d046f
docs: Fix a few typos
...
There are small typos in:
- tests/integration/test_record_mode.py
- tests/integration/test_stubs.py
- vcr/stubs/__init__.py
Fixes:
- Should read `repercussions` rather than `repurcussions`.
- Should read `superclass` rather than `superclas`.
- Should read `cassette` rather than `casssette`.
Signed-off-by: Tim Gates <tim.gates@iress.com >
2022-08-04 08:42:13 -03:00
Andre Ambrosio Boechat
eb96c590ff
Copy the way aiohttp builds the request url with query parameters
2022-06-13 09:54:20 -03:00
Andre Ambrosio Boechat
7add8c0bab
Don't assume params to be a dictionary
...
aiohttp also fails with pass parameter values with types other than
string, integer or float.
2022-06-13 09:54:20 -03:00
Paulo Romeira
3da66c8dee
aiohttp: Add support to allow_redirects option
2022-04-19 11:10:41 -03:00
immerrr
25f715bc42
Fix httpx support (select between allow_redirects/follow_redirects)
2022-04-19 09:32:25 -03:00
Christian Clauss
e05ebca5e5
Fix typos discovered by codespell
2021-11-03 08:10:17 -03:00
Ville Skyttä
678d56f608
Spelling fixes
2021-08-16 06:56:36 +03:00
Jair Henrique
9d414c8841
Fix lint erros
2020-10-05 09:45:55 -05:00
Jair Henrique
a172207df0
Fix integration with httpx>0.15.0
2020-10-05 09:45:55 -05:00
Hernan Ezequiel Di Giorgi
f387950486
support allow_redirects option
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
8529c46f00
update tests
...
- Use mockbin for redirections.
- Mock synchronous requests too.
2020-07-24 15:34:57 -05:00
Gintaras Jak
5afa8f703a
Ignore utf8 decoding errors in content
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
0ef400195b
Fix linter
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
133423ce94
Reuse value from Location header on redirect
...
Because the recoded requests are using original value.
Changing the value on redirect prevents finding the
matching response.
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
7d2d29de12
Extract cookies to client on every response
...
This is required because previous extraction code is now patched out by vcpy.
Also handle headers with same key in responses.
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
04b7f4fc65
test that works behind proxy
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
936feb7748
fix redirection url
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
79d26ebb43
make it work with gzipped data
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
2f94d06e9b
add httpx support
2020-07-24 15:34:57 -05:00
Paulo Romeira
b64e93aff2
aiohttp: Check if the response is playable before redirecting
2020-07-15 13:52:00 -05:00
Paulo Romeira
4897a8e692
aiohttp: Fix linting
2020-07-15 13:52:00 -05:00
Paulo Romeira
1b9f80d741
aiohttp: Ignore cookie expiration date
2020-07-15 13:52:00 -05:00
Paulo Romeira
20fb283e97
aiohttp: Update cookies with redirection responses
2020-07-15 13:52:00 -05:00