| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
@pytest.mark.asyncio
async def test_default_default_headers():
config = Config(app=app, loop="asyncio", limit_max_requests=1)
async with run_server(config):
> async with httpx.AsyncClient() as client:
tests/test_default_headers.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv/lib/python3.10/site-packages/httpx/_client.py:1345: in __init__
self._transport = self._init_transport(
venv/lib/python3.10/site-packages/httpx/_client.py:1393: in _init_transport
return AsyncHTTPTransport(
venv/lib/python3.10/site-packages/httpx/_transports/default.py:226: in __init__
ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)
venv/lib/python3.10/site-packages/httpx/_config.py:49: in create_ssl_context
return SSLConfig(
venv/lib/python3.10/site-packages/httpx/_config.py:73: in __init__
self.ssl_context = self.load_ssl_context()
venv/lib/python3.10/site-packages/httpx/_config.py:85: in load_ssl_context
return self.load_ssl_context_verify()
venv/lib/python3.10/site-packages/httpx/_config.py:122: in load_ssl_context_verify
context = self._create_default_ssl_context()
venv/lib/python3.10/site-packages/httpx/_config.py:159: in _create_default_ssl_context
context.options |= ssl.OP_NO_TLSv1
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ssl.SSLContext object at 0x7fbe6e053140>
value = ssl.OP_NO_COMPRESSION|ssl.OP_ENABLE_MIDDLEBOX_COMPAT|ssl.OP_CIPHER_SERVER_PREFERENCE|ssl.OP_NO_SSLv3|ssl.OP_NO_TLSv1|0x80000054
@options.setter
def options(self, value):
> super(SSLContext, SSLContext).options.__set__(self, value)
E DeprecationWarning: ssl module: Setting OP_NO_SSL* or SSL_NO_TLS* options is deprecated is deprecated
/usr/lib/python3.10/ssl.py:621: DeprecationWarning
looks like OP_NO_(SSL|TLS)* is deprecated is deprecated |
Sorry, something went wrong.
|
Should we add the Python 3.10 workflow as well @tomchristie ? |
Sorry, something went wrong.
|
@Kludex Yes, I'd suggest that we treat that as a separate pull request. |
Sorry, something went wrong.
Sorry, something went wrong.
|
So, my review at the moment would be that there's several different things being addressed here, and I'd probably rather see each individual thing tackled as a separate PR, which I've always found helps with clean thorough review processes. We've got:
All good stuff, but just needs a bit of separation in order to address each review part with sufficient intent and precision. However, either ways around we really need to wait until #1687 is resolved before we consider pushing on with this. |
Sorry, something went wrong.
There was a problem hiding this comment.
Seems like we're good to go with this one? I like the switch to closing/aclosing as well, quite neat. Thank you!
Sorry, something went wrong.
|
It looks like there's a problem with the type annotation of async_generator.aclosing python-trio/trio-typing#31 |
Sorry, something went wrong.
|
Also the other backport of this: jazzband/contextlib2#27 |
Sorry, something went wrong.
|
I'm not sure? I'm as convinced of the benefits of this. We're perfectly neat & tidy with our try...finally usage here, and it's not obvious to me if the trade-off is actually worth it. It's a little extra obfuscation to use closing/aclosing, and bumps up our minimum dependency on async_generator. |
Sorry, something went wrong.
|
blocked by jazzband/contextlib2#42 |
Sorry, something went wrong.
|
I'd like us to pass on this. The trade-off from replacing two cases of try...finally with aclosing/closing context managers doesn't seem worth it. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.