[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-17 Thread A. Jesse Jiryu Davis
Changes by A. Jesse Jiryu Davis : -- nosy: +emptysquare ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Vajrasky, I aplied your patch. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-17 Thread STINNER Victor
STINNER Victor added the comment: Change also pushed to Tulip (changeset 3a392e5328c0). -- ___ Python tracker ___ ___ Python-bugs-list

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ccfc13183fea by Victor Stinner in branch '3.4': Issue #21723: asyncio.Queue: support any type of number (ex: float) for the http://hg.python.org/cpython/rev/ccfc13183fea New changeset a2f115bfa513 by Victor Stinner in branch 'default': (Merge 3.4) I

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-17 Thread Guido van Rossum
Guido van Rossum added the comment: The patch looks fine to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: "It looks strange to use a float as maxsize." => It is. But the float could be coming programmatically. Float value interpreted as infinity could give a shock for some people. "maybe to cast maxsize parameter to an int." => ceiling or flooring? --

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Yury Selivanov
Yury Selivanov added the comment: FWIW, this can also be resolved by fixing Queue.full to do "self.qsize() >= self._maxsize" instead of "self.qsize() == self._maxsize". I generally don't like implicit casts as they break duck typing. -- ___ Python t

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread STINNER Victor
STINNER Victor added the comment: It looks strange to use a float as maxsize. I suggest to raise a TypeError in the constructor if the type is not int, or maybe to cast maxsize parameter to an int. -- ___ Python tracker

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Vajrasky Kok
New submission from Vajrasky Kok: import asyncio loop = asyncio.get_event_loop() q = asyncio.Queue(maxsize=1.2, loop=loop) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) and so on It seems counter intuitive for my innocent eyes. As comparison with the trad