dycw-utilities 0.124.1__py3-none-any.whl → 0.125.1__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.
- {dycw_utilities-0.124.1.dist-info → dycw_utilities-0.125.1.dist-info}/METADATA +4 -6
- {dycw_utilities-0.124.1.dist-info → dycw_utilities-0.125.1.dist-info}/RECORD +6 -7
- utilities/__init__.py +1 -1
- utilities/asyncio.py +3 -2
- utilities/astor.py +0 -28
- {dycw_utilities-0.124.1.dist-info → dycw_utilities-0.125.1.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.124.1.dist-info → dycw_utilities-0.125.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dycw-utilities
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.125.1
|
4
4
|
Author-email: Derek Wan <d.wan@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.12
|
7
7
|
Requires-Dist: typing-extensions<4.14,>=4.13.1
|
8
8
|
Provides-Extra: test
|
9
|
-
Requires-Dist: hypothesis<6.132,>=6.131.
|
9
|
+
Requires-Dist: hypothesis<6.132,>=6.131.27; extra == 'test'
|
10
10
|
Requires-Dist: pytest-asyncio<0.27,>=0.26.0; extra == 'test'
|
11
11
|
Requires-Dist: pytest-cov<6.2,>=6.1.1; extra == 'test'
|
12
12
|
Requires-Dist: pytest-instafail<0.6,>=0.5.0; extra == 'test'
|
@@ -27,8 +27,6 @@ Requires-Dist: img2pdf<0.7,>=0.6.0; extra == 'zzz-test-altair'
|
|
27
27
|
Requires-Dist: polars-lts-cpu<1.31,>=1.30.0; extra == 'zzz-test-altair'
|
28
28
|
Requires-Dist: vl-convert-python<1.8,>=1.7.0; extra == 'zzz-test-altair'
|
29
29
|
Requires-Dist: whenever<0.9,>=0.8.2; extra == 'zzz-test-altair'
|
30
|
-
Provides-Extra: zzz-test-astor
|
31
|
-
Requires-Dist: astor<0.9,>=0.8.1; extra == 'zzz-test-astor'
|
32
30
|
Provides-Extra: zzz-test-asyncio
|
33
31
|
Provides-Extra: zzz-test-atomicwrites
|
34
32
|
Requires-Dist: atomicwrites<1.5,>=1.4.1; extra == 'zzz-test-atomicwrites'
|
@@ -80,7 +78,7 @@ Provides-Extra: zzz-test-hypothesis
|
|
80
78
|
Requires-Dist: aiosqlite<0.22,>=0.21.0; extra == 'zzz-test-hypothesis'
|
81
79
|
Requires-Dist: asyncpg<0.31,>=0.30.0; extra == 'zzz-test-hypothesis'
|
82
80
|
Requires-Dist: greenlet<3.3,>=3.2.0; extra == 'zzz-test-hypothesis'
|
83
|
-
Requires-Dist: hypothesis<6.132,>=6.131.
|
81
|
+
Requires-Dist: hypothesis<6.132,>=6.131.27; extra == 'zzz-test-hypothesis'
|
84
82
|
Requires-Dist: luigi<3.7,>=3.6.0; extra == 'zzz-test-hypothesis'
|
85
83
|
Requires-Dist: numpy<2.3,>=2.2.6; extra == 'zzz-test-hypothesis'
|
86
84
|
Requires-Dist: pathvalidate<3.3,>=3.2.3; extra == 'zzz-test-hypothesis'
|
@@ -146,7 +144,7 @@ Requires-Dist: atomicwrites<1.5,>=1.4.1; extra == 'zzz-test-pydantic'
|
|
146
144
|
Requires-Dist: pydantic<2.12,>=2.11.4; extra == 'zzz-test-pydantic'
|
147
145
|
Provides-Extra: zzz-test-pyinstrument
|
148
146
|
Requires-Dist: atomicwrites<1.5,>=1.4.1; extra == 'zzz-test-pyinstrument'
|
149
|
-
Requires-Dist: pyinstrument<5.1,>=5.0.
|
147
|
+
Requires-Dist: pyinstrument<5.1,>=5.0.2; extra == 'zzz-test-pyinstrument'
|
150
148
|
Requires-Dist: tzlocal<5.4,>=5.3.1; extra == 'zzz-test-pyinstrument'
|
151
149
|
Provides-Extra: zzz-test-pyrsistent
|
152
150
|
Requires-Dist: pyrsistent<0.21,>=0.20.0; extra == 'zzz-test-pyrsistent'
|
@@ -1,7 +1,6 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=J1Gf3FyEmeotls_D_lGJIjDWsDDZcqnYOQZ1egNnqYs,60
|
2
2
|
utilities/altair.py,sha256=Gpja-flOo-Db0PIPJLJsgzAlXWoKUjPU1qY-DQ829ek,9156
|
3
|
-
utilities/
|
4
|
-
utilities/asyncio.py,sha256=joGmwv-WiDLYoK4q41TtVgfIT23s8Ok46jT_yEQGjaM,28240
|
3
|
+
utilities/asyncio.py,sha256=gr2eUx0E6LiCup6VKgUGwh8lAUriGdX2TlK-PZdlvfo,28284
|
5
4
|
utilities/atomicwrites.py,sha256=geFjn9Pwn-tTrtoGjDDxWli9NqbYfy3gGL6ZBctiqSo,5393
|
6
5
|
utilities/atools.py,sha256=IYMuFSFGSKyuQmqD6v5IUtDlz8PPw0Sr87Cub_gRU3M,1168
|
7
6
|
utilities/cachetools.py,sha256=C1zqOg7BYz0IfQFK8e3qaDDgEZxDpo47F15RTfJM37Q,2910
|
@@ -88,7 +87,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
88
87
|
utilities/whenever.py,sha256=jS31ZAY5OMxFxLja_Yo5Fidi87Pd-GoVZ7Vi_teqVDA,16743
|
89
88
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
90
89
|
utilities/zoneinfo.py,sha256=-5j7IQ9nb7gR43rdgA7ms05im-XuqhAk9EJnQBXxCoQ,1874
|
91
|
-
dycw_utilities-0.
|
92
|
-
dycw_utilities-0.
|
93
|
-
dycw_utilities-0.
|
94
|
-
dycw_utilities-0.
|
90
|
+
dycw_utilities-0.125.1.dist-info/METADATA,sha256=kZ35w8nseblmp9RraacEJcl9ZAIQls6J8FPSiaX3eT0,12852
|
91
|
+
dycw_utilities-0.125.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
92
|
+
dycw_utilities-0.125.1.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
93
|
+
dycw_utilities-0.125.1.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/asyncio.py
CHANGED
@@ -624,11 +624,12 @@ class InfiniteQueueLooper(InfiniteLooper[THashable], Generic[THashable, _T]):
|
|
624
624
|
"""Put items into the queue at the end without blocking."""
|
625
625
|
self._queue.put_right_nowait(*items) # pragma: no cover
|
626
626
|
|
627
|
-
async def run_until_empty(self) -> None:
|
627
|
+
async def run_until_empty(self, *, stop: bool = False) -> None:
|
628
628
|
"""Run until the queue is empty."""
|
629
629
|
while not self.empty():
|
630
630
|
await self._process_queue()
|
631
|
-
|
631
|
+
if stop:
|
632
|
+
await self.stop()
|
632
633
|
|
633
634
|
|
634
635
|
##
|
utilities/astor.py
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from contextlib import suppress
|
4
|
-
from subprocess import CalledProcessError, check_call
|
5
|
-
from typing import TYPE_CHECKING
|
6
|
-
|
7
|
-
from astor import to_source
|
8
|
-
|
9
|
-
from utilities.tempfile import TemporaryDirectory
|
10
|
-
|
11
|
-
if TYPE_CHECKING:
|
12
|
-
from ast import Module
|
13
|
-
|
14
|
-
|
15
|
-
def module_to_source(module: Module, /) -> str:
|
16
|
-
"""Write a module as a `ruff`-formatted string."""
|
17
|
-
src = to_source(module)
|
18
|
-
with TemporaryDirectory() as temp:
|
19
|
-
path = temp.joinpath("temp.py")
|
20
|
-
with path.open(mode="w") as fh:
|
21
|
-
_ = fh.write(src)
|
22
|
-
with suppress(CalledProcessError, FileNotFoundError):
|
23
|
-
_ = check_call(["ruff", "format", str(path)])
|
24
|
-
with path.open() as fh:
|
25
|
-
return fh.read()
|
26
|
-
|
27
|
-
|
28
|
-
__all__ = ["module_to_source"]
|
File without changes
|
File without changes
|