fleet-python 0.2.77__tar.gz → 0.2.78__tar.gz
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.
- {fleet_python-0.2.77/fleet_python.egg-info → fleet_python-0.2.78}/PKG-INFO +1 -1
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/sqlite.py +44 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/sqlite.py +44 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78/fleet_python.egg-info}/PKG-INFO +1 -1
- {fleet_python-0.2.77 → fleet_python-0.2.78}/pyproject.toml +1 -1
- {fleet_python-0.2.77 → fleet_python-0.2.78}/LICENSE +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/README.md +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/diff_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_account.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_sync.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_task.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/export_tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/fetch_tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/import_tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/iterate_verifiers.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/openai_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/quickstart.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/_async/verifiers/verifier.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/config.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/env/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/global_client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/models.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/tasks.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/types.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet/verifiers/verifier.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/scripts/unasync.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/setup.cfg +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/__init__.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_app_method.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_expect_only.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_instance_dispatch.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_sqlite_resource_dual_mode.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_sqlite_shared_memory_behavior.py +0 -0
- {fleet_python-0.2.77 → fleet_python-0.2.78}/tests/test_verifier_from_string.py +0 -0
|
@@ -1427,6 +1427,50 @@ class AsyncSnapshotDiff:
|
|
|
1427
1427
|
diff, allowed_changes
|
|
1428
1428
|
)
|
|
1429
1429
|
|
|
1430
|
+
async def _ensure_all_fetched(self):
|
|
1431
|
+
"""Fetch ALL data from ALL tables upfront (non-lazy loading).
|
|
1432
|
+
|
|
1433
|
+
This is the old approach before lazy loading was introduced.
|
|
1434
|
+
Used by expect_only_v1 for simpler, non-optimized diffing.
|
|
1435
|
+
"""
|
|
1436
|
+
# Get all tables from before snapshot
|
|
1437
|
+
tables_response = await self.before.resource.query(
|
|
1438
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
|
|
1439
|
+
)
|
|
1440
|
+
|
|
1441
|
+
if tables_response.rows:
|
|
1442
|
+
before_tables = [row[0] for row in tables_response.rows]
|
|
1443
|
+
for table in before_tables:
|
|
1444
|
+
await self.before._ensure_table_data(table)
|
|
1445
|
+
|
|
1446
|
+
# Also fetch from after snapshot
|
|
1447
|
+
tables_response = await self.after.resource.query(
|
|
1448
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
|
|
1449
|
+
)
|
|
1450
|
+
|
|
1451
|
+
if tables_response.rows:
|
|
1452
|
+
after_tables = [row[0] for row in tables_response.rows]
|
|
1453
|
+
for table in after_tables:
|
|
1454
|
+
await self.after._ensure_table_data(table)
|
|
1455
|
+
|
|
1456
|
+
async def expect_only_v1(self, allowed_changes: List[Dict[str, Any]]):
|
|
1457
|
+
"""Ensure only specified changes occurred using the original (non-optimized) approach.
|
|
1458
|
+
|
|
1459
|
+
This is the original expect_only logic before lazy loading and targeted query
|
|
1460
|
+
optimizations were introduced. It fetches all data upfront and does a full diff.
|
|
1461
|
+
|
|
1462
|
+
Use this when you want the simpler, more predictable behavior of the original
|
|
1463
|
+
implementation without any query optimizations.
|
|
1464
|
+
"""
|
|
1465
|
+
# Fetch all data upfront (old approach)
|
|
1466
|
+
await self._ensure_all_fetched()
|
|
1467
|
+
|
|
1468
|
+
# Collect full diff
|
|
1469
|
+
diff = await self._collect()
|
|
1470
|
+
|
|
1471
|
+
# Validate using the original validation logic
|
|
1472
|
+
return await self._validate_diff_against_allowed_changes(diff, allowed_changes)
|
|
1473
|
+
|
|
1430
1474
|
|
|
1431
1475
|
class AsyncQueryBuilder:
|
|
1432
1476
|
"""Async query builder that translates DSL to SQL and executes through the API."""
|
|
@@ -1447,6 +1447,50 @@ class SyncSnapshotDiff:
|
|
|
1447
1447
|
diff = self._collect()
|
|
1448
1448
|
return self._validate_diff_against_allowed_changes_v2(diff, allowed_changes)
|
|
1449
1449
|
|
|
1450
|
+
def _ensure_all_fetched(self):
|
|
1451
|
+
"""Fetch ALL data from ALL tables upfront (non-lazy loading).
|
|
1452
|
+
|
|
1453
|
+
This is the old approach before lazy loading was introduced.
|
|
1454
|
+
Used by expect_only_v1 for simpler, non-optimized diffing.
|
|
1455
|
+
"""
|
|
1456
|
+
# Get all tables
|
|
1457
|
+
tables_response = self.before.resource.query(
|
|
1458
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
|
|
1459
|
+
)
|
|
1460
|
+
|
|
1461
|
+
if tables_response.rows:
|
|
1462
|
+
before_tables = [row[0] for row in tables_response.rows]
|
|
1463
|
+
for table in before_tables:
|
|
1464
|
+
self.before._ensure_table_data(table)
|
|
1465
|
+
|
|
1466
|
+
# Also fetch from after snapshot
|
|
1467
|
+
tables_response = self.after.resource.query(
|
|
1468
|
+
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
|
|
1469
|
+
)
|
|
1470
|
+
|
|
1471
|
+
if tables_response.rows:
|
|
1472
|
+
after_tables = [row[0] for row in tables_response.rows]
|
|
1473
|
+
for table in after_tables:
|
|
1474
|
+
self.after._ensure_table_data(table)
|
|
1475
|
+
|
|
1476
|
+
def expect_only_v1(self, allowed_changes: List[Dict[str, Any]]):
|
|
1477
|
+
"""Ensure only specified changes occurred using the original (non-optimized) approach.
|
|
1478
|
+
|
|
1479
|
+
This is the original expect_only logic before lazy loading and targeted query
|
|
1480
|
+
optimizations were introduced. It fetches all data upfront and does a full diff.
|
|
1481
|
+
|
|
1482
|
+
Use this when you want the simpler, more predictable behavior of the original
|
|
1483
|
+
implementation without any query optimizations.
|
|
1484
|
+
"""
|
|
1485
|
+
# Fetch all data upfront (old approach)
|
|
1486
|
+
self._ensure_all_fetched()
|
|
1487
|
+
|
|
1488
|
+
# Collect full diff
|
|
1489
|
+
diff = self._collect()
|
|
1490
|
+
|
|
1491
|
+
# Validate using the original validation logic
|
|
1492
|
+
return self._validate_diff_against_allowed_changes(diff, allowed_changes)
|
|
1493
|
+
|
|
1450
1494
|
|
|
1451
1495
|
class SyncQueryBuilder:
|
|
1452
1496
|
"""Async query builder that translates DSL to SQL and executes through the API."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|