omdev 0.0.0.dev154__py3-none-any.whl → 0.0.0.dev155__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.
Potentially problematic release.
This version of omdev might be problematic. Click here for more details.
- omdev/.manifests.json +1 -1
- omdev/manifests/__init__.py +1 -0
- omdev/manifests/build.py +0 -1
- omdev/manifests/main.py +1 -0
- omdev/scripts/interp.py +16 -7
- omdev/scripts/pyproject.py +26 -12
- omdev/tools/docker.py +14 -5
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/RECORD +13 -13
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev154.dist-info → omdev-0.0.0.dev155.dist-info}/top_level.txt +0 -0
omdev/.manifests.json
CHANGED
omdev/manifests/__init__.py
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @omlish-lite
|
omdev/manifests/build.py
CHANGED
omdev/manifests/main.py
CHANGED
omdev/scripts/interp.py
CHANGED
|
@@ -560,8 +560,6 @@ def async_cached_nullary(fn): # ta.Callable[..., T]) -> ta.Callable[..., T]:
|
|
|
560
560
|
"""
|
|
561
561
|
TODO:
|
|
562
562
|
- def maybe(v: lang.Maybe[T])
|
|
563
|
-
- patch / override lite.check ?
|
|
564
|
-
- checker interface?
|
|
565
563
|
"""
|
|
566
564
|
|
|
567
565
|
|
|
@@ -2408,6 +2406,13 @@ async def asyncio_subprocess_communicate(
|
|
|
2408
2406
|
return await AsyncioProcessCommunicator(proc).communicate(input, timeout) # noqa
|
|
2409
2407
|
|
|
2410
2408
|
|
|
2409
|
+
@dc.dataclass(frozen=True)
|
|
2410
|
+
class AsyncioSubprocessOutput:
|
|
2411
|
+
proc: asyncio.subprocess.Process
|
|
2412
|
+
stdout: ta.Optional[bytes]
|
|
2413
|
+
stderr: ta.Optional[bytes]
|
|
2414
|
+
|
|
2415
|
+
|
|
2411
2416
|
async def asyncio_subprocess_run(
|
|
2412
2417
|
*args: str,
|
|
2413
2418
|
input: ta.Any = None, # noqa
|
|
@@ -2415,7 +2420,7 @@ async def asyncio_subprocess_run(
|
|
|
2415
2420
|
check: bool = False, # noqa
|
|
2416
2421
|
capture_output: ta.Optional[bool] = None,
|
|
2417
2422
|
**kwargs: ta.Any,
|
|
2418
|
-
) ->
|
|
2423
|
+
) -> AsyncioSubprocessOutput:
|
|
2419
2424
|
if capture_output:
|
|
2420
2425
|
kwargs.setdefault('stdout', subprocess.PIPE)
|
|
2421
2426
|
kwargs.setdefault('stderr', subprocess.PIPE)
|
|
@@ -2434,7 +2439,11 @@ async def asyncio_subprocess_run(
|
|
|
2434
2439
|
stderr=stderr,
|
|
2435
2440
|
)
|
|
2436
2441
|
|
|
2437
|
-
return
|
|
2442
|
+
return AsyncioSubprocessOutput(
|
|
2443
|
+
proc,
|
|
2444
|
+
stdout,
|
|
2445
|
+
stderr,
|
|
2446
|
+
)
|
|
2438
2447
|
|
|
2439
2448
|
|
|
2440
2449
|
##
|
|
@@ -2447,7 +2456,7 @@ async def asyncio_subprocess_check_call(
|
|
|
2447
2456
|
timeout: ta.Optional[float] = None,
|
|
2448
2457
|
**kwargs: ta.Any,
|
|
2449
2458
|
) -> None:
|
|
2450
|
-
|
|
2459
|
+
await asyncio_subprocess_run(
|
|
2451
2460
|
*args,
|
|
2452
2461
|
stdout=stdout,
|
|
2453
2462
|
input=input,
|
|
@@ -2463,7 +2472,7 @@ async def asyncio_subprocess_check_output(
|
|
|
2463
2472
|
timeout: ta.Optional[float] = None,
|
|
2464
2473
|
**kwargs: ta.Any,
|
|
2465
2474
|
) -> bytes:
|
|
2466
|
-
|
|
2475
|
+
out = await asyncio_subprocess_run(
|
|
2467
2476
|
*args,
|
|
2468
2477
|
stdout=asyncio.subprocess.PIPE,
|
|
2469
2478
|
input=input,
|
|
@@ -2472,7 +2481,7 @@ async def asyncio_subprocess_check_output(
|
|
|
2472
2481
|
**kwargs,
|
|
2473
2482
|
)
|
|
2474
2483
|
|
|
2475
|
-
return check.not_none(stdout)
|
|
2484
|
+
return check.not_none(out.stdout)
|
|
2476
2485
|
|
|
2477
2486
|
|
|
2478
2487
|
async def asyncio_subprocess_check_output_str(*args: str, **kwargs: ta.Any) -> str:
|
omdev/scripts/pyproject.py
CHANGED
|
@@ -1852,8 +1852,6 @@ def async_cached_nullary(fn): # ta.Callable[..., T]) -> ta.Callable[..., T]:
|
|
|
1852
1852
|
"""
|
|
1853
1853
|
TODO:
|
|
1854
1854
|
- def maybe(v: lang.Maybe[T])
|
|
1855
|
-
- patch / override lite.check ?
|
|
1856
|
-
- checker interface?
|
|
1857
1855
|
"""
|
|
1858
1856
|
|
|
1859
1857
|
|
|
@@ -3756,7 +3754,8 @@ def configure_standard_logging(
|
|
|
3756
3754
|
"""
|
|
3757
3755
|
TODO:
|
|
3758
3756
|
- pickle stdlib objs? have to pin to 3.8 pickle protocol, will be cross-version
|
|
3759
|
-
-
|
|
3757
|
+
- namedtuple
|
|
3758
|
+
- literals
|
|
3760
3759
|
"""
|
|
3761
3760
|
|
|
3762
3761
|
|
|
@@ -4046,14 +4045,18 @@ class ObjMarshalerManager:
|
|
|
4046
4045
|
) -> ObjMarshaler:
|
|
4047
4046
|
if isinstance(ty, type):
|
|
4048
4047
|
if abc.ABC in ty.__bases__:
|
|
4049
|
-
|
|
4048
|
+
impls = [ity for ity in deep_subclasses(ty) if abc.ABC not in ity.__bases__] # type: ignore
|
|
4049
|
+
if all(ity.__qualname__.endswith(ty.__name__) for ity in impls):
|
|
4050
|
+
ins = {ity: snake_case(ity.__qualname__[:-len(ty.__name__)]) for ity in impls}
|
|
4051
|
+
else:
|
|
4052
|
+
ins = {ity: ity.__qualname__ for ity in impls}
|
|
4053
|
+
return PolymorphicObjMarshaler.of([
|
|
4050
4054
|
PolymorphicObjMarshaler.Impl(
|
|
4051
4055
|
ity,
|
|
4052
|
-
|
|
4056
|
+
itn,
|
|
4053
4057
|
rec(ity),
|
|
4054
4058
|
)
|
|
4055
|
-
for ity in
|
|
4056
|
-
if abc.ABC not in ity.__bases__
|
|
4059
|
+
for ity, itn in ins.items()
|
|
4057
4060
|
])
|
|
4058
4061
|
|
|
4059
4062
|
if issubclass(ty, enum.Enum):
|
|
@@ -5222,6 +5225,13 @@ async def asyncio_subprocess_communicate(
|
|
|
5222
5225
|
return await AsyncioProcessCommunicator(proc).communicate(input, timeout) # noqa
|
|
5223
5226
|
|
|
5224
5227
|
|
|
5228
|
+
@dc.dataclass(frozen=True)
|
|
5229
|
+
class AsyncioSubprocessOutput:
|
|
5230
|
+
proc: asyncio.subprocess.Process
|
|
5231
|
+
stdout: ta.Optional[bytes]
|
|
5232
|
+
stderr: ta.Optional[bytes]
|
|
5233
|
+
|
|
5234
|
+
|
|
5225
5235
|
async def asyncio_subprocess_run(
|
|
5226
5236
|
*args: str,
|
|
5227
5237
|
input: ta.Any = None, # noqa
|
|
@@ -5229,7 +5239,7 @@ async def asyncio_subprocess_run(
|
|
|
5229
5239
|
check: bool = False, # noqa
|
|
5230
5240
|
capture_output: ta.Optional[bool] = None,
|
|
5231
5241
|
**kwargs: ta.Any,
|
|
5232
|
-
) ->
|
|
5242
|
+
) -> AsyncioSubprocessOutput:
|
|
5233
5243
|
if capture_output:
|
|
5234
5244
|
kwargs.setdefault('stdout', subprocess.PIPE)
|
|
5235
5245
|
kwargs.setdefault('stderr', subprocess.PIPE)
|
|
@@ -5248,7 +5258,11 @@ async def asyncio_subprocess_run(
|
|
|
5248
5258
|
stderr=stderr,
|
|
5249
5259
|
)
|
|
5250
5260
|
|
|
5251
|
-
return
|
|
5261
|
+
return AsyncioSubprocessOutput(
|
|
5262
|
+
proc,
|
|
5263
|
+
stdout,
|
|
5264
|
+
stderr,
|
|
5265
|
+
)
|
|
5252
5266
|
|
|
5253
5267
|
|
|
5254
5268
|
##
|
|
@@ -5261,7 +5275,7 @@ async def asyncio_subprocess_check_call(
|
|
|
5261
5275
|
timeout: ta.Optional[float] = None,
|
|
5262
5276
|
**kwargs: ta.Any,
|
|
5263
5277
|
) -> None:
|
|
5264
|
-
|
|
5278
|
+
await asyncio_subprocess_run(
|
|
5265
5279
|
*args,
|
|
5266
5280
|
stdout=stdout,
|
|
5267
5281
|
input=input,
|
|
@@ -5277,7 +5291,7 @@ async def asyncio_subprocess_check_output(
|
|
|
5277
5291
|
timeout: ta.Optional[float] = None,
|
|
5278
5292
|
**kwargs: ta.Any,
|
|
5279
5293
|
) -> bytes:
|
|
5280
|
-
|
|
5294
|
+
out = await asyncio_subprocess_run(
|
|
5281
5295
|
*args,
|
|
5282
5296
|
stdout=asyncio.subprocess.PIPE,
|
|
5283
5297
|
input=input,
|
|
@@ -5286,7 +5300,7 @@ async def asyncio_subprocess_check_output(
|
|
|
5286
5300
|
**kwargs,
|
|
5287
5301
|
)
|
|
5288
5302
|
|
|
5289
|
-
return check.not_none(stdout)
|
|
5303
|
+
return check.not_none(out.stdout)
|
|
5290
5304
|
|
|
5291
5305
|
|
|
5292
5306
|
async def asyncio_subprocess_check_output_str(*args: str, **kwargs: ta.Any) -> str:
|
omdev/tools/docker.py
CHANGED
|
@@ -232,19 +232,28 @@ class Cli(ap.Cli):
|
|
|
232
232
|
|
|
233
233
|
print(f'{svc_name}: {lt}')
|
|
234
234
|
|
|
235
|
+
#
|
|
236
|
+
|
|
235
237
|
@ap.command()
|
|
236
238
|
def dockly(self) -> None:
|
|
237
239
|
os.execl(
|
|
238
240
|
exe := docker_exe(),
|
|
239
241
|
exe,
|
|
240
|
-
'run',
|
|
241
|
-
'-
|
|
242
|
-
'--rm',
|
|
243
|
-
'-v',
|
|
244
|
-
'/var/run/docker.sock:/var/run/docker.sock',
|
|
242
|
+
'run', '-it', '--rm',
|
|
243
|
+
'-v', '/var/run/docker.sock:/var/run/docker.sock',
|
|
245
244
|
'lirantal/dockly',
|
|
246
245
|
)
|
|
247
246
|
|
|
247
|
+
@ap.command()
|
|
248
|
+
def lazy(self) -> None:
|
|
249
|
+
os.execl(
|
|
250
|
+
exe := docker_exe(),
|
|
251
|
+
exe,
|
|
252
|
+
'run', '-it', '--rm',
|
|
253
|
+
'-v', '/var/run/docker.sock:/var/run/docker.sock',
|
|
254
|
+
'lazyteam/lazydocker',
|
|
255
|
+
)
|
|
256
|
+
|
|
248
257
|
|
|
249
258
|
# @omlish-manifest
|
|
250
259
|
_CLI_MODULE = CliModule('docker', __name__)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev155
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
|
15
|
+
Requires-Dist: omlish==0.0.0.dev155
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
omdev/.manifests.json,sha256=
|
|
1
|
+
omdev/.manifests.json,sha256=Dm-Nd3V7Ry9d3-tO5OnUM7IYT2_ldruPEjxcSr4BA1U,8306
|
|
2
2
|
omdev/__about__.py,sha256=n5x-SO70OgbDQFzQ1d7sZDVMsnkQc4PxQZPFaIQFa0E,1281
|
|
3
3
|
omdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
omdev/bracepy.py,sha256=I8EdqtDvxzAi3I8TuMEW-RBfwXfqKbwp06CfOdj3L1o,2743
|
|
@@ -84,10 +84,10 @@ omdev/magic/find.py,sha256=tTmpWXAleaXG3_kNOsRF7s8D0CpYMXbdz6-HbCNBW90,7070
|
|
|
84
84
|
omdev/magic/magic.py,sha256=h1nxoW6CV1MRCiHjDt3sO4kmG0qTtTRbkDNiPLGo2BE,224
|
|
85
85
|
omdev/magic/prepare.py,sha256=V5jYT2AeFmazzPwk9sNismSouLwFXEoik6FwKcWCNUY,589
|
|
86
86
|
omdev/magic/styles.py,sha256=YQ-HgwfvFWPj-o_705E7A-yehEn1G1hRNLPWpeWCK0U,605
|
|
87
|
-
omdev/manifests/__init__.py,sha256=
|
|
87
|
+
omdev/manifests/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
88
88
|
omdev/manifests/__main__.py,sha256=JqyVDyV7_jo-NZ3wSs5clDU_xCMlxzJv-XFohoZWQ7E,174
|
|
89
|
-
omdev/manifests/build.py,sha256=
|
|
90
|
-
omdev/manifests/main.py,sha256=
|
|
89
|
+
omdev/manifests/build.py,sha256=jQoNRSt9_4uh25xtkxzxx7WQ14TOJlHOjz5MGJCAlk4,8781
|
|
90
|
+
omdev/manifests/main.py,sha256=XJ7s97S2GhOpXwrlXRJJkQypkVY_YAXwNdXZIxEl3oA,2122
|
|
91
91
|
omdev/mypy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
92
|
omdev/mypy/debug.py,sha256=WcZw-3Z1njg_KFGqi3DB6RuqbBa3dLArJnjVCuY1Mn0,3003
|
|
93
93
|
omdev/packaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -123,8 +123,8 @@ omdev/scripts/bumpversion.py,sha256=Kn7fo73Hs8uJh3Hi3EIyLOlzLPWAC6dwuD_lZ3cIzuY,
|
|
|
123
123
|
omdev/scripts/execrss.py,sha256=mR0G0wERBYtQmVIn63lCIIFb5zkCM6X_XOENDFYDBKc,651
|
|
124
124
|
omdev/scripts/exectime.py,sha256=sFb376GflU6s9gNX-2-we8hgH6w5MuQNS9g6i4SqJIo,610
|
|
125
125
|
omdev/scripts/importtrace.py,sha256=oa7CtcWJVMNDbyIEiRHej6ICfABfErMeo4_haIqe18Q,14041
|
|
126
|
-
omdev/scripts/interp.py,sha256=
|
|
127
|
-
omdev/scripts/pyproject.py,sha256=
|
|
126
|
+
omdev/scripts/interp.py,sha256=VmzTBpR7WkX41z3dlwiodyUidLEC2GjghFcbRTW1mqc,96612
|
|
127
|
+
omdev/scripts/pyproject.py,sha256=v5R_A_y_in7JZbygAWQL4aUYoger0Yqqny5511nlcQk,210494
|
|
128
128
|
omdev/scripts/slowcat.py,sha256=lssv4yrgJHiWfOiHkUut2p8E8Tq32zB-ujXESQxFFHY,2728
|
|
129
129
|
omdev/scripts/tmpexec.py,sha256=WTYcf56Tj2qjYV14AWmV8SfT0u6Y8eIU6cKgQRvEK3c,1442
|
|
130
130
|
omdev/toml/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
@@ -133,7 +133,7 @@ omdev/toml/writer.py,sha256=lk3on3YXVbWuLJa-xsOzOhs1bBAT1vXqw4mBbluZl_w,3040
|
|
|
133
133
|
omdev/tools/__init__.py,sha256=iVJAOQ0viGTQOm0DLX4uZLro-9jOioYJGLg9s0kDx1A,78
|
|
134
134
|
omdev/tools/cloc.py,sha256=13lUsYLyn1LoelhsCeKrRkIwwPE0x54JmdhXJ_lvWh0,3811
|
|
135
135
|
omdev/tools/doc.py,sha256=iblgUq9_7JZN2i8qmvewrz4OX0paObscBaCj8u77WqI,2555
|
|
136
|
-
omdev/tools/docker.py,sha256=
|
|
136
|
+
omdev/tools/docker.py,sha256=o9Chdia-xpJ5pisVLh4V7A3Flbb9_MuVRrs8VYZgEyY,7372
|
|
137
137
|
omdev/tools/git.py,sha256=1PGHAVPNTb-ezCrPaQWCxwpUyEy_1QVSWDAa5Wbm9iA,6988
|
|
138
138
|
omdev/tools/importscan.py,sha256=nhJIhtjDY6eFVlReP7fegvv6L5ZjN-Z2VeyhsBonev4,4639
|
|
139
139
|
omdev/tools/mkrelimp.py,sha256=wsJAjTIf3nqcSfnT9TkDpS1VUOoM9W2Az5tZdWuzyLM,4054
|
|
@@ -153,9 +153,9 @@ omdev/tools/json/rendering.py,sha256=jNShMfCpFR9-Kcn6cUFuOChXHjg71diuTC4x7Ofmz-o
|
|
|
153
153
|
omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
154
|
omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
|
|
155
155
|
omdev/tools/pawk/pawk.py,sha256=Eckymn22GfychCQcQi96BFqRo_LmiJ-EPhC8TTUJdB4,11446
|
|
156
|
-
omdev-0.0.0.
|
|
157
|
-
omdev-0.0.0.
|
|
158
|
-
omdev-0.0.0.
|
|
159
|
-
omdev-0.0.0.
|
|
160
|
-
omdev-0.0.0.
|
|
161
|
-
omdev-0.0.0.
|
|
156
|
+
omdev-0.0.0.dev155.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
157
|
+
omdev-0.0.0.dev155.dist-info/METADATA,sha256=Dgg7ozCLzJTs8nXBXiEWuG46gcThxtnDSChkeGrgT8o,1760
|
|
158
|
+
omdev-0.0.0.dev155.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
159
|
+
omdev-0.0.0.dev155.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
160
|
+
omdev-0.0.0.dev155.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
161
|
+
omdev-0.0.0.dev155.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|