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: Don't export selectors and _overlapped in asyncio namespace #76335

Closed
vstinner opened this issue Nov 28, 2017 · 6 comments
Closed

asyncio: Don't export selectors and _overlapped in asyncio namespace #76335

vstinner opened this issue Nov 28, 2017 · 6 comments
Labels

Comments

@vstinner
Copy link
Member

BPO 32154
Nosy @vstinner, @serhiy-storchaka, @1st1
PRs
  • bpo-32154: Remove asyncio.selectors #4605
  • bpo-32154: Remove asyncio.windows_utils.socketpair #4609
  • 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 2017-11-28.20:33:43.869>
    created_at = <Date 2017-11-28.10:29:10.076>
    labels = ['3.7', 'expert-asyncio']
    title = "asyncio: Don't export selectors and _overlapped in asyncio namespace"
    updated_at = <Date 2017-11-28.20:33:43.868>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-11-28.20:33:43.868>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-28.20:33:43.869>
    closer = 'vstinner'
    components = ['asyncio']
    creation = <Date 2017-11-28.10:29:10.076>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32154
    keywords = ['patch']
    message_count = 6.0
    messages = ['307117', '307121', '307122', '307129', '307130', '307160']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'yselivanov']
    pr_nums = ['4605', '4609']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32154'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    For backward compatibility with Python 3.3, Lib/asyncio/init.py exports asyncio.selectors and asyncio._overlapped symbols. Python 3.3 reached it's end of line last september, it's time to move on:
    https://devguide.python.org/#status-of-python-branches

    This change is backward incompatible.

    Attached PR removes asyncio.selectors and asyncio._overlapped symbols, and use directly modules from the standard library. It documents the change in the "Porting to Python 3.7" section of the "What's New in Python 3.7" document.

    @vstinner
    Copy link
    Member Author

    New changeset 4271dfd by Victor Stinner in branch 'master':
    bpo-32154: Remove asyncio.selectors (bpo-4605)
    4271dfd

    @vstinner
    Copy link
    Member Author

    I also proposed the PR 4609 to remove the old asyncio.windows_utils.socketpair alias.

    @serhiy-storchaka
    Copy link
    Member

    Is this function publicly documented? If this is true, it should first be deprecated.

    It is left in the __all__ list.

    @vstinner
    Copy link
    Member Author

    Serhiy Storchaka: "Is this function publicly documented? If this is true, it should first be deprecated."

    It's not documented, but I found a reference in the documentation:
    ---
    try:
    from socket import socketpair
    except ImportError:
    from asyncio.windows_utils import socketpair
    ---

    This code continues to work on Python 3.5 and newer, the "except" block will just never be taken.

    It is left in the __all__ list.

    Oops, fixed in my PR.

    @vstinner
    Copy link
    Member Author

    New changeset ac577d7 by Victor Stinner in branch 'master':
    bpo-32154: Remove asyncio.windows_utils.socketpair (bpo-4609)
    ac577d7

    @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