MagicStack / MagicStack/uvloop
Can't peek at paused bytes (socket behind TCPTransport unavailable)
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.14.0
- Python version: 3.8.2
- Platform: linux
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: n/a (this is an api thing) - Does uvloop behave differently from vanilla asyncio? How?:
- vanilla asyncio: the underlying socket is available in
transport._sockfor consenting coders aware of the risks using "private" members - uvloop: the underlying socket is not available to python at all (or at least I can't find it via introspection)
- vanilla asyncio: the underlying socket is available in
FWIW, one reason I'm running into this right now is that I have a case where the transport is paused for reading (transport.pause_reading()), but I would still like to peek at the bytes with sock.recv(n, socket.MSG_PEEK).
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 TCP transport with vanilla asyncio's transport._sock behavior, focusing on access while reading is paused. Done means the reported MSG_PEEK use case has a supported way to inspect paused socket bytes through uvloop, with behavior checked against the issue's reproduction details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100