omdev 0.0.0.dev486__py3-none-any.whl → 0.0.0.dev500__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.

Files changed (43) hide show
  1. omdev/.omlish-manifests.json +1 -1
  2. omdev/README.md +51 -0
  3. omdev/__about__.py +4 -2
  4. omdev/ci/cli.py +1 -1
  5. omdev/cli/clicli.py +37 -7
  6. omdev/dataclasses/cli.py +1 -1
  7. omdev/interp/cli.py +1 -1
  8. omdev/interp/types.py +3 -2
  9. omdev/interp/uv/provider.py +36 -0
  10. omdev/manifests/main.py +1 -1
  11. omdev/packaging/revisions.py +1 -1
  12. omdev/py/tools/pipdepup.py +150 -93
  13. omdev/pyproject/cli.py +1 -1
  14. omdev/pyproject/pkg.py +1 -1
  15. omdev/pyproject/reqs.py +8 -7
  16. omdev/pyproject/tools/aboutdeps.py +5 -0
  17. omdev/scripts/ci.py +361 -25
  18. omdev/scripts/interp.py +43 -8
  19. omdev/scripts/lib/logs.py +117 -21
  20. omdev/scripts/pyproject.py +415 -39
  21. omdev/tools/git/cli.py +43 -13
  22. omdev/tools/json/formats.py +2 -0
  23. omdev/tools/jsonview/cli.py +19 -61
  24. omdev/tools/jsonview/resources/jsonview.html.j2 +43 -0
  25. omdev/tools/pawk/README.md +195 -0
  26. omdev/tui/apps/edit/main.py +5 -1
  27. omdev/tui/apps/irc/app.py +28 -20
  28. omdev/tui/apps/irc/commands.py +1 -1
  29. omdev/tui/rich/__init__.py +12 -0
  30. omdev/tui/textual/__init__.py +41 -2
  31. omdev/tui/textual/app2.py +6 -1
  32. omdev/tui/textual/debug/__init__.py +10 -0
  33. omdev/tui/textual/debug/dominfo.py +151 -0
  34. omdev/tui/textual/debug/screen.py +24 -0
  35. omdev/tui/textual/devtools.py +187 -0
  36. omdev/tui/textual/logging2.py +20 -0
  37. omdev/tui/textual/types.py +45 -0
  38. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/METADATA +10 -6
  39. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/RECORD +43 -34
  40. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/WHEEL +0 -0
  41. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/entry_points.txt +0 -0
  42. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/licenses/LICENSE +0 -0
  43. {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev500.dist-info}/top_level.txt +0 -0
omdev/scripts/interp.py CHANGED
@@ -70,10 +70,10 @@ def __omlish_amalg__(): # noqa
70
70
  dict(path='../../omlish/lite/timeouts.py', sha1='a0f673033a6943f242e35848d78a41892b9c62a1'),
71
71
  dict(path='../../omlish/logs/protocols.py', sha1='05ca4d1d7feb50c4e3b9f22ee371aa7bf4b3dbd1'),
72
72
  dict(path='../../omlish/logs/std/json.py', sha1='2a75553131e4d5331bb0cedde42aa183f403fc3b'),
73
- dict(path='types.py', sha1='cfc14929777fb19f723c875bcafc8f7c66593d6d'),
73
+ dict(path='types.py', sha1='caf068a6e81fb6e221d777b341ac5777d92b8091'),
74
74
  dict(path='../../omlish/asyncs/asyncio/timeouts.py', sha1='4d31b02b3c39b8f2fa7e94db36552fde6942e36a'),
75
75
  dict(path='../../omlish/lite/inject.py', sha1='6f097e3170019a34ff6834d36fcc9cbeed3a7ab4'),
76
- dict(path='../../omlish/logs/standard.py', sha1='818b674f7d15012f25b79f52f6e8e7368b633038'),
76
+ dict(path='../../omlish/logs/std/standard.py', sha1='5c97c1b9f7ead58d6127d047b873398f708f288d'),
77
77
  dict(path='../../omlish/subprocesses/run.py', sha1='8200e48f0c49d164df3503cd0143038d0c4d30aa'),
78
78
  dict(path='../../omlish/subprocesses/wrap.py', sha1='8a9b7d2255481fae15c05f5624b0cdc0766f4b3f'),
79
79
  dict(path='providers/base.py', sha1='f5d068c21f230d742e9015b033cd6320f4c68898'),
