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

Add Task.get_loop() and Future.get_loop() #76596

Closed
1st1 opened this issue Dec 23, 2017 · 5 comments
Closed

Add Task.get_loop() and Future.get_loop() #76596

1st1 opened this issue Dec 23, 2017 · 5 comments
Assignees

Comments

@1st1
Copy link
Member

@1st1 1st1 commented Dec 23, 2017

BPO 32415
Nosy @asvetlov, @1st1
PRs
  • #4992
  • #4995
  • #4999
  • 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 2017-12-23.20:08:07.327>
    created_at = <Date 2017-12-23.16:59:11.100>
    labels = ['3.7', 'expert-asyncio']
    title = 'Add Task.get_loop() and Future.get_loop()'
    updated_at = <Date 2017-12-23.21:29:28.781>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2017-12-23.21:29:28.781>
    actor = 'yselivanov'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2017-12-23.20:08:07.327>
    closer = 'yselivanov'
    components = ['asyncio']
    creation = <Date 2017-12-23.16:59:11.100>
    creator = 'yselivanov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32415
    keywords = ['patch']
    message_count = 5.0
    messages = ['308957', '308958', '308966', '308968', '308971']
    nosy_count = 2.0
    nosy_names = ['asvetlov', 'yselivanov']
    pr_nums = ['4992', '4995', '4999']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32415'
    versions = ['Python 3.7']

    @1st1
    Copy link
    Member Author

    @1st1 1st1 commented Dec 23, 2017

    Currently, asyncio code accesses Future._loop and Task._loop property to validate the event loop and implement functions like "Task.all_tasks()". So the "_loop" is a semi-official public API that other Task & Future implementations must follow in order to be compatible with asyncio code.

    I propose to add Future.get_loop() and Task.get_loop() methods, and soft-deprecate ._loop property.

    @1st1 1st1 added the 3.7 label Dec 23, 2017
    @1st1 1st1 self-assigned this Dec 23, 2017
    @asvetlov
    Copy link
    Contributor

    @asvetlov asvetlov commented Dec 23, 2017

    Agree

    @1st1
    Copy link
    Member Author

    @1st1 1st1 commented Dec 23, 2017

    New changeset ca9b36c by Yury Selivanov in branch 'master':
    bpo-32415: Add asyncio.Task.get_loop() and Future.get_loop() (bpo-4992)
    ca9b36c

    @1st1 1st1 closed this as completed Dec 23, 2017
    @1st1
    Copy link
    Member Author

    @1st1 1st1 commented Dec 23, 2017

    New changeset a8fb079 by Yury Selivanov in branch 'master':
    bpo-32415: Add more tests (bpo-4995)
    a8fb079

    @1st1
    Copy link
    Member Author

    @1st1 1st1 commented Dec 23, 2017

    New changeset 719ccbc by Yury Selivanov in branch 'master':
    bpo-32415: Fix "error is already set" (bpo-4999)
    719ccbc

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants