MagicStack / MagicStack/uvloop

Missing support for `interleave` and `happy_eyeballs_delay` in `create_connection`

Open
#406 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted missing feature
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.8.5
  • Platform: Ubuntu 20.04 amd64
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Not tested.
  • Does uvloop behave differently from vanilla asyncio? How?: Yes, fails if interleave and/or happy_eyeballs_delay is set with create_connection.

asyncio loop.create_connection supports the interleave and happy_eyeballs_delay keyword arguments to enable RFC 8305 "Happy Eyeballs" IPv6-to-IPv4 fallback since Python 3.8. The arguments are documented here: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_connection

The corresponding function in uvloop does not accept these arguments. These would be nice to have because I'm working on a server that proxies requests to external third-party servers which occasionally have a broken IPv6 configuration and traditional connect timeout behavior causes quite a bit of delay.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at uvloop's create_connection entry point and read the asyncio loop.create_connection documentation linked in the issue, focusing on interleave and happy_eyeballs_delay. Compare the supported arguments and behavior, then verify that both options are accepted and provide the documented IPv6-to-IPv4 fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.