This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: asyncio: Don't export selectors and _overlapped in asyncio namespace
Type: Stage: resolved
Components: asyncio Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2017-11-28 10:29 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4605 merged vstinner, 2017-11-28 10:34
PR 4609 merged vstinner, 2017-11-28 14:29
Messages (6)
msg307117 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-28 10:29
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.
msg307121 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-28 14:19
New changeset 4271dfd7815c05fd39b515c240050b3585bdfcd4 by Victor Stinner in branch 'master':
bpo-32154: Remove asyncio.selectors (#4605)
https://github.com/python/cpython/commit/4271dfd7815c05fd39b515c240050b3585bdfcd4
msg307122 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-28 14:30
I also proposed the PR 4609 to remove the old asyncio.windows_utils.socketpair alias.
msg307129 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-28 15:27
Is this function publicly documented? If this is true, it should first be deprecated.

It is left in the __all__ list.
msg307130 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-28 15:40
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.
msg307160 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-28 20:33
New changeset ac577d7d0bd27a69921ced14c09172235ceebab5 by Victor Stinner in branch 'master':
bpo-32154: Remove asyncio.windows_utils.socketpair (#4609)
https://github.com/python/cpython/commit/ac577d7d0bd27a69921ced14c09172235ceebab5
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76335
2017-11-28 20:33:43vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-11-28 20:33:22vstinnersetmessages: + msg307160
2017-11-28 15:40:40vstinnersetmessages: + msg307130
2017-11-28 15:27:57serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg307129
2017-11-28 14:30:02vstinnersetmessages: + msg307122
2017-11-28 14:29:15vstinnersetpull_requests: + pull_request4525
2017-11-28 14:19:58vstinnersetmessages: + msg307121
2017-11-28 10:34:45vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request4522
2017-11-28 10:29:10vstinnercreate