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

asyncio: support 'async with' for locks #68366

Closed
1st1 opened this issue May 13, 2015 · 4 comments
Closed

asyncio: support 'async with' for locks #68366

1st1 opened this issue May 13, 2015 · 4 comments
Assignees
Labels
topic-asyncio type-feature A feature request or enhancement

Comments

@1st1
Copy link
Member

1st1 commented May 13, 2015

BPO 24178
Nosy @gvanrossum, @vstinner, @asvetlov, @1st1
Files
  • alock.patch
  • alock_2.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 = 'https://github.com/1st1'
    closed_at = <Date 2015-05-13.18:40:08.361>
    created_at = <Date 2015-05-13.16:30:54.573>
    labels = ['type-feature', 'expert-asyncio']
    title = "asyncio: support 'async with' for locks"
    updated_at = <Date 2015-05-13.18:40:08.360>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2015-05-13.18:40:08.360>
    actor = 'yselivanov'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2015-05-13.18:40:08.361>
    closer = 'yselivanov'
    components = ['asyncio']
    creation = <Date 2015-05-13.16:30:54.573>
    creator = 'yselivanov'
    dependencies = []
    files = ['39361', '39363']
    hgrepos = []
    issue_num = 24178
    keywords = ['patch']
    message_count = 4.0
    messages = ['243102', '243107', '243110', '243115']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'vstinner', 'asvetlov', 'python-dev', 'yselivanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24178'
    versions = ['Python 3.5']

    @1st1
    Copy link
    Member Author

    1st1 commented May 13, 2015

    The attached patch makes Locks, Conditions, Semaphores, and BoundedSemaphores support new 'async with' syntax.

    Because the patch contains a file that will only be checked in to the CPython repo (test_pep492.py), I decided to create the issue on bugs.python.org instead of asyncio GH repo.

    Please review.

    @1st1 1st1 self-assigned this May 13, 2015
    @1st1 1st1 added topic-asyncio type-feature A feature request or enhancement labels May 13, 2015
    @1st1
    Copy link
    Member Author

    1st1 commented May 13, 2015

    Updated patch is attached:

    • '__aenter__' returns None
    • "with await lock" is now supported.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 13, 2015

    New changeset 616f15f05530 by Yury Selivanov in branch 'default':
    bpo-24178: support 'async with' for asyncio locks.
    https://hg.python.org/cpython/rev/616f15f05530

    @1st1
    Copy link
    Member Author

    1st1 commented May 13, 2015

    Guido, thanks for review. Closing the issue.

    @1st1 1st1 closed this as completed May 13, 2015
    @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
    topic-asyncio type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant