omlish 0.0.0.dev458__py3-none-any.whl → 0.0.0.dev460__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.
- omlish/__about__.py +3 -3
- omlish/diag/pydevd.py +23 -1
- omlish/lang/imports/_capture.cc +5 -4
- omlish/lang/imports/capture.py +361 -170
- omlish/lang/imports/proxy.py +445 -152
- omlish/lang/lazyglobals.py +22 -9
- omlish/term/vt100/terminal.py +0 -3
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/METADATA +3 -3
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/RECORD +13 -13
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev458.dist-info → omlish-0.0.0.dev460.dist-info}/top_level.txt +0 -0
omlish/lang/lazyglobals.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import threading
|
1
2
|
import typing as ta
|
2
3
|
|
3
4
|
|
@@ -15,6 +16,10 @@ class AmbiguousLazyGlobalsFallbackError(Exception):
|
|
15
16
|
return f'{self.__class__.__name__}({self.attr!r}, {self.fallbacks!r})'
|
16
17
|
|
17
18
|
|
19
|
+
_LAZY_GLOBALS_LOCK = threading.RLock()
|
20
|
+
|
21
|
+
|
22
|
+
@ta.final
|
18
23
|
class LazyGlobals:
|
19
24
|
def __init__(
|
20
25
|
self,
|
@@ -22,8 +27,6 @@ class LazyGlobals:
|
|
22
27
|
globals: ta.MutableMapping[str, ta.Any] | None = None, # noqa
|
23
28
|
update_globals: bool = False,
|
24
29
|
) -> None:
|
25
|
-
super().__init__()
|
26
|
-
|
27
30
|
self._globals = globals
|
28
31
|
self._update_globals = update_globals
|
29
32
|
|
@@ -37,18 +40,28 @@ class LazyGlobals:
|
|
37
40
|
except KeyError:
|
38
41
|
pass
|
39
42
|
else:
|
40
|
-
if not
|
43
|
+
if xga.__class__ is not cls:
|
41
44
|
raise RuntimeError(f'Module already has __getattr__ hook: {xga}') # noqa
|
42
45
|
return xga
|
43
46
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
47
|
+
with _LAZY_GLOBALS_LOCK:
|
48
|
+
try:
|
49
|
+
xga = globals['__getattr__']
|
50
|
+
except KeyError:
|
51
|
+
pass
|
52
|
+
else:
|
53
|
+
if xga.__class__ is not cls:
|
54
|
+
raise RuntimeError(f'Module already has __getattr__ hook: {xga}') # noqa
|
55
|
+
return xga
|
56
|
+
|
57
|
+
lm = cls(
|
58
|
+
globals=globals,
|
59
|
+
update_globals=True,
|
60
|
+
)
|
48
61
|
|
49
|
-
|
62
|
+
globals['__getattr__'] = lm
|
50
63
|
|
51
|
-
|
64
|
+
return lm
|
52
65
|
|
53
66
|
def set_fn(self, attr: str, fn: ta.Callable[[], ta.Any]) -> 'LazyGlobals':
|
54
67
|
self._attr_fns[attr] = fn
|
omlish/term/vt100/terminal.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: omlish
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev460
|
4
4
|
Summary: omlish
|
5
5
|
Author: wrmsr
|
6
6
|
License-Expression: BSD-3-Clause
|
@@ -34,7 +34,7 @@ Requires-Dist: cbor2~=5.7; extra == "all"
|
|
34
34
|
Requires-Dist: cloudpickle~=3.1; extra == "all"
|
35
35
|
Requires-Dist: httpx[http2]~=0.28; extra == "all"
|
36
36
|
Requires-Dist: wrapt~=1.17; extra == "all"
|
37
|
-
Requires-Dist: cryptography~=
|
37
|
+
Requires-Dist: cryptography~=46.0; extra == "all"
|
38
38
|
Requires-Dist: sqlalchemy[asyncio]~=2.0; extra == "all"
|
39
39
|
Requires-Dist: pg8000~=1.31; extra == "all"
|
40
40
|
Requires-Dist: pymysql~=1.1; extra == "all"
|
@@ -80,7 +80,7 @@ Requires-Dist: httpx[http2]~=0.28; extra == "http"
|
|
80
80
|
Provides-Extra: misc
|
81
81
|
Requires-Dist: wrapt~=1.17; extra == "misc"
|
82
82
|
Provides-Extra: secrets
|
83
|
-
Requires-Dist: cryptography~=
|
83
|
+
Requires-Dist: cryptography~=46.0; extra == "secrets"
|
84
84
|
Provides-Extra: sqlalchemy
|
85
85
|
Requires-Dist: sqlalchemy[asyncio]~=2.0; extra == "sqlalchemy"
|
86
86
|
Provides-Extra: sqldrivers
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.omlish-manifests.json,sha256=FLw7xkPiSXuImZgqSP8BwrEib2R1doSzUPLUkc-QUIA,8410
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=Lh3QcQsg1H85i-Syg0Z1HsN6E9om5sxdQHnAEl79_ng,3613
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=ZNIMl1kwg3qdei4DiUrJPQe5M81S1e76N-GuNSwLBAE,8683
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -205,7 +205,7 @@ omlish/diag/procfs.py,sha256=eeB3L9UpNBpAfsax3U6OczayYboPlFzOGplqlQ4gBNY,9700
|
|
205
205
|
omlish/diag/procstats.py,sha256=EJEe2Zc58ykBoTfqMXro7H52aQa_pd6uC2hsIPFceso,825
|
206
206
|
omlish/diag/ps.py,sha256=MEpMU6fbkh0bSWrOHh_okOa0JDTUSUQUVSYBdh1TGvE,1672
|
207
207
|
omlish/diag/pycharm.py,sha256=_WVmPm1E66cBtR4ukgUAaApe_3rX9Cv3sQRP5PL37P8,5013
|
208
|
-
omlish/diag/pydevd.py,sha256=
|
208
|
+
omlish/diag/pydevd.py,sha256=JEHC0hiSJxL-vVtuxKUi1BNkgUKnRC1N4alDg6JP5WQ,8363
|
209
209
|
omlish/diag/threads.py,sha256=sjtlTl41wxssoVCDkBB6xeLF-9kJEK3eA6hmSFWJSQA,3643
|
210
210
|
omlish/diag/timers.py,sha256=cxX3GgjTIjBx9DI4pzCCO5Hfqb1TM3uo22yim7kjfRU,3831
|
211
211
|
omlish/diag/_pycharm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -425,7 +425,7 @@ omlish/lang/errors.py,sha256=shcS-NCnEUudF8qC_SmO2TQyjivKlS4TDjaz_faqQ0c,44
|
|
425
425
|
omlish/lang/functions.py,sha256=tZL7Yi5Oy34lvzP6HhWmV5q1eg5-mk3FrWEjsmhKRhY,5707
|
426
426
|
omlish/lang/generators.py,sha256=nJiSmDpsfPiypGzJ8qlOO7-BUnCsrAeDow9mhtGgBio,5196
|
427
427
|
omlish/lang/iterables.py,sha256=o_s8ouaJrdUqEVl2_bzJk5CVdabmrywXY0gPn7xss3w,3371
|
428
|
-
omlish/lang/lazyglobals.py,sha256=
|
428
|
+
omlish/lang/lazyglobals.py,sha256=5v4S0YSUrxdZFC6znrWolfeheArMa_DEJEcz46XCQN4,2676
|
429
429
|
omlish/lang/maybes.py,sha256=8GUpqJvyx9y5PQBQBBx6yTSE5WKsMbXMHPt4_vojKUw,209
|
430
430
|
omlish/lang/maysync.py,sha256=S2Q_rGC4AxRa1UsGJdSzZsYpgOcX9Y8ZmYGA9v8OWn8,1635
|
431
431
|
omlish/lang/objects.py,sha256=JMOZU5I6sK4rJm04898dOJkvef-lDIh5O3k6tlLbBJw,4616
|
@@ -451,11 +451,11 @@ omlish/lang/classes/restrict.py,sha256=xHLIK20MQ_jJPQ7JVzMNhyN4Xc4eLBgrcxqDnTbeK
|
|
451
451
|
omlish/lang/classes/simple.py,sha256=3AJSs-plVg2flq4SC6I39LxP0nBaB241puv3D5YCP5I,2973
|
452
452
|
omlish/lang/classes/virtual.py,sha256=J4y-uiv1RaP2rfFeptXqQ1a4MRek0TMlAFFraO_lzhs,3397
|
453
453
|
omlish/lang/imports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
454
|
-
omlish/lang/imports/_capture.cc,sha256=
|
455
|
-
omlish/lang/imports/capture.py,sha256=
|
454
|
+
omlish/lang/imports/_capture.cc,sha256=cp-L5yFGjftfBa12sKNz0Q5Yhh54a88DH7VEN1oa5hU,2313
|
455
|
+
omlish/lang/imports/capture.py,sha256=pyON5qUw9IuzzOcIHh4QNjlzAEjIGb9DwI7Z8yLDUfw,27265
|
456
456
|
omlish/lang/imports/conditional.py,sha256=R-E47QD95mMonPImWlrde3rnJrFKCCkYz71c94W05sc,1006
|
457
457
|
omlish/lang/imports/lazy.py,sha256=Eefs9hkj5surMdwgxX_Q3BOqPcox10v0sKT5rKIQknc,808
|
458
|
-
omlish/lang/imports/proxy.py,sha256=
|
458
|
+
omlish/lang/imports/proxy.py,sha256=ZhSETt41gjb4STGz9byZ5fpTi8GVdoSmPL-tbr0BEgQ,15897
|
459
459
|
omlish/lang/imports/resolving.py,sha256=DeRarn35Fryg5JhVhy8wbiC9lvr58AnllI9B_reswUE,2085
|
460
460
|
omlish/lang/imports/traversal.py,sha256=pbFQIa880NGjSfcLsno2vE_G41_CLwDHb-7gWg2J3BI,2855
|
461
461
|
omlish/lifecycles/__init__.py,sha256=zOuvV4pErPwxcKUSgshmME2Duw9GrjwckpNmW3FPKng,810
|
@@ -763,7 +763,7 @@ omlish/term/progressbar.py,sha256=nCnTX1dUNCGle9FzzeTBuoxQaellErOQkyBsKVrGG1I,36
|
|
763
763
|
omlish/term/vt100/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
764
764
|
omlish/term/vt100/c.py,sha256=93HARU6Dd1rVF-n8cAyXqkEqleYLcofuLgSUNd6-GbU,3537
|
765
765
|
omlish/term/vt100/states.py,sha256=OxPUxfFTcfz56MhtDgIigEApChOtN6XO1g6R2H08mu4,8303
|
766
|
-
omlish/term/vt100/terminal.py,sha256=
|
766
|
+
omlish/term/vt100/terminal.py,sha256=VHbZs5mHZPBizxseWKcRH77QAjE4bWDvuHi3NM6PvbA,9337
|
767
767
|
omlish/testing/__init__.py,sha256=h8GMv0PhVyMECsQoYuqoBzHjYO6UJyXBZvnozzUg9M8,171
|
768
768
|
omlish/testing/testing.py,sha256=tlBeqVmzGhjRbWygJt3mZljq662qR4nAaGNE2VoAey4,3617
|
769
769
|
omlish/testing/pytest/__init__.py,sha256=i4ti6Q2rVYJ-XBk9UYDfUUagCrEDTC5jOeSykBjYYZQ,234
|
@@ -826,9 +826,9 @@ omlish/typedvalues/marshal.py,sha256=2xqX6JllhtGpmeYkU7C-qzgU__0x-vd6CzYbAsocQlc
|
|
826
826
|
omlish/typedvalues/of_.py,sha256=UXkxSj504WI2UrFlqdZJbu2hyDwBhL7XVrc2qdR02GQ,1309
|
827
827
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
828
828
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
829
|
-
omlish-0.0.0.
|
830
|
-
omlish-0.0.0.
|
831
|
-
omlish-0.0.0.
|
832
|
-
omlish-0.0.0.
|
833
|
-
omlish-0.0.0.
|
834
|
-
omlish-0.0.0.
|
829
|
+
omlish-0.0.0.dev460.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
830
|
+
omlish-0.0.0.dev460.dist-info/METADATA,sha256=RXnH7VCjc6A71590hroJ9LF3IFEaonZi1aHkHevvASI,19003
|
831
|
+
omlish-0.0.0.dev460.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
832
|
+
omlish-0.0.0.dev460.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
833
|
+
omlish-0.0.0.dev460.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
834
|
+
omlish-0.0.0.dev460.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|