omlish 0.0.0.dev133__py3-none-any.whl → 0.0.0.dev135__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- omlish/__about__.py +2 -2
- omlish/diag/_pycharm/runhack.py +5 -2
- omlish/lite/fdio/corohttp.py +5 -1
- omlish/lite/marshal.py +9 -6
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/RECORD +10 -10
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev133.dist-info → omlish-0.0.0.dev135.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/diag/_pycharm/runhack.py
CHANGED
@@ -1278,7 +1278,7 @@ class HackRunner:
|
|
1278
1278
|
def run(self) -> None:
|
1279
1279
|
# breakpoint()
|
1280
1280
|
|
1281
|
-
env = self._env()
|
1281
|
+
env = self._env() # type: RunEnv
|
1282
1282
|
self._debug(env.as_json())
|
1283
1283
|
|
1284
1284
|
if not self._is_enabled:
|
@@ -1292,6 +1292,10 @@ class HackRunner:
|
|
1292
1292
|
self._debug('not pycharm hosted')
|
1293
1293
|
return
|
1294
1294
|
|
1295
|
+
if len(env.orig_argv) < 2:
|
1296
|
+
self._debug('no enough interpreter arguments')
|
1297
|
+
return
|
1298
|
+
|
1295
1299
|
exe = self._exe()
|
1296
1300
|
dec = self._decider().decide(exe.target)
|
1297
1301
|
if dec is None:
|
@@ -1301,7 +1305,6 @@ class HackRunner:
|
|
1301
1305
|
self._debug(dec.as_json())
|
1302
1306
|
self._apply(dec)
|
1303
1307
|
|
1304
|
-
|
1305
1308
|
##
|
1306
1309
|
|
1307
1310
|
|
omlish/lite/fdio/corohttp.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# ruff: noqa: UP006 UP007
|
1
2
|
import socket
|
2
3
|
import typing as ta
|
3
4
|
|
@@ -22,6 +23,7 @@ class CoroHttpServerConnectionFdIoHandler(SocketFdIoHandler):
|
|
22
23
|
*,
|
23
24
|
read_size: int = 0x10000,
|
24
25
|
write_size: int = 0x10000,
|
26
|
+
log_handler: ta.Optional[ta.Callable[[CoroHttpServer, CoroHttpServer.AnyLogIo], None]] = None,
|
25
27
|
) -> None:
|
26
28
|
check_state(not sock.getblocking())
|
27
29
|
|
@@ -30,6 +32,7 @@ class CoroHttpServerConnectionFdIoHandler(SocketFdIoHandler):
|
|
30
32
|
self._handler = handler
|
31
33
|
self._read_size = read_size
|
32
34
|
self._write_size = write_size
|
35
|
+
self._log_handler = log_handler
|
33
36
|
|
34
37
|
self._read_buf = ReadableListBuffer()
|
35
38
|
self._write_buf: IncrementalWriteBuffer | None = None
|
@@ -64,7 +67,8 @@ class CoroHttpServerConnectionFdIoHandler(SocketFdIoHandler):
|
|
64
67
|
break
|
65
68
|
|
66
69
|
if isinstance(o, CoroHttpServer.AnyLogIo):
|
67
|
-
|
70
|
+
if self._log_handler is not None:
|
71
|
+
self._log_handler(self._coro_srv, o)
|
68
72
|
o = None
|
69
73
|
|
70
74
|
elif isinstance(o, CoroHttpServer.ReadIo):
|
omlish/lite/marshal.py
CHANGED
@@ -165,6 +165,13 @@ class PolymorphicObjMarshaler(ObjMarshaler):
|
|
165
165
|
impls_by_ty: ta.Mapping[type, Impl]
|
166
166
|
impls_by_tag: ta.Mapping[str, Impl]
|
167
167
|
|
168
|
+
@classmethod
|
169
|
+
def of(cls, impls: ta.Iterable[Impl]) -> 'PolymorphicObjMarshaler':
|
170
|
+
return cls(
|
171
|
+
{i.ty: i for i in impls},
|
172
|
+
{i.tag: i for i in impls},
|
173
|
+
)
|
174
|
+
|
168
175
|
def marshal(self, o: ta.Any) -> ta.Any:
|
169
176
|
impl = self.impls_by_ty[type(o)]
|
170
177
|
return {impl.tag: impl.m.marshal(o)}
|
@@ -252,7 +259,7 @@ def _make_obj_marshaler(
|
|
252
259
|
) -> ObjMarshaler:
|
253
260
|
if isinstance(ty, type):
|
254
261
|
if abc.ABC in ty.__bases__:
|
255
|
-
|
262
|
+
return PolymorphicObjMarshaler.of([ # type: ignore
|
256
263
|
PolymorphicObjMarshaler.Impl(
|
257
264
|
ity,
|
258
265
|
ity.__qualname__,
|
@@ -260,11 +267,7 @@ def _make_obj_marshaler(
|
|
260
267
|
)
|
261
268
|
for ity in deep_subclasses(ty)
|
262
269
|
if abc.ABC not in ity.__bases__
|
263
|
-
]
|
264
|
-
return PolymorphicObjMarshaler(
|
265
|
-
{i.ty: i for i in impls},
|
266
|
-
{i.tag: i for i in impls},
|
267
|
-
)
|
270
|
+
])
|
268
271
|
|
269
272
|
if issubclass(ty, enum.Enum):
|
270
273
|
return EnumObjMarshaler(ty)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=CxGnj-UiRPlZgmgWoovDWrOnqpSEmBy_kqA7cdfSA3w,1431
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=v2e0yLh0hfZ_l8fAvWlrUY6UTj7j9U62ZZUsPMsDHPI,3379
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/argparse.py,sha256=cqKGAqcxuxv_s62z0gq29L9KAvg_3-_rFvXKjVpRJjo,8126
|
5
5
|
omlish/c3.py,sha256=ubu7lHwss5V4UznbejAI0qXhXahrU01MysuHOZI9C4U,8116
|
@@ -160,7 +160,7 @@ omlish/diag/pycharm.py,sha256=7-r_F-whXt8v-0dehxAX-MeMFPM3iZXX9IfeL0GfUtk,4643
|
|
160
160
|
omlish/diag/pydevd.py,sha256=UN55ZjkWLCVyHxE2CNRRYamuvSKfzWsn0D5oczRTXO4,7536
|
161
161
|
omlish/diag/threads.py,sha256=1-x02VCDZ407gfbtXm1pWK-ubqhqfePm9PMqkHCVoqk,3642
|
162
162
|
omlish/diag/_pycharm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
163
|
-
omlish/diag/_pycharm/runhack.py,sha256=
|
163
|
+
omlish/diag/_pycharm/runhack.py,sha256=kuRgiMYYsM0wkHwJfbN2ao79OFxmfjV1vkGaEspLKRA,35080
|
164
164
|
omlish/diag/replserver/__init__.py,sha256=uLo6V2aQ29v9z3IMELlPDSlG3_2iOT4-_X8VniF-EgE,235
|
165
165
|
omlish/diag/replserver/__main__.py,sha256=LmU41lQ58bm1h4Mx7S8zhE_uEBSC6kPcp9mn5JRpulA,32
|
166
166
|
omlish/diag/replserver/console.py,sha256=XzBDVhYlr8FY6ym4OwoaIHuFOHnGK3dTYlMDIOMUUlA,7410
|
@@ -308,7 +308,7 @@ omlish/lite/io.py,sha256=3ECgUXdRnXyS6pGTSoVr6oB4moI38EpWxTq08zaTM-U,5339
|
|
308
308
|
omlish/lite/journald.py,sha256=f5Y2Q6-6O3iK_7MoGiwZwoQEOcP7LfkxxQNUR9tMjJM,3882
|
309
309
|
omlish/lite/json.py,sha256=7-02Ny4fq-6YAu5ynvqoijhuYXWpLmfCI19GUeZnb1c,740
|
310
310
|
omlish/lite/logs.py,sha256=1pcGu0ekhVCcLUckLSP16VccnAoprjtl5Vkdfm7y1Wg,6184
|
311
|
-
omlish/lite/marshal.py,sha256=
|
311
|
+
omlish/lite/marshal.py,sha256=rAOAuJ4uGtcODxYR0YjhO6UGaFOdDuRXJcgTXdytBAw,9559
|
312
312
|
omlish/lite/maybes.py,sha256=7OlHJ8Q2r4wQ-aRbZSlJY7x0e8gDvufFdlohGEIJ3P4,833
|
313
313
|
omlish/lite/pidfile.py,sha256=PRSDOAXmNkNwxh-Vwif0Nrs8RAmWroiNhLKIbdjwzBc,1723
|
314
314
|
omlish/lite/reflect.py,sha256=ad_ya_zZJOQB8HoNjs9yc66R54zgflwJVPJqiBXMzqA,1681
|
@@ -320,7 +320,7 @@ omlish/lite/strings.py,sha256=QURcE4-1pKVW8eT_5VCJpXaHDWR2dW2pYOChTJnZDiQ,1504
|
|
320
320
|
omlish/lite/subprocesses.py,sha256=_YwUpvfaC2pV5TMC9-Ivuw1Ao-YxteD3a1NQwGERft4,3380
|
321
321
|
omlish/lite/typing.py,sha256=U3-JaEnkDSYxK4tsu_MzUn3RP6qALBe5FXQXpD-licE,1090
|
322
322
|
omlish/lite/fdio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
323
|
-
omlish/lite/fdio/corohttp.py,sha256=
|
323
|
+
omlish/lite/fdio/corohttp.py,sha256=VuS4IaAluMPgtl9iQnMnKQsEMlqruN6B1BKkTV0WWKk,4080
|
324
324
|
omlish/lite/fdio/handlers.py,sha256=ukUiwF8-UCr4mzTTfOaTipC0k3k7THiHnohVdYfH69o,1341
|
325
325
|
omlish/lite/fdio/kqueue.py,sha256=lIWvvRpRyak0dmzE6FPtCdS02HGo0EEI0D1g8cWyLYk,3832
|
326
326
|
omlish/lite/fdio/manager.py,sha256=-gMVzk4B1YTZS-d2TdM12woUme37pcNVUxNTiLe91lA,1250
|
@@ -487,9 +487,9 @@ omlish/text/glyphsplit.py,sha256=Ug-dPRO7x-OrNNr8g1y6DotSZ2KH0S-VcOmUobwa4B0,329
|
|
487
487
|
omlish/text/indent.py,sha256=6Jj6TFY9unaPa4xPzrnZemJ-fHsV53IamP93XGjSUHs,1274
|
488
488
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
489
489
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
490
|
-
omlish-0.0.0.
|
491
|
-
omlish-0.0.0.
|
492
|
-
omlish-0.0.0.
|
493
|
-
omlish-0.0.0.
|
494
|
-
omlish-0.0.0.
|
495
|
-
omlish-0.0.0.
|
490
|
+
omlish-0.0.0.dev135.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
491
|
+
omlish-0.0.0.dev135.dist-info/METADATA,sha256=FzsPMJSJzeIUc8mYwPYfE1NNy3xXUjCA3CiZllCo9xI,4173
|
492
|
+
omlish-0.0.0.dev135.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
493
|
+
omlish-0.0.0.dev135.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
494
|
+
omlish-0.0.0.dev135.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
495
|
+
omlish-0.0.0.dev135.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|