MagicStack / MagicStack/uvloop
Failed to create_datagram_endpoint() with AF_UNIX family
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.15.2
* **Python version**: 3.7.3
* **Platform**: Debian GNU/Linux 10
* **Can you reproduce the bug with `PYTHONASYNCIODEBUG` in env?**:
* **Does uvloop behave differently from vanilla asyncio? How?**: asyncio correctly creates datagram unix socket
Code, works correctly using default event loop:
```python
res = await loop.create_datagram_endpoint(MyProto, local_addr='/tmp/my_unix_sock', family=socket.AF_UNIX)
```
Trace:
```pytb
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1494, in uvloop.loop.Loop.run_until_complete
File "./my_app.py", line 75, in main
family = socket.AF_UNIX)
File "uvloop/loop.pyx", line 3023, in create_datagram_endpoint
TypeError: local_addr must be a tuple of (host, port)
```
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 at uvloop/loop.pyx in create_datagram_endpoint around the reported line and run the supplied AF_UNIX reproducer, comparing its behavior with vanilla asyncio. Done means a datagram UNIX socket can be created with the shown local_addr and AF_UNIX family without breaking existing tuple-based endpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100