Skip to content

Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() #80983

Closed

Description

@asvetlov
BPO 36802
Nosy @vstinner, @asvetlov, @1st1
PRs
  • bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead #13099
  • Revert "bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099)" #13316
  • 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 2019-05-24.14:18:08.451>
    created_at = <Date 2019-05-05.14:10:52.018>
    labels = ['3.8', 'expert-asyncio']
    title = 'Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close()'
    updated_at = <Date 2019-05-24.14:18:08.450>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2019-05-24.14:18:08.450>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-24.14:18:08.451>
    closer = 'asvetlov'
    components = ['asyncio']
    creation = <Date 2019-05-05.14:10:52.018>
    creator = 'asvetlov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36802
    keywords = ['patch']
    message_count = 3.0
    messages = ['341450', '341994', '342471']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'asvetlov', 'yselivanov']
    pr_nums = ['13099', '13316']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36802'
    versions = ['Python 3.8']

    Activity

    1. asvetlov commented on May 5, 2019

      @asvetlov
      ContributorAuthor

      Yuri and I decided that writer.awrite() and writer.aclose() look ugly.

      Instead, we return awaitable object from these methods to allow both writer.write(b'data') and await writer.write(b'data') for the method.

      The same for writer.close() call.

    2. asvetlov commented on May 9, 2019

      @asvetlov
      ContributorAuthor

      New changeset a076e4f by Andrew Svetlov in branch 'master':
      bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (bpo-13099)
      a076e4f

    3. vstinner commented on May 14, 2019

      @vstinner
      Member

      It seems like the commit a076e4f introduced a regression: bpo-36870, test_drain_raises() of test_asyncio started to fail randomly, mostly on Windows. bpo-36870 is making AppVeyor failing on pull requests and make Windows buildbots fail randomly. I wrote PR 13316 to revert the commit to get more time to find a proper fix.
      https://pythondev.readthedocs.io/ci.html#revert-on-fail

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions