MagicStack / MagicStack/uvloop
Possible to add `_start_tls_compatible` attribute to `TCPTransport`?
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 11.9k
- Forks
- 616
- PR merge metrics
- No merged PRs in 30d
Description
- uvloop version:
0.19.0 - Python version:
3.10.7 - Platform: Linux
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: Yes - Does uvloop behave differently from vanilla asyncio? How?: Yes
aiohttp (3.9.1) keeps warning (falsely) about ^1
RuntimeWarning: An HTTPS request is being sent through an HTTPS proxy. This support for TLS in TLS is known to be disabled in the stdlib asyncio (Python <3.11). This is why you'll probably see an error in the log below.
It throws this warning because it's not able to find _start_tls_compatible property on the TCPTransport object (https://github.com/aio-libs/aiohttp/blob/v3.9.1/aiohttp/connector.py#L1054). The same property is present when asyncio is used which provides SelectorSocketTransport as the underlying transport. Is it possible to provide the _start_tls_compatible attribute on the TCPTransport which can help us avoid this warning?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing uvloop's TCPTransport with asyncio's SelectorSocketTransport, then read the aiohttp connector reference linked in the issue to understand how _start_tls_compatible is checked. Done means TCPTransport exposes the compatibility attribute and aiohttp no longer emits the false TLS-in-TLS warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100