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: Rename _futures module to _asyncio
Type: enhancement Stage: resolved
Components: Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: matrixise, methane, python-dev, steve.dower, yselivanov
Priority: normal Keywords: patch

Created on 2016-10-13 11:20 by methane, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asyncio-speedups.patch methane, 2016-10-13 11:20
asyncio-speedups2.patch methane, 2016-10-13 12:11 review
Messages (15)
msg278558 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-13 11:20
Before adding more speedup functions for asyncio, I want to rename the module.

Attached patch is tested on Mac 10.11. I'll test it on Windows later.
msg278560 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-13 11:33
Why do you need to rename the module ?
msg278561 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-13 11:43
Because:

* The "futures" name is used in concurrent.futures too. This module is for asyncio.
* Currently, this module has only Future class. But there are several ideas about adding C speedup to improve asyncio performance. (e.g. buffer slicing and Task class).

See also: http://bugs.python.org/issue26081#msg278368
msg278563 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-13 11:51
I have read and tested your patch (with the tests) and you can merge it. But I can't review it via retvield.
msg278566 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-13 12:11
Since this patch renames file, I used --git option of hg diff.
But Rietvelt seems doesn't accept git format patch.

Attached patch is same to previous, but generated without --git option.
msg278572 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-13 12:58
I have reviewed your patch, seems to be fine. And thank you for your new patch without the --git flag.
msg278626 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-10-14 00:14
Any reason why this module doesn't use argument clinic?
msg278630 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-14 04:14
> Any reason why this module doesn't use argument clinic?

No reason.

But I don't want to do in this issue, since I don't know how to
generate good patch file for file rename + change in file.

I'll do it in future issue.
msg278632 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-14 05:08
I hit this issue27705, and I have no time to reinstall Visual Studio 2015 Community today.
I'll try test on Windows later.
msg278648 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-14 12:41
I found _futures module is not used on Windows for now (without this patch).
Because `{"_future", PyInit__future},` is not in PC/config.c

But, when it added, test_windows_events cause infinite loop.
This should be another issue.

With this (asyncio-speedups2.patch), build on Windows succeeds,
and test succeeds (without speedup enabled).

I want to apply this patch before fixing the issue and adding _asyncio to PC/config.c
Is it OK?
msg278650 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-10-14 13:16
Sure. The build-specific changes for Windows look fine to me.

There is also an argument that this should not be a built-in module but should be separate (like _ctypes). I don't know if that is just a Windows decision or not, but I'm guessing you weren't the one who made that decision originally. Issue for another time
msg278683 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-15 01:49
> There is also an argument that this should not be a built-in module but should be separate (like _ctypes). I don't know if that is just a Windows decision or not, but I'm guessing you weren't the one who made that decision originally. Issue for another time

Since _overlapped is separated extension, I think _future should be too.
I'll try it after fixing issue on windows.
msg278688 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-15 02:38
Can I commit this patch without NEWS entry?
Only notable change is module name, but I don't expect no one import
it directly.

If it is required, it would be like:

- Issue #28428: Rename _futures module to _asyncio. It will have more
  speedup functions or classes other than asyncio.Future.
msg278692 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016-10-15 03:47
No news entry is necessary for this.
msg278698 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-15 06:41
New changeset 9d06fdedae2b by INADA Naoki in branch '3.6':
Issue #28428: Rename _futures module to _asyncio.
https://hg.python.org/cpython/rev/9d06fdedae2b

New changeset c2f3b7c56dff by INADA Naoki in branch 'default':
Issue #28428: Rename _futures module to _asyncio. (merge from 3.6)
https://hg.python.org/cpython/rev/c2f3b7c56dff
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72614
2016-10-15 13:26:53berker.peksagsetresolution: fixed
2016-10-15 07:50:46methanesetstage: commit review -> resolved
2016-10-15 06:43:44methanesetstatus: open -> closed
2016-10-15 06:41:27python-devsetnosy: + python-dev
messages: + msg278698
2016-10-15 03:47:07yselivanovsetmessages: + msg278692
2016-10-15 02:38:51methanesetmessages: + msg278688
2016-10-15 01:49:13methanesetmessages: + msg278683
2016-10-14 13:16:02steve.dowersetmessages: + msg278650
2016-10-14 12:41:51methanesetmessages: + msg278648
2016-10-14 05:08:40methanesetmessages: + msg278632
2016-10-14 04:14:11methanesetmessages: + msg278630
2016-10-14 00:14:00steve.dowersetmessages: + msg278626
2016-10-13 21:59:00ned.deilysetnosy: + steve.dower
2016-10-13 12:58:39matrixisesetstage: patch review -> commit review
2016-10-13 12:58:31matrixisesetmessages: + msg278572
2016-10-13 12:11:55methanesetfiles: + asyncio-speedups2.patch

messages: + msg278566
2016-10-13 11:51:20matrixisesetmessages: + msg278563
2016-10-13 11:43:05methanesetmessages: + msg278561
2016-10-13 11:33:52matrixisesetnosy: + matrixise
messages: + msg278560
2016-10-13 11:20:36methanecreate