omlish 0.0.0.dev408__py3-none-any.whl → 0.0.0.dev409__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 +2 -2
- omlish/lang/__init__.py +1 -1
- omlish/lang/imports/conditional.py +1 -1
- omlish/manifests/loading.py +19 -33
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/RECORD +11 -11
- /omlish/lang/imports/{resolution.py → resolving.py} +0 -0
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev408.dist-info → omlish-0.0.0.dev409.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/lang/__init__.py
CHANGED
omlish/manifests/loading.py
CHANGED
@@ -209,6 +209,7 @@ class ManifestLoader:
|
|
209
209
|
@classmethod
|
210
210
|
def _discover_packages_uncached(cls) -> ta.Sequence[str]:
|
211
211
|
from importlib import metadata as importlib_metadata # noqa
|
212
|
+
|
212
213
|
return [
|
213
214
|
ep.value
|
214
215
|
for ep in importlib_metadata.entry_points(group=cls.ENTRY_POINT_GROUP)
|
@@ -262,35 +263,31 @@ class ManifestLoader:
|
|
262
263
|
|
263
264
|
##
|
264
265
|
|
265
|
-
|
266
|
-
|
267
|
-
def _do_initialize(self) -> None:
|
268
|
-
self._detected_packages = set()
|
266
|
+
def _detect_packages_uncached(self) -> ta.AbstractSet[str]:
|
267
|
+
ret: ta.Set[str] = set()
|
269
268
|
|
270
269
|
for r in self._config.package_scan_root_dirs or []:
|
271
|
-
|
270
|
+
ret.update(self._scan_package_root_dir_locked(r))
|
272
271
|
|
273
272
|
if self._config.discover_packages:
|
274
|
-
|
273
|
+
ret.update(dps := self.discover_packages())
|
275
274
|
if not dps:
|
276
275
|
for r in self._config.discover_packages_fallback_scan_root_dirs or []:
|
277
|
-
|
276
|
+
ret.update(self._scan_package_root_dir_locked(r))
|
278
277
|
|
279
|
-
|
278
|
+
return ret
|
280
279
|
|
281
|
-
|
282
|
-
if not self._has_initialized:
|
283
|
-
self._do_initialize()
|
284
|
-
self._has_initialized = True
|
280
|
+
_detected_packages: ta.Optional[ta.AbstractSet[str]] = None
|
285
281
|
|
286
|
-
def
|
287
|
-
|
288
|
-
|
282
|
+
def _detect_packages_locked(self) -> ta.AbstractSet[str]:
|
283
|
+
if self._detected_packages is None:
|
284
|
+
self._detected_packages = self._detect_packages_uncached()
|
289
285
|
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
286
|
+
return self._detected_packages
|
287
|
+
|
288
|
+
def detect_packages(self) -> ta.AbstractSet[str]:
|
289
|
+
with self._lock:
|
290
|
+
return self._detect_packages_locked()
|
294
291
|
|
295
292
|
##
|
296
293
|
|
@@ -429,6 +426,7 @@ class ManifestLoader:
|
|
429
426
|
return f.read()
|
430
427
|
|
431
428
|
from importlib import resources as importlib_resources # noqa
|
429
|
+
|
432
430
|
t = importlib_resources.files(package_name).joinpath(file_name)
|
433
431
|
if not t.is_file():
|
434
432
|
return None
|
@@ -497,7 +495,7 @@ class ManifestLoader:
|
|
497
495
|
|
498
496
|
##
|
499
497
|
|
500
|
-
def
|
498
|
+
def _load_locked(
|
501
499
|
self,
|
502
500
|
*,
|
503
501
|
packages: ta.Optional[ta.Collection[str]] = None,
|
@@ -511,7 +509,7 @@ class ManifestLoader:
|
|
511
509
|
class_keys = {self.get_class_key(cls) for cls in classes}
|
512
510
|
|
513
511
|
if packages is None:
|
514
|
-
packages = self.
|
512
|
+
packages = self._detect_packages_locked()
|
515
513
|
|
516
514
|
lst: ta.List[ManifestLoader.LoadedManifest] = []
|
517
515
|
for pn in packages:
|
@@ -527,18 +525,6 @@ class ManifestLoader:
|
|
527
525
|
|
528
526
|
return lst
|
529
527
|
|
530
|
-
def _load_locked(
|
531
|
-
self,
|
532
|
-
*,
|
533
|
-
packages: ta.Optional[ta.Collection[str]] = None,
|
534
|
-
classes: ta.Optional[ta.Collection[type]] = None,
|
535
|
-
) -> ta.Sequence[LoadedManifest]:
|
536
|
-
self._initialize_locked()
|
537
|
-
return self._load_initialized(
|
538
|
-
packages=packages,
|
539
|
-
classes=classes,
|
540
|
-
)
|
541
|
-
|
542
528
|
def load(
|
543
529
|
self,
|
544
530
|
*,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=FLw7xkPiSXuImZgqSP8BwrEib2R1doSzUPLUkc-QUIA,8410
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=4QkSZDk0KGwNDUXL28RW4dosDTkKwvPxAM7iBzddM4g,3601
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=rer-TPOFDU6fYq_AWio_AmA-ckZ8JDY5shIzQ_yXfzA,8414
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -426,7 +426,7 @@ omlish/iterators/iterators.py,sha256=RxW35yQ5ed8vBQ22IqpDXFx-i5JiLQdp7-pkMZXhJJ8
|
|
426
426
|
omlish/iterators/recipes.py,sha256=wOwOZg-zWG9Zc3wcAxJFSe2rtavVBYwZOfG09qYEx_4,472
|
427
427
|
omlish/iterators/tools.py,sha256=M16LXrJhMdsz5ea2qH0vws30ZvhQuQSCVFSLpRf_gTg,2096
|
428
428
|
omlish/iterators/unique.py,sha256=BSE-eanva8byFCJi09Nt2zzTsVr8LnTqY1PIInGYRs0,1396
|
429
|
-
omlish/lang/__init__.py,sha256=
|
429
|
+
omlish/lang/__init__.py,sha256=7Xe1YcE2PPgx-NI-V9VTsvUl4qZD0RPANxuDv9ddRXg,7231
|
430
430
|
omlish/lang/attrs.py,sha256=zFiVuGVOq88x45464T_LxDa-ZEq_RD9zJLq2zeVEBDc,5105
|
431
431
|
omlish/lang/casing.py,sha256=cFUlbDdXLhwnWwcYx4qnM5c4zGX7hIRUfcjiZbxUD28,4636
|
432
432
|
omlish/lang/clsdct.py,sha256=HAGIvBSbCefzRjXriwYSBLO7QHKRv2UsE78jixOb-fA,1828
|
@@ -464,10 +464,10 @@ omlish/lang/classes/restrict.py,sha256=CUyvLpMYiQwTjpzo5sdG_lQxdeEIq2z2xSVNrsI9K
|
|
464
464
|
omlish/lang/classes/simple.py,sha256=9blmJdi4c15zyIEbNVjkA0ZTSImQbv4g0p2Il6knWAc,2539
|
465
465
|
omlish/lang/classes/virtual.py,sha256=z0MYQD9Q5MkX8DzF325wDB4J9XoYbsB09jZ1omC62To,3366
|
466
466
|
omlish/lang/imports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
467
|
-
omlish/lang/imports/conditional.py,sha256=
|
467
|
+
omlish/lang/imports/conditional.py,sha256=R-E47QD95mMonPImWlrde3rnJrFKCCkYz71c94W05sc,1006
|
468
468
|
omlish/lang/imports/lazy.py,sha256=Fhtb5tSAttff6G2pZdF8bh__GZlqJWHaMKtA8KubuX4,1479
|
469
469
|
omlish/lang/imports/proxyinit.py,sha256=ALpV9LahE8SQl6jNO92Mk4PcaQPce9Cv53K8AwnH5fQ,16749
|
470
|
-
omlish/lang/imports/
|
470
|
+
omlish/lang/imports/resolving.py,sha256=DeRarn35Fryg5JhVhy8wbiC9lvr58AnllI9B_reswUE,2085
|
471
471
|
omlish/lang/imports/traversal.py,sha256=pbFQIa880NGjSfcLsno2vE_G41_CLwDHb-7gWg2J3BI,2855
|
472
472
|
omlish/lifecycles/__init__.py,sha256=1FjYceXs-4fc-S-C9zFYmc2axHs4znnQHcJVHdY7a6E,578
|
473
473
|
omlish/lifecycles/abstract.py,sha256=c9UY7oxzYZ_neh5DPE4yv5HfuDv7B4Mj_9Zo-B8KDSs,1114
|
@@ -520,7 +520,7 @@ omlish/logs/utils.py,sha256=OkFWf1exmWImmT7BaSiIC7c0Fk9tAis-PRqo8H4ny3c,398
|
|
520
520
|
omlish/manifests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
521
521
|
omlish/manifests/base.py,sha256=Dt44a3qppWaxkoi3naFFMetxbxw14qnz2naTKK93GNU,915
|
522
522
|
omlish/manifests/globals.py,sha256=kVqQ-fT4kc7xWzLHoI731GviitFPv2v2yqw-p7t7Exs,2628
|
523
|
-
omlish/manifests/loading.py,sha256=
|
523
|
+
omlish/manifests/loading.py,sha256=Br1OyI23pis_FfYju9xoacms608lzB1Zh_IqdVw_7vg,17201
|
524
524
|
omlish/manifests/static.py,sha256=9BaPBLkuzxHmg5A-5k9BjjBFINCdmFOIu06dMFgCfz4,497
|
525
525
|
omlish/manifests/types.py,sha256=NeOGuIVrcbqjCDbQ3MnCxxHAgHnw0CkWJsBzo230PWE,453
|
526
526
|
omlish/marshal/.dataclasses.json,sha256=wXWUy_IR8AolAa2RQnqn_mo2QnmVcvUJmayIykdVl0I,22
|
@@ -909,9 +909,9 @@ omlish/typedvalues/marshal.py,sha256=AtBz7Jq-BfW8vwM7HSxSpR85JAXmxK2T0xDblmm1HI0
|
|
909
909
|
omlish/typedvalues/of_.py,sha256=UXkxSj504WI2UrFlqdZJbu2hyDwBhL7XVrc2qdR02GQ,1309
|
910
910
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
911
911
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
912
|
-
omlish-0.0.0.
|
913
|
-
omlish-0.0.0.
|
914
|
-
omlish-0.0.0.
|
915
|
-
omlish-0.0.0.
|
916
|
-
omlish-0.0.0.
|
917
|
-
omlish-0.0.0.
|
912
|
+
omlish-0.0.0.dev409.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
913
|
+
omlish-0.0.0.dev409.dist-info/METADATA,sha256=fCzoIaINPTeVtCOvdUmzuUWQqKIGW40xgEmeKO4bIxg,18881
|
914
|
+
omlish-0.0.0.dev409.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
915
|
+
omlish-0.0.0.dev409.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
916
|
+
omlish-0.0.0.dev409.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
917
|
+
omlish-0.0.0.dev409.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|