@@ -87,13 +87,13 @@ def __omlish_amalg__(): # noqa
87
87
  dict(path='providers/running.py', sha1='85c9cc69ff6fbd6c8cf78ed6262619a30856c2f1'),
88
88
  dict(path='providers/system.py', sha1='9638a154475ca98775159d27739563ac7fb2eb16'),
89
89
  dict(path='pyenv/install.py', sha1='4a10a19717364b4ba9f3b8bf1d12621cf21ba8b8'),
90
- dict(path='uv/provider.py', sha1='997dc9453589a4cee0658d2fa0893c4ec60b5a0d'),
90
+ dict(path='uv/provider.py', sha1='3c3980878ad2b9fd2cd02172f9424954759c7f06'),
91
91
  dict(path='providers/inject.py', sha1='7cc9ebf58cf2ec09545321456bd9da9f9a3a79fb'),
92
92
  dict(path='pyenv/provider.py', sha1='377542ce01a35849e2a5b4a4dbafedc26882f983'),
93
93
  dict(path='uv/inject.py', sha1='e95d058c2340baa5a3155ec3440f311d1daa10a8'),
94
94
  dict(path='pyenv/inject.py', sha1='b8fb68f5a7cae86c70fe1bad6c29a8b2dfc985c3'),
95
95
  dict(path='inject.py', sha1='b039abbadf0b096d2724182af2e0ebda2a230852'),
96
- dict(path='cli.py', sha1='28d807b2080447c179a9ef17b3efd83dd513027b'),
96
+ dict(path='cli.py', sha1='6b747ba4f91e0ab6290b791c2c274f268d11c33e'),
97
97
  ],
98
98
  )
99
99
 
@@ -3175,9 +3175,10 @@ class InterpSpecifier:
3175
3175
  def parse(cls, s: str) -> 'InterpSpecifier':
3176
3176
  s, o = InterpOpts.parse_suffix(s)
3177
3177
  if not any(s.startswith(o) for o in Specifier.OPERATORS):
3178
- s = '~=' + s
3179
3178
  if s.count('.') < 2:
