Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http.client.HTTPConnection doesn't work without TCP_NODELAY #89491

Closed
rtobar mannequin opened this issue Sep 30, 2021 · 5 comments
Closed

http.client.HTTPConnection doesn't work without TCP_NODELAY #89491

rtobar mannequin opened this issue Sep 30, 2021 · 5 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@rtobar
Copy link
Mannequin

rtobar mannequin commented Sep 30, 2021

BPO 45328
Nosy @ambv, @miss-islington, @rtobar, @rtobar
PRs
  • bpo-45328: Avoid failure in OSs without TCP_NODELAY support #28646
  • [3.9] bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) #28770
  • [3.10] bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) #28771
  • Files
  • http-client.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-10-06.18:30:23.481>
    created_at = <Date 2021-09-30.08:06:56.975>
    labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
    title = "http.client.HTTPConnection doesn't work without TCP_NODELAY"
    updated_at = <Date 2021-10-06.18:30:23.480>
    user = 'https://github.com/rtobar'

    bugs.python.org fields:

    activity = <Date 2021-10-06.18:30:23.480>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-06.18:30:23.481>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2021-09-30.08:06:56.975>
    creator = 'rtobar2'
    dependencies = []
    files = ['50316']
    hgrepos = []
    issue_num = 45328
    keywords = ['patch']
    message_count = 5.0
    messages = ['402937', '403328', '403329', '403330', '403331']
    nosy_count = 4.0
    nosy_names = ['lukasz.langa', 'miss-islington', 'rtobar', 'rtobar2']
    pr_nums = ['28646', '28770', '28771']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45328'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @rtobar
    Copy link
    Mannequin Author

    rtobar mannequin commented Sep 30, 2021

    I'm working on trying to run python under SerenityOS.

    At the moment, SerenityOS doesn't implement the TCP_NODELAY socket option. This makes the HTTPConnection.connect() method raise an OSError for an operation that is otherwise optional. Additionally, the connection object can be left in an intermediate state: the underlying socket is always created, but depending on what method was invoked (either connect() directly or a higher-level one such as putrequest()) the connection object can be in IDLE or REQ_STARTED state.

    I have a patch that works (attached), and I'll be working on submitting a PR now.

    Usage of TCP_NODELAY was introduced in 3.5 (bpo-23302), so even though I've been testing against 3.10rc2 for the time being I'm sure it will affect all versions in between.

    @rtobar rtobar mannequin added 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Sep 30, 2021
    @ambv ambv added 3.9 only security fixes 3.11 only security fixes labels Oct 6, 2021
    @ambv
    Copy link
    Contributor

    ambv commented Oct 6, 2021

    New changeset 0571b93 by rtobar in branch 'main':
    bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646)
    0571b93

    @ambv
    Copy link
    Contributor

    ambv commented Oct 6, 2021

    New changeset 4c35a2a by Miss Islington (bot) in branch '3.10':
    bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) (GH-28771)
    4c35a2a

    @ambv
    Copy link
    Contributor

    ambv commented Oct 6, 2021

    New changeset 92018a0 by Miss Islington (bot) in branch '3.9':
    bpo-45328: Avoid failure in OSs without TCP_NODELAY support (GH-28646) (GH-28770)
    92018a0

    @ambv
    Copy link
    Contributor

    ambv commented Oct 6, 2021

    Thanks, rtobar! ✨ 🍰 ✨

    @ambv ambv closed this as completed Oct 6, 2021
    @ambv ambv closed this as completed Oct 6, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant