fleet-python 0.2.45__tar.gz → 0.2.46__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- {fleet_python-0.2.45 → fleet_python-0.2.46}/PKG-INFO +1 -1
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/verifier.py +6 -18
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/client.py +5 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/verifier.py +5 -18
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/PKG-INFO +1 -1
- {fleet_python-0.2.45 → fleet_python-0.2.46}/pyproject.toml +1 -1
- {fleet_python-0.2.45 → fleet_python-0.2.46}/LICENSE +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/README.md +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/diff_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/dsl_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/exampleResume.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_account.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_action_log.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_mcp_anthropic.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_mcp_openai.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_sync.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_task.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_tasks.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/example_verifier.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/gemini_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/json_tasks_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/nova_act_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/openai_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/openai_simple_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/query_builder_example.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/quickstart.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/examples/test_cdp_logging.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/env/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/env/client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/exceptions.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/global_client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/instance/client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/models.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/browser.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/mcp.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/resources/sqlite.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/tasks.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/_async/verifiers/bundler.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/config.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/env/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/env/client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/exceptions.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/global_client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/client.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/instance/models.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/models.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/base.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/browser.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/mcp.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/resources/sqlite.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/tasks.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/types.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/__init__.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/bundler.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/code.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/db.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/decorator.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/parse.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet/verifiers/sql_differ.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/SOURCES.txt +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/dependency_links.txt +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/requires.txt +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/fleet_python.egg-info/top_level.txt +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/scripts/fix_sync_imports.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/scripts/unasync.py +0 -0
- {fleet_python-0.2.45 → fleet_python-0.2.46}/setup.cfg +0 -0
|
@@ -12,7 +12,7 @@ import uuid
|
|
|
12
12
|
import logging
|
|
13
13
|
import hashlib
|
|
14
14
|
import asyncio
|
|
15
|
-
from typing import Any, Callable, Dict, Optional, List, TypeVar,
|
|
15
|
+
from typing import Any, Callable, Dict, Optional, List, TypeVar, Tuple
|
|
16
16
|
|
|
17
17
|
from .bundler import FunctionBundler
|
|
18
18
|
from ..client import AsyncEnv
|
|
@@ -21,8 +21,7 @@ logger = logging.getLogger(__name__)
|
|
|
21
21
|
|
|
22
22
|
F = TypeVar("F", bound=Callable[..., Any])
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
_uploaded_bundle_shas: Set[str] = set()
|
|
24
|
+
# Removed global cache - always check server for bundle status
|
|
26
25
|
|
|
27
26
|
|
|
28
27
|
@functools.lru_cache(maxsize=128)
|
|
@@ -107,25 +106,16 @@ class AsyncVerifierFunction:
|
|
|
107
106
|
logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
|
|
108
107
|
return bundle_sha, False # No upload needed, server has it
|
|
109
108
|
|
|
110
|
-
#
|
|
111
|
-
if bundle_sha in _uploaded_bundle_shas:
|
|
112
|
-
logger.debug(f"Bundle {bundle_sha[:8]}... found in local cache")
|
|
113
|
-
return bundle_sha, False # Already uploaded, no upload needed
|
|
114
|
-
|
|
115
|
-
# 2. Check if bundle exists on server (pseudocode)
|
|
116
|
-
# TODO: Add endpoint to check if bundle SHA exists in S3
|
|
109
|
+
# Always check if bundle exists on server
|
|
117
110
|
try:
|
|
118
111
|
exists = await env.check_bundle_exists(bundle_sha)
|
|
119
112
|
if exists.success:
|
|
120
|
-
logger.info(
|
|
121
|
-
f"Bundle {bundle_sha[:8]}... found on server, updating cache"
|
|
122
|
-
)
|
|
123
|
-
_uploaded_bundle_shas.add(bundle_sha)
|
|
113
|
+
logger.info(f"Bundle {bundle_sha[:8]}... found on server")
|
|
124
114
|
return bundle_sha, False # Found on server, no upload needed
|
|
125
115
|
except Exception as e:
|
|
126
116
|
logger.warning(f"Failed to check bundle existence: {e}")
|
|
127
117
|
|
|
128
|
-
#
|
|
118
|
+
# Bundle not found on server - upload needed
|
|
129
119
|
logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
|
|
130
120
|
return bundle_sha, True # Upload needed
|
|
131
121
|
|
|
@@ -194,9 +184,7 @@ class AsyncVerifierFunction:
|
|
|
194
184
|
needs_upload=True,
|
|
195
185
|
)
|
|
196
186
|
|
|
197
|
-
|
|
198
|
-
_uploaded_bundle_shas.add(bundle_sha)
|
|
199
|
-
logger.debug(f"Registered bundle {bundle_sha[:8]}... as uploaded")
|
|
187
|
+
logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
|
|
200
188
|
|
|
201
189
|
else:
|
|
202
190
|
# Bundle already available - execute without upload
|
|
@@ -579,6 +579,8 @@ class Fleet:
|
|
|
579
579
|
task = Task(**task_data)
|
|
580
580
|
tasks.append(task)
|
|
581
581
|
|
|
582
|
+
responses = []
|
|
583
|
+
|
|
582
584
|
for task in tasks:
|
|
583
585
|
payload = TaskRequest(
|
|
584
586
|
key=task.key,
|
|
@@ -592,10 +594,13 @@ class Fleet:
|
|
|
592
594
|
response = self.client.request(
|
|
593
595
|
"POST", "/v1/tasks", json=payload.model_dump()
|
|
594
596
|
)
|
|
597
|
+
responses.append(response)
|
|
595
598
|
except Exception as e:
|
|
596
599
|
logger.error(f"Failed to import task {task.key}: {e}")
|
|
597
600
|
continue
|
|
598
601
|
|
|
602
|
+
return responses
|
|
603
|
+
|
|
599
604
|
def account(self) -> AccountResponse:
|
|
600
605
|
"""Get account information including instance limits and usage.
|
|
601
606
|
|
|
@@ -19,7 +19,6 @@ from typing import (
|
|
|
19
19
|
Optional,
|
|
20
20
|
List,
|
|
21
21
|
TypeVar,
|
|
22
|
-
Set,
|
|
23
22
|
TYPE_CHECKING,
|
|
24
23
|
Tuple,
|
|
25
24
|
)
|
|
@@ -33,8 +32,7 @@ logger = logging.getLogger(__name__)
|
|
|
33
32
|
|
|
34
33
|
F = TypeVar("F", bound=Callable[..., Any])
|
|
35
34
|
|
|
36
|
-
#
|
|
37
|
-
_uploaded_bundle_shas: Set[str] = set()
|
|
35
|
+
# Removed global cache - always check server for bundle status
|
|
38
36
|
|
|
39
37
|
|
|
40
38
|
@functools.lru_cache(maxsize=128)
|
|
@@ -119,25 +117,16 @@ class SyncVerifierFunction:
|
|
|
119
117
|
logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
|
|
120
118
|
return bundle_sha, False # No upload needed, server has it
|
|
121
119
|
|
|
122
|
-
#
|
|
123
|
-
if bundle_sha in _uploaded_bundle_shas:
|
|
124
|
-
logger.debug(f"Bundle {bundle_sha[:8]}... found in local cache")
|
|
125
|
-
return bundle_sha, False # Already uploaded, no upload needed
|
|
126
|
-
|
|
127
|
-
# 2. Check if bundle exists on server (pseudocode)
|
|
128
|
-
# TODO: Add endpoint to check if bundle SHA exists in S3
|
|
120
|
+
# Always check if bundle exists on server
|
|
129
121
|
try:
|
|
130
122
|
exists = env.check_bundle_exists(bundle_sha)
|
|
131
123
|
if exists.success:
|
|
132
|
-
logger.info(
|
|
133
|
-
f"Bundle {bundle_sha[:8]}... found on server, updating cache"
|
|
134
|
-
)
|
|
135
|
-
_uploaded_bundle_shas.add(bundle_sha)
|
|
124
|
+
logger.info(f"Bundle {bundle_sha[:8]}... found on server")
|
|
136
125
|
return bundle_sha, False # Found on server, no upload needed
|
|
137
126
|
except Exception as e:
|
|
138
127
|
logger.warning(f"Failed to check bundle existence: {e}")
|
|
139
128
|
|
|
140
|
-
#
|
|
129
|
+
# Bundle not found on server - upload needed
|
|
141
130
|
logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
|
|
142
131
|
return bundle_sha, True # Upload needed
|
|
143
132
|
|
|
@@ -206,9 +195,7 @@ class SyncVerifierFunction:
|
|
|
206
195
|
needs_upload=True,
|
|
207
196
|
)
|
|
208
197
|
|
|
209
|
-
|
|
210
|
-
_uploaded_bundle_shas.add(bundle_sha)
|
|
211
|
-
logger.debug(f"Registered bundle {bundle_sha[:8]}... as uploaded")
|
|
198
|
+
logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
|
|
212
199
|
|
|
213
200
|
else:
|
|
214
201
|
# Bundle already available - execute without upload
|
|
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
|