omlish 0.0.0.dev94__py3-none-any.whl → 0.0.0.dev96__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/bootstrap/diag.py +4 -9
- omlish/dataclasses/impl/metaclass.py +1 -0
- omlish/diag/pycharm/__init__.py +1 -0
- omlish/diag/pycharm/pycharm.py +31 -7
- omlish/diag/pydevd.py +1 -1
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/RECORD +12 -12
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev94.dist-info → omlish-0.0.0.dev96.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/bootstrap/diag.py
CHANGED
@@ -169,17 +169,12 @@ class TimebombBootstrap(ContextBootstrap['TimebombBootstrap.Config']):
|
|
169
169
|
class PycharmBootstrap(SimpleBootstrap['PycharmBootstrap.Config']):
|
170
170
|
@dc.dataclass(frozen=True)
|
171
171
|
class Config(Bootstrap.Config):
|
172
|
-
|
173
|
-
debug_port: ta.Optional[int] = None
|
174
|
-
version: ta.Optional[str] = None
|
172
|
+
debug: ta.Optional[str] = None
|
175
173
|
|
176
174
|
def run(self) -> None:
|
177
|
-
if self._config.
|
178
|
-
diagpc.
|
179
|
-
|
180
|
-
self._config.debug_port,
|
181
|
-
version=self._config.version,
|
182
|
-
)
|
175
|
+
if self._config.debug is not None:
|
176
|
+
prd = diagpc.PycharmRemoteDebugger.parse(self._config.debug)
|
177
|
+
diagpc.pycharm_remote_debugger_attach(prd)
|
183
178
|
|
184
179
|
|
185
180
|
##
|
omlish/diag/pycharm/__init__.py
CHANGED
omlish/diag/pycharm/pycharm.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
+
import dataclasses as dc
|
1
2
|
import os.path
|
2
3
|
import plistlib
|
4
|
+
import re
|
3
5
|
import subprocess
|
4
6
|
import sys
|
5
7
|
import typing as ta
|
@@ -106,12 +108,33 @@ def _import_pydevd_pycharm(*, version: str | None = None) -> ta.Any:
|
|
106
108
|
return pydevd_pycharm
|
107
109
|
|
108
110
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
111
|
+
@dc.dataclass(frozen=True)
|
112
|
+
class PycharmRemoteDebugger:
|
113
|
+
host: str | None
|
114
|
+
port: int
|
115
|
+
version: str | None = None
|
116
|
+
|
117
|
+
def __str__(self) -> str:
|
118
|
+
return ''.join([
|
119
|
+
f'@{self.version}:' if self.version is not None else '',
|
120
|
+
f'{self.host}:' if self.host is not None else '',
|
121
|
+
str(self.port),
|
122
|
+
])
|
123
|
+
|
124
|
+
@classmethod
|
125
|
+
def parse(cls, s: str) -> 'PycharmRemoteDebugger':
|
126
|
+
if (m := re.fullmatch(r'(@(?P<version>[^:]+):)?((?P<host>[^:]+):)?(?P<port>\d+)', s)) is None:
|
127
|
+
raise ValueError(s)
|
128
|
+
gd = m.groupdict()
|
129
|
+
return cls(
|
130
|
+
host=gd.get('host'),
|
131
|
+
port=int(gd['port']),
|
132
|
+
version=gd.get('version'),
|
133
|
+
)
|
134
|
+
|
135
|
+
|
136
|
+
def pycharm_remote_debugger_attach(prd: PycharmRemoteDebugger) -> None:
|
137
|
+
host = prd.host
|
115
138
|
if host is None:
|
116
139
|
if (
|
117
140
|
sys.platform == 'linux' and
|
@@ -122,6 +145,7 @@ def pycharm_remote_debugger_attach(
|
|
122
145
|
else:
|
123
146
|
host = 'localhost'
|
124
147
|
|
148
|
+
version = prd.version
|
125
149
|
if version is None and host in ('localhost', '127.0.0.1'):
|
126
150
|
version = get_pycharm_version()
|
127
151
|
|
@@ -132,7 +156,7 @@ def pycharm_remote_debugger_attach(
|
|
132
156
|
|
133
157
|
pydevd_pycharm.settrace(
|
134
158
|
host,
|
135
|
-
port=port,
|
159
|
+
port=prd.port,
|
136
160
|
stdoutToServer=True,
|
137
161
|
stderrToServer=True,
|
138
162
|
)
|
omlish/diag/pydevd.py
CHANGED
@@ -5,7 +5,7 @@ an already-debugging PyCharm instance to debug PySpark jobs.
|
|
5
5
|
|
6
6
|
TODO:
|
7
7
|
- https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#
|
8
|
-
- PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py -> USE_LOW_IMPACT_MONITORING
|
8
|
+
- PyCharm.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_constants.py -> USE_LOW_IMPACT_MONITORING
|
9
9
|
|
10
10
|
==
|
11
11
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=hTFp9tvE72BxKloIq1s1SS0LRQlIsvMtO69Sbc47rKg,1704
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=xYYDai8LigmF6omaHMQLajgl5laeQZWUoKdsMxJXys4,3345
|
3
3
|
omlish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
omlish/argparse.py,sha256=Dc73G8lyoQBLvXhMYUbzQUh4SJu_OTvKUXjSUxq_ang,7499
|
5
5
|
omlish/c3.py,sha256=4vogWgwPb8TbNS2KkZxpoWbwjj7MuHG2lQG-hdtkvjI,8062
|
@@ -89,7 +89,7 @@ omlish/asyncs/trio_asyncio.py,sha256=oqdOHy0slj9PjVxaDf3gJkq9AAgg7wYZbB469jOftVw
|
|
89
89
|
omlish/bootstrap/__init__.py,sha256=-Rtsg7uPQNhh1dIT9nqrz96XlqizwoLnWf-FwOEstJI,730
|
90
90
|
omlish/bootstrap/__main__.py,sha256=4jCwsaogp0FrJjJZ85hzF4-WqluPeheHbfeoKynKvNs,194
|
91
91
|
omlish/bootstrap/base.py,sha256=d8hqn4hp1XMMi5PgcJBQXPKmW47epu8CxBlqDZiRZb4,1073
|
92
|
-
omlish/bootstrap/diag.py,sha256=
|
92
|
+
omlish/bootstrap/diag.py,sha256=iemH0nQEHEDzyZztvd_ygGGVpRpgn5UG6naxeQTvXp0,5347
|
93
93
|
omlish/bootstrap/harness.py,sha256=VW8YP-yENGyXIuJ8GL_xintArF13nafwpz-iAghPt34,1967
|
94
94
|
omlish/bootstrap/main.py,sha256=yZhOHDDlj4xB5a89dRdT8z58FsqqnpoBg1-tvY2CJe4,5903
|
95
95
|
omlish/bootstrap/marshal.py,sha256=ZxdAeMNd2qXRZ1HUK89HmEhz8tqlS9OduW34QBscKw0,516
|
@@ -138,7 +138,7 @@ omlish/dataclasses/impl/hashing.py,sha256=FKnHuXCg9ylrzK2TLGqO5yfRN4HX3F415CSLlV
|
|
138
138
|
omlish/dataclasses/impl/init.py,sha256=5kYcMDlI6EVeLQ6RCTk1bvYjb-cwg0AYfVE9FPZJlYI,6365
|
139
139
|
omlish/dataclasses/impl/internals.py,sha256=UvZYjrLT1S8ntyxJ_vRPIkPOF00K8HatGAygErgoXTU,2990
|
140
140
|
omlish/dataclasses/impl/main.py,sha256=Ti0PKbFKraKvfmoPuR-G7nLVNzRC8mvEuXhCuC-M2kc,2574
|
141
|
-
omlish/dataclasses/impl/metaclass.py,sha256=
|
141
|
+
omlish/dataclasses/impl/metaclass.py,sha256=_iBp9HZvgokKKCbe8GlrcJ9HRrx3DufgzbxJHUy1Axg,3241
|
142
142
|
omlish/dataclasses/impl/metadata.py,sha256=4veWwTr-aA0KP-Y1cPEeOcXHup9EKJTYNJ0ozIxtzD4,1401
|
143
143
|
omlish/dataclasses/impl/order.py,sha256=zWvWDkSTym8cc7vO1cLHqcBhhjOlucHOCUVJcdh4jt0,1369
|
144
144
|
omlish/dataclasses/impl/params.py,sha256=MWRL0IhulYP0dycWnK3j-0ej0uTgeE_jIlKFiE9MnI0,2836
|
@@ -155,13 +155,13 @@ omlish/diag/debug.py,sha256=YPzQXiBAJMYHYpBKzx0QhlLMZokjR5kkAVLodA3yddQ,424
|
|
155
155
|
omlish/diag/procfs.py,sha256=vBovaMvAUKdl7FbtFq3TNsSmdhs8DaYfhoEsKeWYta8,9704
|
156
156
|
omlish/diag/procstats.py,sha256=UkqxREqfd-38xPYZ9T1SIJISz5ARQCEhTtOZrxtm2dE,777
|
157
157
|
omlish/diag/ps.py,sha256=1JWxZen3fVG-20R6ZZ8BtO_gpzw_5bhHZiKdoHkgxoU,1004
|
158
|
-
omlish/diag/pydevd.py,sha256=
|
158
|
+
omlish/diag/pydevd.py,sha256=tHI0fc2ZaYKudUWTRuUe5B66qGeNktPC49ZKb8x0rSY,7298
|
159
159
|
omlish/diag/threads.py,sha256=1-x02VCDZ407gfbtXm1pWK-ubqhqfePm9PMqkHCVoqk,3642
|
160
160
|
omlish/diag/_pycharm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
161
161
|
omlish/diag/_pycharm/runhack.py,sha256=eJlaUXIcFzAjOop_793RwNS_KF9NmhLv0i22xRVVeo0,34951
|
162
|
-
omlish/diag/pycharm/__init__.py,sha256
|
162
|
+
omlish/diag/pycharm/__init__.py,sha256=-hZryZ3RfuoH4arwhBl-RmCZ6j-ybuUIEUf9C8o37iY,180
|
163
163
|
omlish/diag/pycharm/cli.py,sha256=7SRh6yj8S5YGda4bq9BD4Kzwtgg4_Wa-K202ReZN2iI,1011
|
164
|
-
omlish/diag/pycharm/pycharm.py,sha256=
|
164
|
+
omlish/diag/pycharm/pycharm.py,sha256=GFcnkNedY3bbwRM3l7_9lFiaW9BcxOB0KZl01Nk_xPs,3854
|
165
165
|
omlish/diag/replserver/__init__.py,sha256=uLo6V2aQ29v9z3IMELlPDSlG3_2iOT4-_X8VniF-EgE,235
|
166
166
|
omlish/diag/replserver/__main__.py,sha256=LmU41lQ58bm1h4Mx7S8zhE_uEBSC6kPcp9mn5JRpulA,32
|
167
167
|
omlish/diag/replserver/console.py,sha256=XzBDVhYlr8FY6ym4OwoaIHuFOHnGK3dTYlMDIOMUUlA,7410
|
@@ -457,9 +457,9 @@ omlish/text/delimit.py,sha256=ubPXcXQmtbOVrUsNh5gH1mDq5H-n1y2R4cPL5_DQf68,4928
|
|
457
457
|
omlish/text/glyphsplit.py,sha256=Ug-dPRO7x-OrNNr8g1y6DotSZ2KH0S-VcOmUobwa4B0,3296
|
458
458
|
omlish/text/indent.py,sha256=6Jj6TFY9unaPa4xPzrnZemJ-fHsV53IamP93XGjSUHs,1274
|
459
459
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
460
|
-
omlish-0.0.0.
|
461
|
-
omlish-0.0.0.
|
462
|
-
omlish-0.0.0.
|
463
|
-
omlish-0.0.0.
|
464
|
-
omlish-0.0.0.
|
465
|
-
omlish-0.0.0.
|
460
|
+
omlish-0.0.0.dev96.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
461
|
+
omlish-0.0.0.dev96.dist-info/METADATA,sha256=iXdvwNxhVdlcnIH8lTiXDRPrhbVOy6uHDmpchaAJPsE,3987
|
462
|
+
omlish-0.0.0.dev96.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
463
|
+
omlish-0.0.0.dev96.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
464
|
+
omlish-0.0.0.dev96.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
465
|
+
omlish-0.0.0.dev96.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|