The fix may actually be slightly more complex than I expected.
We would need, at first sight, to loose the prepared requests + responses streaming.
A potential solution will come in a near future.
https://docs.python.org/3.10/whatsnew/3.10.html#enum
Python 3.10 changed the repr of enum members, and the doctest of tests.utils.http failed.
Exact reprs are unfortunately not considered stable API between Python releases:
=================================== FAILURES ===================================
__________________________ [doctest] tests.utils.http __________________________
209
210 Example:
211
212 $ http --auth=user:password GET pie.dev/basic-auth/user/password
213
214 >>> httpbin = getfixture('httpbin')
215 >>> r = http('-a', 'user:pw', httpbin.url + '/basic-auth/user/pw')
216 >>> type(r) == StrCLIResponse
217 True
218 >>> r.exit_status
Expected:
<ExitStatus.SUCCESS: 0>
Got:
ExitStatus.SUCCESS
A simple replacement of the expected output however breaks the doctest on Python 3.9.
This is the best solution I could think of
that keeps the docstring readable and doctest working in Pythons both old and new.
* Add --raw to allow specifying the raw request body without extra processing
As an alternative to `stdin`.
Co-authored-by: Elena Lape <elapinskaite@gmail.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Update README.rst
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Update README.rst
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Fix default HTTP method on empty data
Co-authored-by: Elena Lape <elapinskaite@gmail.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Add skip when required TLS version unsupported
Allow tests to skip, rather than fail from SSL errors with unsupported
TLS version, e.g. if Openssl is configured with MinProtocol higher than
the version being tested.
* Regenerate test certificate and key
Regenerate these with more secure settings for the sake of future
proofing, regenerate the key using RSA 4096 and sign the certificate
with SHA512.
This fixes test failures in tests/test_ssl.py when the user's OpenSSL
security level is set to a value greater than 1 and resolves issue #948
* Suppress SSL warnings in no verify tests
* Add test to test auth plugin reused in session
* Remove unnecessary assertion in auth-plugin test
* Fixed auth test to use same session file
* Add test for password prompt behaviour in session
* Edit auth readme for plugin clarity