cocoindex 0.2.6__cp311-abi3-manylinux_2_28_x86_64.whl → 0.2.8__cp311-abi3-manylinux_2_28_x86_64.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.
- cocoindex/_engine.abi3.so +0 -0
- cocoindex/cli.py +16 -2
- cocoindex/subprocess_exec.py +17 -8
- {cocoindex-0.2.6.dist-info → cocoindex-0.2.8.dist-info}/METADATA +2 -1
- {cocoindex-0.2.6.dist-info → cocoindex-0.2.8.dist-info}/RECORD +8 -9
- {cocoindex-0.2.6.dist-info → cocoindex-0.2.8.dist-info}/licenses/THIRD_PARTY_NOTICES.html +1 -1
- cocoindex/tests/conftest.py +0 -38
- {cocoindex-0.2.6.dist-info → cocoindex-0.2.8.dist-info}/WHEEL +0 -0
- {cocoindex-0.2.6.dist-info → cocoindex-0.2.8.dist-info}/entry_points.txt +0 -0
cocoindex/_engine.abi3.so
CHANGED
Binary file
|
cocoindex/cli.py
CHANGED
@@ -531,6 +531,13 @@ def evaluate(
|
|
531
531
|
default=False,
|
532
532
|
help="Automatically setup backends for the flow if it's not setup yet.",
|
533
533
|
)
|
534
|
+
@click.option(
|
535
|
+
"--reexport",
|
536
|
+
is_flag=True,
|
537
|
+
show_default=True,
|
538
|
+
default=False,
|
539
|
+
help="Reexport to targets even if there's no change.",
|
540
|
+
)
|
534
541
|
@click.option(
|
535
542
|
"-f",
|
536
543
|
"--force",
|
@@ -560,6 +567,7 @@ def server(
|
|
560
567
|
address: str | None,
|
561
568
|
live_update: bool,
|
562
569
|
setup: bool, # pylint: disable=redefined-outer-name
|
570
|
+
reexport: bool,
|
563
571
|
force: bool,
|
564
572
|
quiet: bool,
|
565
573
|
cors_origin: str | None,
|
@@ -583,6 +591,7 @@ def server(
|
|
583
591
|
cors_local,
|
584
592
|
live_update,
|
585
593
|
setup,
|
594
|
+
reexport,
|
586
595
|
force,
|
587
596
|
quiet,
|
588
597
|
)
|
@@ -631,6 +640,7 @@ def _run_server(
|
|
631
640
|
cors_local: int | None = None,
|
632
641
|
live_update: bool = False,
|
633
642
|
run_setup: bool = False,
|
643
|
+
reexport: bool = False,
|
634
644
|
force: bool = False,
|
635
645
|
quiet: bool = False,
|
636
646
|
) -> None:
|
@@ -664,8 +674,12 @@ def _run_server(
|
|
664
674
|
|
665
675
|
click.secho("Press Ctrl+C to stop the server.", fg="yellow")
|
666
676
|
|
667
|
-
if live_update:
|
668
|
-
options = flow.FlowLiveUpdaterOptions(
|
677
|
+
if live_update or reexport:
|
678
|
+
options = flow.FlowLiveUpdaterOptions(
|
679
|
+
live_mode=live_update,
|
680
|
+
reexport_targets=reexport,
|
681
|
+
print_stats=not quiet,
|
682
|
+
)
|
669
683
|
asyncio.run_coroutine_threadsafe(
|
670
684
|
_update_all_flows_with_hint_async(options), execution_context.event_loop
|
671
685
|
)
|
cocoindex/subprocess_exec.py
CHANGED
@@ -134,18 +134,27 @@ def _start_parent_watchdog(
|
|
134
134
|
This runs in a background daemon thread so it never blocks pool work.
|
135
135
|
"""
|
136
136
|
|
137
|
+
import psutil # type: ignore
|
138
|
+
|
139
|
+
if parent_pid is None:
|
140
|
+
parent_pid = os.getppid()
|
141
|
+
|
142
|
+
try:
|
143
|
+
p = psutil.Process(parent_pid)
|
144
|
+
# Cache create_time to defeat PID reuse.
|
145
|
+
created = p.create_time()
|
146
|
+
except psutil.Error:
|
147
|
+
# Parent already gone or not accessible
|
148
|
+
os._exit(1)
|
149
|
+
|
137
150
|
def _watch() -> None:
|
138
151
|
while True:
|
139
|
-
# If PPID changed (parent died and we were reparented), exit.
|
140
|
-
if os.getppid() != parent_pid:
|
141
|
-
os._exit(1)
|
142
|
-
|
143
|
-
# Best-effort liveness probe in case PPID was reused.
|
144
152
|
try:
|
145
|
-
|
146
|
-
|
153
|
+
# is_running() + same create_time => same process and still alive
|
154
|
+
if not (p.is_running() and p.create_time() == created):
|
155
|
+
os._exit(1)
|
156
|
+
except psutil.NoSuchProcess:
|
147
157
|
os._exit(1)
|
148
|
-
|
149
158
|
time.sleep(interval_seconds)
|
150
159
|
|
151
160
|
threading.Thread(target=_watch, name="parent-watchdog", daemon=True).start()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cocoindex
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.8
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
5
5
|
Classifier: License :: OSI Approved :: Apache Software License
|
6
6
|
Classifier: Operating System :: OS Independent
|
@@ -21,6 +21,7 @@ Requires-Dist: rich>=14.0.0
|
|
21
21
|
Requires-Dist: python-dotenv>=1.1.0
|
22
22
|
Requires-Dist: watchfiles>=1.1.0
|
23
23
|
Requires-Dist: numpy>=1.23.2
|
24
|
+
Requires-Dist: psutil>=7.0.0
|
24
25
|
Requires-Dist: pytest ; extra == 'dev'
|
25
26
|
Requires-Dist: pytest-asyncio ; extra == 'dev'
|
26
27
|
Requires-Dist: ruff ; extra == 'dev'
|
@@ -1,11 +1,11 @@
|
|
1
|
-
cocoindex-0.2.
|
2
|
-
cocoindex-0.2.
|
3
|
-
cocoindex-0.2.
|
4
|
-
cocoindex-0.2.
|
1
|
+
cocoindex-0.2.8.dist-info/METADATA,sha256=cVY3dPpJeEV5ZAAiE6y4cjfe0VbdwPqC-KElDnP0JTM,12998
|
2
|
+
cocoindex-0.2.8.dist-info/WHEEL,sha256=IG-K_sumA04dNIpy5J1b3kZo_HELEjvxxDWHD32zTgo,107
|
3
|
+
cocoindex-0.2.8.dist-info/entry_points.txt,sha256=_NretjYVzBdNTn7dK-zgwr7YfG2afz1u1uSE-5bZXF8,46
|
4
|
+
cocoindex-0.2.8.dist-info/licenses/THIRD_PARTY_NOTICES.html,sha256=bIwlpnm2Z7UZPtuCEf1LvTuA5PwmYwE2KvETfYMzFu8,716358
|
5
5
|
cocoindex/__init__.py,sha256=sLpSVO5Cotgn_82lawxvXnaqfa-qj33rytWBAe2MTtU,2201
|
6
|
-
cocoindex/_engine.abi3.so,sha256=
|
6
|
+
cocoindex/_engine.abi3.so,sha256=D5fB-nsHyYkfG-V2lDUugyykqDxz6cWzSlO2VPDjXpE,72588696
|
7
7
|
cocoindex/auth_registry.py,sha256=PE1-kVkcyC1G2C_V7b1kvYzeq73OFQehWKQP7ln7fJ8,1478
|
8
|
-
cocoindex/cli.py,sha256=
|
8
|
+
cocoindex/cli.py,sha256=laLLHtEQvEt7Ua4xulsWEI_dH5IpHiaXyTWY8p1VF_c,21665
|
9
9
|
cocoindex/convert.py,sha256=Eh9Co37BtW_PK3Oi-pFEiFt8cc_6g7XLcurV-NeH6GU,22090
|
10
10
|
cocoindex/flow.py,sha256=wKT_RWeB9_sm764aNrOl2XU-RJIu4EK_sIkjcyZI8jA,37669
|
11
11
|
cocoindex/functions.py,sha256=09erNt3WbzY9l1KER-akBF2O5-6xEahV2ORBECaL6yk,12260
|
@@ -18,10 +18,9 @@ cocoindex/runtime.py,sha256=povilB3HH3y1JF-yxKwU-pD8n2WnAqyQxIgvXXHNc60,1080
|
|
18
18
|
cocoindex/setting.py,sha256=cuudZ2uJvS48wh-rDToPAUN7-KMjlyQ-0hWhkHMIx4U,5282
|
19
19
|
cocoindex/setup.py,sha256=7uIHKN4FOCuoidPXcKyGTrkqpkl9luL49-6UcnMxYzw,3068
|
20
20
|
cocoindex/sources.py,sha256=FYz7cWYasLGDaYoIEQ1dF2uprgUETHWsTIrIS7n6pQE,3188
|
21
|
-
cocoindex/subprocess_exec.py,sha256=
|
21
|
+
cocoindex/subprocess_exec.py,sha256=r1xO84uek4VP4I6i87JMwsH5xFm3vKW0ABvgn0jskt4,10088
|
22
22
|
cocoindex/targets.py,sha256=Nfh_tpFd1goTnS_cxBjIs4j9zl3Z4Z1JomAQ1dl3Sic,2796
|
23
23
|
cocoindex/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
-
cocoindex/tests/conftest.py,sha256=Q1ev90H_6zncEL0nlzgd4idIaE6OQW_8cMf05V-Wgec,1054
|
25
24
|
cocoindex/tests/test_convert.py,sha256=UsQDuz7qukT9UAU5LBv3atNTqdUVc6uW8lrmLA7ys_w,50207
|
26
25
|
cocoindex/tests/test_optional_database.py,sha256=snAmkNa6wtOSaxoZE1HgjvL5v_ylitt3Jt_9df4Cgdc,8506
|
27
26
|
cocoindex/tests/test_transform_flow.py,sha256=G69w-n-vnCTo3r9hVIk2lJNAQEkGUA7PZfHsXna3oS0,6030
|
@@ -31,4 +30,4 @@ cocoindex/typing.py,sha256=lEQYIzAGVKQp6RnhyeopY9Q7xEED7yQj3ZMxvTPblV8,14200
|
|
31
30
|
cocoindex/user_app_loader.py,sha256=bc3Af-gYRxJ9GpObtpjegZY855oQBCv5FGkrkWV2yGY,1873
|
32
31
|
cocoindex/utils.py,sha256=hUhX-XV6XGCtJSEIpBOuDv6VvqImwPlgBxztBTw7u0U,598
|
33
32
|
cocoindex/validation.py,sha256=PZnJoby4sLbsmPv9fOjOQXuefjfZ7gmtsiTGU8SH-tc,3090
|
34
|
-
cocoindex-0.2.
|
33
|
+
cocoindex-0.2.8.dist-info/RECORD,,
|
@@ -2428,7 +2428,7 @@ Software.
|
|
2428
2428
|
<h3 id="Apache-2.0">Apache License 2.0</h3>
|
2429
2429
|
<h4>Used by:</h4>
|
2430
2430
|
<ul class="license-used-by">
|
2431
|
-
<li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.2.
|
2431
|
+
<li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.2.8</a></li>
|
2432
2432
|
<li><a href=" https://github.com/awesomized/crc-fast-rust ">crc-fast 1.3.0</a></li>
|
2433
2433
|
<li><a href=" https://github.com/qdrant/rust-client ">qdrant-client 1.15.0</a></li>
|
2434
2434
|
</ul>
|
cocoindex/tests/conftest.py
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import pytest
|
2
|
-
import typing
|
3
|
-
import os
|
4
|
-
import signal
|
5
|
-
import sys
|
6
|
-
|
7
|
-
|
8
|
-
@pytest.fixture(scope="session", autouse=True)
|
9
|
-
def _cocoindex_windows_env_fixture(
|
10
|
-
request: pytest.FixtureRequest,
|
11
|
-
) -> typing.Generator[None, None, None]:
|
12
|
-
"""Shutdown the subprocess pool at exit on Windows."""
|
13
|
-
|
14
|
-
yield
|
15
|
-
|
16
|
-
if not sys.platform.startswith("win"):
|
17
|
-
return
|
18
|
-
|
19
|
-
try:
|
20
|
-
import cocoindex.subprocess_exec
|
21
|
-
|
22
|
-
original_sigint_handler = signal.getsignal(signal.SIGINT)
|
23
|
-
try:
|
24
|
-
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
25
|
-
cocoindex.subprocess_exec.shutdown_pool_at_exit()
|
26
|
-
|
27
|
-
# If any test failed, let pytest exit normally with nonzero code
|
28
|
-
if request.session.testsfailed == 0:
|
29
|
-
os._exit(0) # immediate success exit (skips atexit/teardown)
|
30
|
-
|
31
|
-
finally:
|
32
|
-
try:
|
33
|
-
signal.signal(signal.SIGINT, original_sigint_handler)
|
34
|
-
except ValueError: # noqa: BLE001
|
35
|
-
pass
|
36
|
-
|
37
|
-
except (ImportError, AttributeError): # noqa: BLE001
|
38
|
-
pass
|
File without changes
|
File without changes
|