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

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

Closed
asvetlov opened this issue May 5, 2019 · 3 comments
Labels

Comments

@asvetlov
Copy link
Contributor

asvetlov commented May 5, 2019

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']

    @asvetlov
    Copy link
    Contributor Author

    asvetlov commented May 5, 2019

    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.

    @asvetlov
    Copy link
    Contributor Author

    asvetlov commented May 9, 2019

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

    @asvetlov asvetlov closed this as completed May 9, 2019
    @vstinner
    Copy link
    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

    @vstinner vstinner reopened this May 14, 2019
    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants