[issue32741] Add asyncio.TimerHandle.when() function

Andrew Svetlov report at bugs.python.org
Thu Feb 1 07:08:36 EST 2018


New submission from Andrew Svetlov <andrew.svetlov at gmail.com>:

Should just return self._when attribute.

I need it for testing purposes.
Without the method there is no possibility to figure out scheduled wakeup time.
An alternative is waiting for callback but the approach increases unittest execution time and not very reliable.

I don't like looking into `handler._when` private property, uvloop does not expose it.

Ned, is it possible to include the feature into Python 3.7? 
The change is safe and tiny, no backward compatibility problems etc.

----------
components: asyncio
messages: 311421
nosy: asvetlov, ned.deily, yselivanov
priority: normal
severity: normal
status: open
title: Add asyncio.TimerHandle.when() function
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32741>
_______________________________________


More information about the Python-bugs-list mailing list