3180
- s += '.0'
3179
+ s = '~=' + s + '.0'
3180
+ else:
3181
+ s = '==' + s
3181
3182
  return cls(
3182
3183
  specifier=Specifier(s),
3183
3184
  opts=o,
@@ -4300,10 +4301,9 @@ inj = InjectionApi()
4300
4301
 
4301
4302
 
4302
4303
  ########################################
4303
- # ../../../omlish/logs/standard.py
4304
+ # ../../../omlish/logs/std/standard.py
4304
4305
  """
4305
4306
  TODO:
4306
- - !! move to std !!
4307
4307
  - structured
4308
4308
  - prefixed
4309
4309
  - debug
@@ -5915,12 +5915,41 @@ uv run --python 3.11.6 pip
5915
5915
  uv venv --python 3.11.6 --seed barf
5916
5916
  python3 -m venv barf && barf/bin/pip install uv && barf/bin/uv venv --python 3.11.6 --seed barf2
5917
5917
  uv python find '3.13.10'
5918
+ uv python list --output-format=json
5918
5919
  """
5919
5920
 
5920
5921
 
5921
5922
  ##
5922
5923
 
5923
5924
 
5925
+ @dc.dataclass(frozen=True)
5926
+ class UvPythonListOutput:
5927
+ key: str
5928
+ version: str
5929
+
5930
+ @dc.dataclass(frozen=True)
5931
+ class VersionParts:
5932
+ major: int
5933
+ minor: int
5934
+ patch: int
5935
+
5936
+ version_parts: VersionParts
5937
+
5938
+ path: ta.Optional[str]
5939
+ symlink: ta.Optional[str]
5940
+
5941
+ url: str
5942
+
5943
+ os: str # emscripten linux macos
5944
+ variant: str # default freethreaded
5945
+ implementation: str # cpython graalpy pyodide pypy
5946
+ arch: str # aarch64 wasm32 x86_64
5947
+ libc: str # gnu musl none
5948
+
5949
+
5950
+ ##
5951
+
5952
+
5924
5953
  class UvInterpProvider(InterpProvider):
5925
5954
  def __init__(
5926
5955
  self,
@@ -5941,6 +5970,12 @@ class UvInterpProvider(InterpProvider):
5941
5970
  async def get_installed_version(self, version: InterpVersion) -> Interp:
5942
5971
  raise NotImplementedError
5943
5972
 
5973
+ # async def get_installable_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
5974
+ # return []
5975
+
5976
+ # async def install_version(self, version: InterpVersion) -> Interp:
5977
+ # raise TypeError
5978
+
5944
5979
 
5945
5980
  ########################################
5946
5981
  # ../providers/inject.py
omdev/scripts/lib/logs.py CHANGED
@@ -41,12 +41,12 @@ def __omlish_amalg__(): # noqa
41
41
  dict(path='warnings.py', sha1='c4eb694b24773351107fcc058f3620f1dbfb6799'),
42
42
  dict(path='infos.py', sha1='4dd104bd468a8c438601dd0bbda619b47d2f1620'),
43
43
  dict(path='std/json.py', sha1='2a75553131e4d5331bb0cedde42aa183f403fc3b'),
44
- dict(path='contexts.py', sha1='7456964ade9ac66460e9ade4e242dbdc24b39501'),
45
- dict(path='standard.py', sha1='818b674f7d15012f25b79f52f6e8e7368b633038'),
46
- dict(path='base.py', sha1='a376460b11b9dc0555fd4ead5437af62c2109a4b'),
44
+ dict(path='contexts.py', sha1='1000a6d5ddfb642865ca532e34b1d50759781cf0'),
45
+ dict(path='std/standard.py', sha1='5c97c1b9f7ead58d6127d047b873398f708f288d'),
46
+ dict(path='base.py', sha1='8d06faee05fead6b1dd98c9035a5b042af4aebb1'),
47
47
  dict(path='std/records.py', sha1='8bbf6ef9eccb3a012c6ca416ddf3969450fd8fc9'),
48
- dict(path='std/loggers.py', sha1='daa35bdc4adea5006e442688017f0de3392579b7'),
49
- dict(path='_amalg.py', sha1='ec64a142cbae11f6705d0d3ee8ff9c5bc4a7f90b'),
48
+ dict(path='std/loggers.py', sha1='a569179445d6a8a942b5dcfad1d1f77702868803'),
49
+ dict(path='_amalg.py', sha1='ae5189de25ab155651a5b2f21dd0baf6eb4f3916'),
50
50
  ],
51
51
  )
52
52
 
@@ -1002,6 +1002,9 @@ class CaptureLoggingContextImpl(CaptureLoggingContext):
1002
1002
  self._infos[type(info)] = info
1003
1003
  return self
1004
1004
 
1005
+ def get_infos(self) -> ta.Mapping[ta.Type[LoggingContextInfo], LoggingContextInfo]:
1006
+ return self._infos
1007
+
1005
1008
  def get_info(self, ty: ta.Type[LoggingContextInfoT]) -> ta.Optional[LoggingContextInfoT]:
1006
1009
  return self._infos.get(ty)
1007
1010
 
@@ -1024,7 +1027,7 @@ class CaptureLoggingContextImpl(CaptureLoggingContext):
1024
1027
  _stack_offset: int
1025
1028
  _stack_info: bool
1026
1029
 
1027
- def inc_stack_offset(self, ofs: int = 1) -> 'CaptureLoggingContext':
1030
+ def inc_stack_offset(self, ofs: int = 1) -> 'CaptureLoggingContextImpl':
1028
1031
  if hasattr(self, '_stack_offset'):
1029
1032
  self._stack_offset += ofs
1030
1033
  return self
@@ -1056,10 +1059,9 @@ class CaptureLoggingContextImpl(CaptureLoggingContext):
1056
1059
 
1057
1060
 
1058
1061
  ########################################
