[issue28448] C implemented Future doesn't work on Windows

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +1047

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread INADA Naoki

Changes by INADA Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6d20d6fe9b41 by INADA Naoki in branch '3.6':
Issue #28448: Fix C implemented asyncio.Future didn't work on Windows
https://hg.python.org/cpython/rev/6d20d6fe9b41

New changeset a9a136c9d857 by INADA Naoki in branch 'default':
Issue #28448: Fix C implemented asyncio.Future didn't work on Windows (merge 
3.6)
https://hg.python.org/cpython/rev/a9a136c9d857

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-20 Thread Yury Selivanov

Yury Selivanov added the comment:

Latest patch looks good.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-18 Thread INADA Naoki

INADA Naoki added the comment:

I think _WaitCancelFuture can do same thing by overriding
callers of _schedule_callbacks.

Attached patch does it, and make _schedule_callbacks private
by renaming it to __schedule_callbacks.

--
Added file: 
http://bugs.python.org/file45139/dont-override-schedule-callbacks.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-18 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki added the comment:
> @haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() 
> instead
> of self.add_done_callback(self._unregister_wait_cb)?
> _unregister_wait_cb must be called after all callbacks are called?

Oh no. I tried to forget this mess :-( It took me 2 or 3 months to
understand and fix this complex issue of cancelling a wait on
Windows...

Hum, let me check.

I found this in IocpProactor:
---
def _wait_cancel(self, event, done_callback):
fut = self._wait_for_handle(event, None, True)
# add_done_callback() cannot be used because the wait may only complete
# in IocpProactor.close(), while the event loop is not running.
fut._done_callback = done_callback
return fut
---

I don't understand my comment anymore /o\

I just recall that it was complex to get this crap working in all
cases, especially in corner cases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-18 Thread INADA Naoki

INADA Naoki added the comment:

> I'm not so sure about this.  Maybe we can just fix _WaitCancelFuture somehow?

@haypo, do you know why _WaitCancelFuture overrides _schedule_callbacks() 
instead
of self.add_done_callback(self._unregister_wait_cb)?
_unregister_wait_cb must be called after all callbacks are called?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-17 Thread INADA Naoki

INADA Naoki added the comment:

https://github.com/search?p=3=_schedule_callbacks=Code=%E2%9C%93

At least, Future class in uvloop have same API.
Most of other results seems just copy of Python source tree.
(But I didn't check all search result)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-17 Thread Yury Selivanov

Yury Selivanov added the comment:

> C implemented Future should allow overriding _schedule_callbacks.

I'm not so sure about this.  Maybe we can just fix _WaitCancelFuture somehow?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-17 Thread INADA Naoki

Changes by INADA Naoki :


--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file45125/schedule_callbacks.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28448] C implemented Future doesn't work on Windows

2016-10-14 Thread INADA Naoki

New submission from INADA Naoki:

_WaitCancelFuture in windows_events.py overrides _schedule_callbacks.
C implemented Future should allow overriding _schedule_callbacks.

Since `{"_future", PyInit__future},` is not in PC/config.c, _future is not 
registered as builtin module. So Python 3.6b2 doesn't use it.
Instead of registering it, we should try make it split extension module (.pyd 
file).

--
assignee: inada.naoki
components: asyncio
messages: 278685
nosy: gvanrossum, inada.naoki, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: C implemented Future doesn't work on Windows
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com