queutils 0.10.1__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- queutils/iterablequeue.py +11 -0
- {queutils-0.10.1.dist-info → queutils-0.11.0.dist-info}/METADATA +1 -1
- {queutils-0.10.1.dist-info → queutils-0.11.0.dist-info}/RECORD +5 -5
- {queutils-0.10.1.dist-info → queutils-0.11.0.dist-info}/WHEEL +0 -0
- {queutils-0.10.1.dist-info → queutils-0.11.0.dist-info}/licenses/LICENSE +0 -0
queutils/iterablequeue.py
CHANGED
|
@@ -82,6 +82,17 @@ class IterableQueue(Queue[T], AsyncIterable[T], Countable):
|
|
|
82
82
|
|
|
83
83
|
self._empty.clear() # this will be tested only after queue is filled
|
|
84
84
|
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_queue(cls, Q: Queue[Optional[T]]) -> "IterableQueue[T]":
|
|
87
|
+
"""
|
|
88
|
+
Create IterableQueue from existing asyncio.Queue
|
|
89
|
+
"""
|
|
90
|
+
if not isinstance(Q, Queue):
|
|
91
|
+
raise TypeError("Q must be an instance of asyncio.Queue")
|
|
92
|
+
iq: IterableQueue[T] = cls(maxsize=Q.maxsize)
|
|
93
|
+
iq._Q = Q
|
|
94
|
+
return iq
|
|
95
|
+
|
|
85
96
|
@property
|
|
86
97
|
def is_filled(self) -> bool:
|
|
87
98
|
""" "
|
|
@@ -4,9 +4,9 @@ queutils/awrap.py,sha256=QydWBLmyNIHpYrRwVFn1RWjbQKRnJr61u-DYl7d3F7w,1293
|
|
|
4
4
|
queutils/countable.py,sha256=YSi7ILf9CuB5Tm3T4UUMEFlveqzqcmomfqJAlLGHEz8,172
|
|
5
5
|
queutils/eventcounterqueue.py,sha256=9CvgfnWmvXrMr3h-RiQyIVIBXqOnGvohql_ADvdlmxo,2913
|
|
6
6
|
queutils/filequeue.py,sha256=J_UK3VHKaM4ELFzedtj6lDmlXas8O732aC0nO8zNzNo,5256
|
|
7
|
-
queutils/iterablequeue.py,sha256=
|
|
7
|
+
queutils/iterablequeue.py,sha256=_crzGtifm0cmxQuyOF5grVveJjkUp4eR22RRMZqqOM0,9092
|
|
8
8
|
queutils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
queutils-0.
|
|
10
|
-
queutils-0.
|
|
11
|
-
queutils-0.
|
|
12
|
-
queutils-0.
|
|
9
|
+
queutils-0.11.0.dist-info/METADATA,sha256=etPt_8pP0P8k6FVEQVetf_j92Rz4mYCTx1aR4sDxTvM,4708
|
|
10
|
+
queutils-0.11.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
11
|
+
queutils-0.11.0.dist-info/licenses/LICENSE,sha256=J1zeIKU2JVQmhwO2hHQDK8WR6zjVZ-wX8r7ZlL45AbI,1063
|
|
12
|
+
queutils-0.11.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|