1059
- # ../standard.py
1062
+ # ../std/standard.py
1060
1063
  """
1061
1064
  TODO:
1062
- - !! move to std !!
1063
1065
  - structured
1064
1066
  - prefixed
1065
1067
  - debug
@@ -1209,6 +1211,11 @@ class AnyLogger(Abstract, ta.Generic[T]):
1209
1211
 
1210
1212
  ##
1211
1213
 
1214
+ # This will be 1 for [Sync]Logger and 0 for AsyncLogger - in sync loggers these methods remain present on the stack,
1215
+ # in async loggers they return a coroutine to be awaited and thus aren't actually present when said coroutine is
1216
+ # awaited.
1217
+ _level_proxy_method_stack_offset: int
1218
+
1212
1219
  @ta.overload
1213
1220
  def log(self, level: LogLevel, msg: str, *args: ta.Any, **kwargs: ta.Any) -> T:
1214
1221
  ...
@@ -1223,7 +1230,14 @@ class AnyLogger(Abstract, ta.Generic[T]):
1223
1230
 
1224
1231
  @ta.final
1225
1232
  def log(self, level: LogLevel, *args, **kwargs):
1226
- return self._log(CaptureLoggingContextImpl(level, stack_offset=1), *args, **kwargs)
1233
+ return self._log(
1234
+ CaptureLoggingContextImpl(
1235
+ level,
1236
+ stack_offset=self._level_proxy_method_stack_offset,
1237
+ ),
1238
+ *args,
1239
+ **kwargs,
1240
+ )
1227
1241
 
1228
1242
  #
1229
1243
 
@@ -1241,7 +1255,14 @@ class AnyLogger(Abstract, ta.Generic[T]):
1241
1255
 
1242
1256
  @ta.final
1243
1257
  def debug(self, *args, **kwargs):
1244
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.DEBUG, stack_offset=1), *args, **kwargs)
1258
+ return self._log(
1259
+ CaptureLoggingContextImpl(
1260
+ NamedLogLevel.DEBUG,
1261
+ stack_offset=self._level_proxy_method_stack_offset,
1262
+ ),
1263
+ *args,
1264
+ **kwargs,
1265
+ )
1245
1266
 
1246
1267
  #
1247
1268
 
@@ -1259,7 +1280,14 @@ class AnyLogger(Abstract, ta.Generic[T]):
1259
1280
 
1260
1281
  @ta.final
1261
1282
  def info(self, *args, **kwargs):
1262
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.INFO, stack_offset=1), *args, **kwargs)
1283
+ return self._log(
1284
+ CaptureLoggingContextImpl(
1285
+ NamedLogLevel.INFO,
1286
+ stack_offset=self._level_proxy_method_stack_offset,
1287
+ ),
1288
+ *args,
1289
+ **kwargs,
1290
+ )
1263
1291
 
1264
1292
  #
1265
1293
 
@@ -1277,7 +1305,14 @@ class AnyLogger(Abstract, ta.Generic[T]):
1277
1305
 
1278
1306
  @ta.final
1279
1307
  def warning(self, *args, **kwargs):
1280
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.WARNING, stack_offset=1), *args, **kwargs)
1308
+ return self._log(
1309
+ CaptureLoggingContextImpl(
1310
+ NamedLogLevel.WARNING,
1311
+ stack_offset=self._level_proxy_method_stack_offset,
1312
+ ),
1313
+ *args,
1314
+ **kwargs,
1315
+ )
1281
1316
 
1282
1317
  #
1283
1318
 
@@ -1295,7 +1330,14 @@ class AnyLogger(Abstract, ta.Generic[T]):
1295
1330
 
1296
1331
  @ta.final
1297
1332
  def error(self, *args, **kwargs):
1298
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.ERROR, stack_offset=1), *args, **kwargs)
1333
+ return self._log(
1334
+ CaptureLoggingContextImpl(
1335
+ NamedLogLevel.ERROR,
1336
+ stack_offset=self._level_proxy_method_stack_offset,
1337
+ ),
1338
+ *args,
1339
+ **kwargs,
1340
+ )
1299
1341
 
1300
1342
  #
1301
1343
 
@@ -1313,7 +1355,15 @@ class AnyLogger(Abstract, ta.Generic[T]):
1313
1355
 
1314
1356
  @ta.final
1315
1357
  def exception(self, *args, exc_info: LoggingExcInfoArg = True, **kwargs):
1316
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.ERROR, exc_info=exc_info, stack_offset=1), *args, **kwargs) # noqa
1358
+ return self._log(
1359
+ CaptureLoggingContextImpl(
1360
+ NamedLogLevel.ERROR,
1361
+ exc_info=exc_info,
1362
+ stack_offset=self._level_proxy_method_stack_offset,
1363
+ ),
1364
+ *args,
1365
+ **kwargs,
1366
+ )
1317
1367
 
1318
1368
  #
1319
1369
 
@@ -1331,24 +1381,53 @@ class AnyLogger(Abstract, ta.Generic[T]):
1331
1381
 
1332
1382
  @ta.final
1333
1383
  def critical(self, *args, **kwargs):
1334
- return self._log(CaptureLoggingContextImpl(NamedLogLevel.CRITICAL, stack_offset=1), *args, **kwargs)
1384
+ return self._log(
1385
+ CaptureLoggingContextImpl(
1386
+ NamedLogLevel.CRITICAL,
1387
+ stack_offset=self._level_proxy_method_stack_offset,
1388
+ ),
1389
+ *args,
1390
+ **kwargs,
1391
+ )
1335
1392
 
1336
1393
  ##
1337
1394
 
1338
1395
  @abc.abstractmethod
1339
- def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any, **kwargs: ta.Any) -> T: # noqa
1396
+ def _log(
1397
+ self,
1398
+ ctx: CaptureLoggingContext,
1399
+ msg: ta.Union[str, tuple, LoggingMsgFn],
1400
+ *args: ta.Any,
1401
+ **kwargs: ta.Any,
1402
+ ) -> T:
1340
1403
  raise NotImplementedError
1341
1404
 
1342
1405
 
1343
1406
  class Logger(AnyLogger[None], Abstract):
1407
+ _level_proxy_method_stack_offset: int = 1
1408
+
1344
1409
  @abc.abstractmethod
1345
- def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any, **kwargs: ta.Any) -> None: # noqa
1410
+ def _log(
1411
+ self,
1412
+ ctx: CaptureLoggingContext,
1413
+ msg: ta.Union[str, tuple, LoggingMsgFn],
1414
+ *args: ta.Any,
1415
+ **kwargs: ta.Any,
1416
+ ) -> None:
1346
1417
  raise NotImplementedError
1347
1418
 
1348
1419
 
1349
1420
  class AsyncLogger(AnyLogger[ta.Awaitable[None]], Abstract):
1421
+ _level_proxy_method_stack_offset: int = 0
1422
+
1350
1423
  @abc.abstractmethod
1351
- def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any, **kwargs: ta.Any) -> ta.Awaitable[None]: # noqa
1424
+ def _log(
1425
+ self,
1426
+ ctx: CaptureLoggingContext,
1427
+ msg: ta.Union[str, tuple, LoggingMsgFn],
1428
+ *args: ta.Any,
1429
+ **kwargs: ta.Any,
1430
+ ) -> ta.Awaitable[None]:
1352
1431
  raise NotImplementedError
1353
1432
 
1354
1433
 
@@ -1363,13 +1442,25 @@ class AnyNopLogger(AnyLogger[T], Abstract):
1363
1442
 
1364
1443
  @ta.final
1365
1444
  class NopLogger(AnyNopLogger[None], Logger):
1366
- def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any, **kwargs: ta.Any) -> None: # noqa
1445
+ def _log(
1446
+ self,
1447
+ ctx: CaptureLoggingContext,
1448
+ msg: ta.Union[str, tuple, LoggingMsgFn],
1449
+ *args: ta.Any,
1450
+ **kwargs: ta.Any,
1451
+ ) -> None:
1367
1452
  pass
1368
1453
 
1369
1454
 
1370
1455
  @ta.final
1371
1456
  class AsyncNopLogger(AnyNopLogger[ta.Awaitable[None]], AsyncLogger):
1372
- async def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any, **kwargs: ta.Any) -> None: # noqa
1457
+ async def _log(
1458
+ self,
1459
+ ctx: CaptureLoggingContext,
1460
+ msg: ta.Union[str, tuple, LoggingMsgFn],
1461
+ *args: ta.Any,
1462
+ **kwargs: ta.Any,
1463
+ ) -> None:
1373
1464
  pass
1374
1465
 
1375
1466
 
@@ -2054,7 +2145,12 @@ class StdLogger(Logger):
2054
2145
  def get_effective_level(self) -> LogLevel:
2055
2146
  return self._std.getEffectiveLevel()
2056
2147
 
2057
- def _log(self, ctx: CaptureLoggingContext, msg: ta.Union[str, tuple, LoggingMsgFn], *args: ta.Any) -> None:
2148
+ def _log(
2149
+ self,
2150
+ ctx: CaptureLoggingContext,
2151
+ msg: ta.Union[str, tuple, LoggingMsgFn],
2152
+ *args: ta.Any,
2153
+ ) -> None:
2058
2154
  if not self.is_enabled_for(ctx.must_get_info(LoggingContextInfos.Level).level):
2059
2155
  return
2060
2156