omdev 0.0.0.dev486__py3-none-any.whl → 0.0.0.dev495__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/.omlish-manifests.json +1 -1
- omdev/README.md +51 -0
- omdev/__about__.py +4 -2
- omdev/ci/cli.py +1 -1
- omdev/cli/clicli.py +37 -7
- omdev/dataclasses/cli.py +1 -1
- omdev/interp/cli.py +1 -1
- omdev/interp/types.py +3 -2
- omdev/interp/uv/provider.py +36 -0
- omdev/manifests/main.py +1 -1
- omdev/packaging/revisions.py +1 -1
- omdev/py/tools/pipdepup.py +150 -93
- omdev/pyproject/cli.py +1 -1
- omdev/pyproject/tools/aboutdeps.py +5 -0
- omdev/scripts/ci.py +361 -25
- omdev/scripts/interp.py +43 -8
- omdev/scripts/lib/logs.py +117 -21
- omdev/scripts/pyproject.py +404 -29
- omdev/tools/json/formats.py +2 -0
- omdev/tools/jsonview/cli.py +19 -61
- omdev/tools/jsonview/resources/jsonview.html.j2 +43 -0
- omdev/tools/pawk/README.md +195 -0
- omdev/tui/apps/edit/main.py +5 -1
- omdev/tui/apps/irc/app.py +28 -20
- omdev/tui/apps/irc/commands.py +1 -1
- omdev/tui/rich/__init__.py +12 -0
- omdev/tui/textual/__init__.py +41 -2
- omdev/tui/textual/app2.py +6 -1
- omdev/tui/textual/debug/__init__.py +10 -0
- omdev/tui/textual/debug/dominfo.py +151 -0
- omdev/tui/textual/debug/screen.py +24 -0
- omdev/tui/textual/devtools.py +187 -0
- omdev/tui/textual/logging2.py +20 -0
- omdev/tui/textual/types.py +45 -0
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/METADATA +10 -6
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/RECORD +40 -31
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev486.dist-info → omdev-0.0.0.dev495.dist-info}/top_level.txt +0 -0
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='
|
|
45
|
-
dict(path='standard.py', sha1='
|
|
46
|
-
dict(path='base.py', sha1='
|
|
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='
|
|
49
|
-
dict(path='_amalg.py', sha1='
|
|
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) -> '
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|