fleet-python 0.2.34__py3-none-any.whl → 0.2.36__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.
Potentially problematic release.
This version of fleet-python might be problematic. Click here for more details.
- fleet/__init__.py +8 -10
- fleet/_async/__init__.py +5 -31
- fleet/_async/client.py +6 -12
- fleet/_async/env/client.py +3 -3
- fleet/_async/tasks.py +50 -0
- fleet/client.py +8 -20
- fleet/env/__init__.py +2 -2
- fleet/env/client.py +3 -3
- fleet/global_client.py +1 -1
- fleet/tasks.py +50 -0
- {fleet_python-0.2.34.dist-info → fleet_python-0.2.36.dist-info}/METADATA +1 -1
- {fleet_python-0.2.34.dist-info → fleet_python-0.2.36.dist-info}/RECORD +16 -16
- scripts/fix_sync_imports.py +16 -1
- {fleet_python-0.2.34.dist-info → fleet_python-0.2.36.dist-info}/WHEEL +0 -0
- {fleet_python-0.2.34.dist-info → fleet_python-0.2.36.dist-info}/licenses/LICENSE +0 -0
- {fleet_python-0.2.34.dist-info → fleet_python-0.2.36.dist-info}/top_level.txt +0 -0
fleet/__init__.py
CHANGED
|
@@ -46,8 +46,11 @@ from ._async.verifiers import (
|
|
|
46
46
|
AsyncVerifierFunction,
|
|
47
47
|
)
|
|
48
48
|
|
|
49
|
-
# Import async tasks (default tasks are async for modern usage)
|
|
50
|
-
from ._async.tasks import Task
|
|
49
|
+
# Import async tasks (default tasks are async for modern usage)
|
|
50
|
+
from ._async.tasks import Task, load_tasks
|
|
51
|
+
|
|
52
|
+
# Import sync load_tasks function
|
|
53
|
+
from .tasks import load_tasks as load_tasks_sync
|
|
51
54
|
|
|
52
55
|
# Import shared types
|
|
53
56
|
from .types import VerifierFunction
|
|
@@ -94,19 +97,14 @@ __all__ = [
|
|
|
94
97
|
"configure",
|
|
95
98
|
"get_client",
|
|
96
99
|
"reset_client",
|
|
100
|
+
# Module-level functions (async is default)
|
|
101
|
+
"load_tasks",
|
|
102
|
+
"load_tasks_sync",
|
|
97
103
|
# Version
|
|
98
104
|
"__version__",
|
|
99
105
|
]
|
|
100
106
|
|
|
101
107
|
|
|
102
|
-
def load_tasks(env_key: Optional[str] = None) -> List[Task]:
|
|
103
|
-
"""Load tasks without explicitly creating a client.
|
|
104
|
-
|
|
105
|
-
Example:
|
|
106
|
-
tasks = fleet.load_tasks(env_key="fira")
|
|
107
|
-
"""
|
|
108
|
-
# Use global client by default so users can configure once
|
|
109
|
-
return _global_client.get_client().load_tasks(env_key=env_key)
|
|
110
108
|
|
|
111
109
|
|
|
112
110
|
def configure(
|
fleet/_async/__init__.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
"""Fleet Python SDK - Async Environment-based AI agent interactions."""
|
|
16
16
|
|
|
17
|
-
from typing import Optional, List
|
|
17
|
+
from typing import Optional, List, Dict, Any
|
|
18
18
|
|
|
19
19
|
from ..exceptions import (
|
|
20
20
|
FleetError,
|
|
@@ -35,7 +35,7 @@ from .verifiers import (
|
|
|
35
35
|
)
|
|
36
36
|
|
|
37
37
|
# Import async tasks
|
|
38
|
-
from .tasks import Task
|
|
38
|
+
from .tasks import Task, load_tasks
|
|
39
39
|
|
|
40
40
|
# Import shared types
|
|
41
41
|
from ..types import VerifierFunction
|
|
@@ -93,33 +93,6 @@ __all__ = [
|
|
|
93
93
|
]
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
async def load_tasks(
|
|
97
|
-
env_key: Optional[str] = None,
|
|
98
|
-
keys: Optional[List[str]] = None,
|
|
99
|
-
version: Optional[str] = None,
|
|
100
|
-
team_id: Optional[str] = None
|
|
101
|
-
) -> List[Task]:
|
|
102
|
-
"""Load tasks with optional filtering.
|
|
103
|
-
|
|
104
|
-
Args:
|
|
105
|
-
env_key: Optional environment key to filter tasks by
|
|
106
|
-
keys: Optional list of task keys to filter by
|
|
107
|
-
version: Optional version to filter tasks by
|
|
108
|
-
|
|
109
|
-
Examples:
|
|
110
|
-
tasks = await fleet.load_tasks(env_key="fira")
|
|
111
|
-
tasks = await fleet.load_tasks(keys=["task1", "task2"])
|
|
112
|
-
tasks = await fleet.load_tasks(env_key="fira", version="v1.0")
|
|
113
|
-
"""
|
|
114
|
-
# Use global client by default so users can configure once
|
|
115
|
-
return await _async_global_client.get_client().load_tasks(
|
|
116
|
-
env_key=env_key,
|
|
117
|
-
keys=keys,
|
|
118
|
-
version=version,
|
|
119
|
-
team_id=team_id
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
|
|
123
96
|
async def list_envs() -> List[Environment]:
|
|
124
97
|
"""List all available environments."""
|
|
125
98
|
return await _async_global_client.get_client().list_envs()
|
|
@@ -135,13 +108,14 @@ async def environment(env_key: str) -> Environment:
|
|
|
135
108
|
return await _async_global_client.get_client().environment(env_key)
|
|
136
109
|
|
|
137
110
|
|
|
138
|
-
async def make(env_key: str, region: Optional[str] = None) -> AsyncEnv:
|
|
111
|
+
async def make(env_key: str, region: Optional[str] = None, env_variables: Optional[Dict[str, Any]] = None) -> AsyncEnv:
|
|
139
112
|
"""Create a new environment instance.
|
|
140
113
|
|
|
141
114
|
Example:
|
|
142
115
|
env = await fleet.make("fira")
|
|
116
|
+
env_with_vars = await fleet.make("fira", env_variables={"LOGGED_IN_NAME": "Alice"})
|
|
143
117
|
"""
|
|
144
|
-
return await _async_global_client.get_client().make(env_key, region)
|
|
118
|
+
return await _async_global_client.get_client().make(env_key, region, env_variables)
|
|
145
119
|
|
|
146
120
|
|
|
147
121
|
async def make_for_task(task: Task) -> AsyncEnv:
|
fleet/_async/client.py
CHANGED
|
@@ -20,7 +20,7 @@ import httpx
|
|
|
20
20
|
import json
|
|
21
21
|
import logging
|
|
22
22
|
import os
|
|
23
|
-
from typing import List, Optional, Dict, TYPE_CHECKING
|
|
23
|
+
from typing import List, Optional, Dict, Any, TYPE_CHECKING
|
|
24
24
|
|
|
25
25
|
from .base import EnvironmentBase, AsyncWrapper
|
|
26
26
|
from ..models import (
|
|
@@ -50,7 +50,7 @@ from .instance.client import ValidatorType
|
|
|
50
50
|
from .resources.base import Resource
|
|
51
51
|
from .resources.sqlite import AsyncSQLiteResource
|
|
52
52
|
from .resources.browser import AsyncBrowserResource
|
|
53
|
-
from
|
|
53
|
+
from .resources.mcp import AsyncMCPResource
|
|
54
54
|
|
|
55
55
|
logger = logging.getLogger(__name__)
|
|
56
56
|
|
|
@@ -105,9 +105,9 @@ class AsyncEnv(EnvironmentBase):
|
|
|
105
105
|
return self.instance.browser(name)
|
|
106
106
|
|
|
107
107
|
@property
|
|
108
|
-
def mcp(self) ->
|
|
108
|
+
def mcp(self) -> AsyncMCPResource:
|
|
109
109
|
mcp_url = f"{self.urls.root}mcp"
|
|
110
|
-
return
|
|
110
|
+
return AsyncMCPResource(url=mcp_url, env_key=self.env_key)
|
|
111
111
|
|
|
112
112
|
def state(self, uri: str) -> Resource:
|
|
113
113
|
return self.instance.state(uri)
|
|
@@ -196,7 +196,7 @@ class AsyncFleet:
|
|
|
196
196
|
response = await self.client.request("GET", f"/v1/env/{env_key}")
|
|
197
197
|
return EnvironmentModel(**response.json())
|
|
198
198
|
|
|
199
|
-
async def make(self, env_key: str, region: Optional[str] = None) -> AsyncEnv:
|
|
199
|
+
async def make(self, env_key: str, region: Optional[str] = None, env_variables: Optional[Dict[str, Any]] = None) -> AsyncEnv:
|
|
200
200
|
if ":" in env_key:
|
|
201
201
|
env_key_part, version = env_key.split(":", 1)
|
|
202
202
|
if (
|
|
@@ -210,7 +210,7 @@ class AsyncFleet:
|
|
|
210
210
|
version = None
|
|
211
211
|
|
|
212
212
|
request = InstanceRequest(
|
|
213
|
-
env_key=env_key_part, version=version, region=region, created_from="sdk"
|
|
213
|
+
env_key=env_key_part, version=version, region=region, env_variables=env_variables, created_from="sdk"
|
|
214
214
|
)
|
|
215
215
|
region_base_url = REGION_BASE_URL.get(region)
|
|
216
216
|
response = await self.client.request(
|
|
@@ -507,12 +507,6 @@ class AsyncFleet:
|
|
|
507
507
|
sha256=verifier_sha,
|
|
508
508
|
)
|
|
509
509
|
|
|
510
|
-
# Ensure we return an AsyncVerifierFunction
|
|
511
|
-
if not isinstance(verifier_func, AsyncVerifierFunction):
|
|
512
|
-
raise TypeError(
|
|
513
|
-
f"Expected AsyncVerifierFunction but got {type(verifier_func).__name__}"
|
|
514
|
-
)
|
|
515
|
-
|
|
516
510
|
# Store the original verifier code for reference
|
|
517
511
|
verifier_func._verifier_code = verifier_code
|
|
518
512
|
|
fleet/_async/env/client.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from ..client import AsyncFleet, AsyncEnv, Task
|
|
2
2
|
from ...models import Environment as EnvironmentModel, AccountResponse
|
|
3
|
-
from typing import List, Optional
|
|
3
|
+
from typing import List, Optional, Dict, Any
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
async def make_async(env_key: str, region: Optional[str] = None) -> AsyncEnv:
|
|
7
|
-
return await AsyncFleet().make(env_key, region=region)
|
|
6
|
+
async def make_async(env_key: str, region: Optional[str] = None, env_variables: Optional[Dict[str, Any]] = None) -> AsyncEnv:
|
|
7
|
+
return await AsyncFleet().make(env_key, region=region, env_variables=env_variables)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
async def make_for_task_async(task: Task) -> AsyncEnv:
|
fleet/_async/tasks.py
CHANGED
|
@@ -125,6 +125,56 @@ class Task(BaseModel):
|
|
|
125
125
|
return await AsyncFleet().make(env_key=self.env_key, region=region)
|
|
126
126
|
|
|
127
127
|
|
|
128
|
+
def verifier_from_string(
|
|
129
|
+
verifier_func: str,
|
|
130
|
+
verifier_id: str,
|
|
131
|
+
verifier_key: str,
|
|
132
|
+
sha256: str = ""
|
|
133
|
+
) -> 'VerifierFunction':
|
|
134
|
+
"""Create a verifier function from string code.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
verifier_func: The verifier function code as a string
|
|
138
|
+
verifier_id: Unique identifier for the verifier
|
|
139
|
+
verifier_key: Key/name for the verifier
|
|
140
|
+
sha256: SHA256 hash of the verifier code
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
VerifierFunction instance that can be used to verify tasks
|
|
144
|
+
"""
|
|
145
|
+
try:
|
|
146
|
+
import inspect
|
|
147
|
+
from .verifiers import verifier, AsyncVerifierFunction
|
|
148
|
+
|
|
149
|
+
# Create a local namespace for executing the code
|
|
150
|
+
local_namespace = {}
|
|
151
|
+
|
|
152
|
+
# Execute the verifier code in the namespace
|
|
153
|
+
exec(verifier_func, globals(), local_namespace)
|
|
154
|
+
|
|
155
|
+
# Find the function that was defined
|
|
156
|
+
func_obj = None
|
|
157
|
+
for name, obj in local_namespace.items():
|
|
158
|
+
if inspect.isfunction(obj):
|
|
159
|
+
func_obj = obj
|
|
160
|
+
break
|
|
161
|
+
|
|
162
|
+
if func_obj is None:
|
|
163
|
+
raise ValueError("No function found in verifier code")
|
|
164
|
+
|
|
165
|
+
# Create an AsyncVerifierFunction instance
|
|
166
|
+
verifier_instance = AsyncVerifierFunction(func_obj, verifier_key, verifier_id)
|
|
167
|
+
|
|
168
|
+
# Store additional metadata
|
|
169
|
+
verifier_instance._verifier_code = verifier_func
|
|
170
|
+
verifier_instance._sha256 = sha256
|
|
171
|
+
|
|
172
|
+
return verifier_instance
|
|
173
|
+
|
|
174
|
+
except Exception as e:
|
|
175
|
+
raise ValueError(f"Failed to create verifier from string: {e}")
|
|
176
|
+
|
|
177
|
+
|
|
128
178
|
async def load_tasks(
|
|
129
179
|
env_key: Optional[str] = None,
|
|
130
180
|
keys: Optional[List[str]] = None,
|
fleet/client.py
CHANGED
|
@@ -20,7 +20,7 @@ import httpx
|
|
|
20
20
|
import json
|
|
21
21
|
import logging
|
|
22
22
|
import os
|
|
23
|
-
from typing import List, Optional, Dict, TYPE_CHECKING
|
|
23
|
+
from typing import List, Optional, Dict, Any, TYPE_CHECKING
|
|
24
24
|
|
|
25
25
|
from .base import EnvironmentBase, SyncWrapper
|
|
26
26
|
from .models import (
|
|
@@ -50,7 +50,7 @@ from .instance.client import ValidatorType
|
|
|
50
50
|
from .resources.base import Resource
|
|
51
51
|
from .resources.sqlite import SQLiteResource
|
|
52
52
|
from .resources.browser import BrowserResource
|
|
53
|
-
from
|
|
53
|
+
from .resources.mcp import SyncMCPResource
|
|
54
54
|
|
|
55
55
|
logger = logging.getLogger(__name__)
|
|
56
56
|
|
|
@@ -105,9 +105,9 @@ class SyncEnv(EnvironmentBase):
|
|
|
105
105
|
return self.instance.browser(name)
|
|
106
106
|
|
|
107
107
|
@property
|
|
108
|
-
def mcp(self) ->
|
|
108
|
+
def mcp(self) -> SyncMCPResource:
|
|
109
109
|
mcp_url = f"{self.urls.root}mcp"
|
|
110
|
-
return
|
|
110
|
+
return SyncMCPResource(url=mcp_url, env_key=self.env_key)
|
|
111
111
|
|
|
112
112
|
def state(self, uri: str) -> Resource:
|
|
113
113
|
return self.instance.state(uri)
|
|
@@ -196,7 +196,7 @@ class Fleet:
|
|
|
196
196
|
response = self.client.request("GET", f"/v1/env/{env_key}")
|
|
197
197
|
return EnvironmentModel(**response.json())
|
|
198
198
|
|
|
199
|
-
def make(self, env_key: str, region: Optional[str] = None) -> SyncEnv:
|
|
199
|
+
def make(self, env_key: str, region: Optional[str] = None, env_variables: Optional[Dict[str, Any]] = None) -> SyncEnv:
|
|
200
200
|
if ":" in env_key:
|
|
201
201
|
env_key_part, version = env_key.split(":", 1)
|
|
202
202
|
if (
|
|
@@ -210,7 +210,7 @@ class Fleet:
|
|
|
210
210
|
version = None
|
|
211
211
|
|
|
212
212
|
request = InstanceRequest(
|
|
213
|
-
env_key=env_key_part, version=version, region=region, created_from="sdk"
|
|
213
|
+
env_key=env_key_part, version=version, region=region, env_variables=env_variables, created_from="sdk"
|
|
214
214
|
)
|
|
215
215
|
region_base_url = REGION_BASE_URL.get(region)
|
|
216
216
|
response = self.client.request(
|
|
@@ -496,14 +496,8 @@ class Fleet:
|
|
|
496
496
|
Returns:
|
|
497
497
|
AsyncVerifierFunction created from the verifier code
|
|
498
498
|
"""
|
|
499
|
-
from
|
|
500
|
-
from .verifiers
|
|
501
|
-
|
|
502
|
-
# Convert async verifier code to sync
|
|
503
|
-
if 'async def' in verifier_code:
|
|
504
|
-
verifier_code = verifier_code.replace('async def', 'def')
|
|
505
|
-
if 'await ' in verifier_code:
|
|
506
|
-
verifier_code = verifier_code.replace('await ', '')
|
|
499
|
+
from .tasks import verifier_from_string
|
|
500
|
+
from .verifiers import SyncVerifierFunction
|
|
507
501
|
|
|
508
502
|
# Use verifier_from_string to create the verifier
|
|
509
503
|
verifier_func = verifier_from_string(
|
|
@@ -513,12 +507,6 @@ class Fleet:
|
|
|
513
507
|
sha256=verifier_sha,
|
|
514
508
|
)
|
|
515
509
|
|
|
516
|
-
# Ensure we return an AsyncVerifierFunction
|
|
517
|
-
if not isinstance(verifier_func, SyncVerifierFunction):
|
|
518
|
-
raise TypeError(
|
|
519
|
-
f"Expected AsyncVerifierFunction but got {type(verifier_func).__name__}"
|
|
520
|
-
)
|
|
521
|
-
|
|
522
510
|
# Store the original verifier code for reference
|
|
523
511
|
verifier_func._verifier_code = verifier_code
|
|
524
512
|
|
fleet/env/__init__.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from .client import (
|
|
4
4
|
make,
|
|
5
|
-
|
|
5
|
+
make_for_task_async,
|
|
6
6
|
list_envs,
|
|
7
7
|
list_regions,
|
|
8
8
|
get,
|
|
@@ -22,7 +22,7 @@ from .._async.env.client import (
|
|
|
22
22
|
|
|
23
23
|
__all__ = [
|
|
24
24
|
"make",
|
|
25
|
-
"
|
|
25
|
+
"make_for_task_async",
|
|
26
26
|
"list_envs",
|
|
27
27
|
"list_regions",
|
|
28
28
|
"list_instances",
|
fleet/env/client.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from ..client import Fleet, SyncEnv, Task
|
|
2
2
|
from ..models import Environment as EnvironmentModel, AccountResponse
|
|
3
|
-
from typing import List, Optional
|
|
3
|
+
from typing import List, Optional, Dict, Any
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
def make(env_key: str, region: Optional[str] = None) -> SyncEnv:
|
|
7
|
-
return Fleet().make(env_key, region=region)
|
|
6
|
+
def make(env_key: str, region: Optional[str] = None, env_variables: Optional[Dict[str, Any]] = None) -> SyncEnv:
|
|
7
|
+
return Fleet().make(env_key, region=region, env_variables=env_variables)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def make_for_task_async(task: Task) -> SyncEnv:
|
fleet/global_client.py
CHANGED
fleet/tasks.py
CHANGED
|
@@ -124,6 +124,56 @@ class Task(BaseModel):
|
|
|
124
124
|
return Fleet().make(env_key=self.env_key, region=region)
|
|
125
125
|
|
|
126
126
|
|
|
127
|
+
def verifier_from_string(
|
|
128
|
+
verifier_func: str,
|
|
129
|
+
verifier_id: str,
|
|
130
|
+
verifier_key: str,
|
|
131
|
+
sha256: str = ""
|
|
132
|
+
) -> 'VerifierFunction':
|
|
133
|
+
"""Create a verifier function from string code.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
verifier_func: The verifier function code as a string
|
|
137
|
+
verifier_id: Unique identifier for the verifier
|
|
138
|
+
verifier_key: Key/name for the verifier
|
|
139
|
+
sha256: SHA256 hash of the verifier code
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
VerifierFunction instance that can be used to verify tasks
|
|
143
|
+
"""
|
|
144
|
+
try:
|
|
145
|
+
import inspect
|
|
146
|
+
from .verifiers import verifier, SyncVerifierFunction
|
|
147
|
+
|
|
148
|
+
# Create a local namespace for executing the code
|
|
149
|
+
local_namespace = {}
|
|
150
|
+
|
|
151
|
+
# Execute the verifier code in the namespace
|
|
152
|
+
exec(verifier_func, globals(), local_namespace)
|
|
153
|
+
|
|
154
|
+
# Find the function that was defined
|
|
155
|
+
func_obj = None
|
|
156
|
+
for name, obj in local_namespace.items():
|
|
157
|
+
if inspect.isfunction(obj):
|
|
158
|
+
func_obj = obj
|
|
159
|
+
break
|
|
160
|
+
|
|
161
|
+
if func_obj is None:
|
|
162
|
+
raise ValueError("No function found in verifier code")
|
|
163
|
+
|
|
164
|
+
# Create an AsyncVerifierFunction instance
|
|
165
|
+
verifier_instance = SyncVerifierFunction(func_obj, verifier_key, verifier_id)
|
|
166
|
+
|
|
167
|
+
# Store additional metadata
|
|
168
|
+
verifier_instance._verifier_code = verifier_func
|
|
169
|
+
verifier_instance._sha256 = sha256
|
|
170
|
+
|
|
171
|
+
return verifier_instance
|
|
172
|
+
|
|
173
|
+
except Exception as e:
|
|
174
|
+
raise ValueError(f"Failed to create verifier from string: {e}")
|
|
175
|
+
|
|
176
|
+
|
|
127
177
|
def load_tasks(
|
|
128
178
|
env_key: Optional[str] = None,
|
|
129
179
|
keys: Optional[List[str]] = None,
|
|
@@ -19,24 +19,24 @@ examples/openai_simple_example.py,sha256=HmiufucrAZne7tHq9uoEsDWlEhjNC265bQAyIGB
|
|
|
19
19
|
examples/query_builder_example.py,sha256=-cOMfWGNifYfYEt_Ds73XpwATZvFDL6F4KTkVxdMjzg,3951
|
|
20
20
|
examples/quickstart.py,sha256=1VT39IRRhemsJgxi0O0gprdpcw7HB4pYO97GAYagIcg,3788
|
|
21
21
|
examples/test_cdp_logging.py,sha256=AkCwQCgOTQEI8w3v0knWK_4eXMph7L9x07wj9yIYM10,2836
|
|
22
|
-
fleet/__init__.py,sha256=
|
|
22
|
+
fleet/__init__.py,sha256=F6PrtihwOKZxmaOkeHmGLBM3feTpRTEDT5tSqeSD7ts,3749
|
|
23
23
|
fleet/base.py,sha256=bc-340sTpq_DJs7yQ9d2pDWnmJFmA1SwDB9Lagvqtb4,9182
|
|
24
|
-
fleet/client.py,sha256=
|
|
24
|
+
fleet/client.py,sha256=nxYynq06wa7pWeMzPvwgAC6XBrb9rzujQfPi2hl_gmM,21876
|
|
25
25
|
fleet/config.py,sha256=uY02ZKxVoXqVDta-0IMWaYJeE1CTXF_fA9NI6QUutmU,319
|
|
26
26
|
fleet/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
27
|
-
fleet/global_client.py,sha256=
|
|
27
|
+
fleet/global_client.py,sha256=frrDAFNM2ywN0JHLtlm9qbE1dQpnQJsavJpb7xSR_bU,1072
|
|
28
28
|
fleet/models.py,sha256=9tDjgcgKPMnf-R_MDh-Ocp_UMbyJ8tJyjb15XqU0N94,12454
|
|
29
|
-
fleet/tasks.py,sha256=
|
|
29
|
+
fleet/tasks.py,sha256=vLFHHzgk7BBvDzGY1urEB_bzPaoV-kxNdRIFDttVqXo,7245
|
|
30
30
|
fleet/types.py,sha256=L4Y82xICf1tzyCLqhLYUgEoaIIS5h9T05TyFNHSWs3s,652
|
|
31
|
-
fleet/_async/__init__.py,sha256=
|
|
31
|
+
fleet/_async/__init__.py,sha256=lrnDD6N9p0Oqpi_djxTnxh8I5F7nA7KNn0khciGmgpg,6747
|
|
32
32
|
fleet/_async/base.py,sha256=oisVTQsx0M_yTmyQJc3oij63uKZ97MHz-xYFsWXxQE8,9202
|
|
33
|
-
fleet/_async/client.py,sha256=
|
|
33
|
+
fleet/_async/client.py,sha256=WNaBwHJWRrOyYB79_qujdKkRMPmhpSucHbfTic9uc6A,22335
|
|
34
34
|
fleet/_async/exceptions.py,sha256=fUmPwWhnT8SR97lYsRq0kLHQHKtSh2eJS0VQ2caSzEI,5055
|
|
35
35
|
fleet/_async/global_client.py,sha256=4WskpLHbsDEgWW7hXMD09W-brkp4euy8w2ZJ88594rQ,1103
|
|
36
36
|
fleet/_async/models.py,sha256=9tDjgcgKPMnf-R_MDh-Ocp_UMbyJ8tJyjb15XqU0N94,12454
|
|
37
|
-
fleet/_async/tasks.py,sha256=
|
|
37
|
+
fleet/_async/tasks.py,sha256=hyBn2QWobcvG1k5snxxvYqohmpSv43iRghA-g6jx8Ro,7320
|
|
38
38
|
fleet/_async/env/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
fleet/_async/env/client.py,sha256=
|
|
39
|
+
fleet/_async/env/client.py,sha256=9GOSkEWNncwTtiZNaJ2vNGrFCPutyan9lBNhD87dAzQ,1059
|
|
40
40
|
fleet/_async/instance/__init__.py,sha256=PtmJq8J8bh0SOQ2V55QURz5GJfobozwtQoqhaOk3_tI,515
|
|
41
41
|
fleet/_async/instance/base.py,sha256=3qUBuUR8OVS36LzdP6KyZzngtwPKYO09HoY6Ekxp-KA,1625
|
|
42
42
|
fleet/_async/instance/client.py,sha256=z9q_-dIBwPc1X6VlQOi_aV2v6KOKueJGg8NMyP5iFQM,6082
|
|
@@ -48,8 +48,8 @@ fleet/_async/resources/sqlite.py,sha256=h6pX41j8_aJaeZ7UVs25QQGgMWbHMPlGpDnPGMIA
|
|
|
48
48
|
fleet/_async/verifiers/__init__.py,sha256=1WTlCNq4tIFbbXaQu5Bf2WppZq0A8suhtZbxMTSOwxI,465
|
|
49
49
|
fleet/_async/verifiers/bundler.py,sha256=Sq0KkqEhM5Ng2x8R6Z4puXvQ8FMlEO7D3-ldBLktPi4,26205
|
|
50
50
|
fleet/_async/verifiers/verifier.py,sha256=lwVIV5ZpWJhM87tXShtjwN5KP7n5XDcPq0XX7AjV6_E,14343
|
|
51
|
-
fleet/env/__init__.py,sha256=
|
|
52
|
-
fleet/env/client.py,sha256=
|
|
51
|
+
fleet/env/__init__.py,sha256=cS9zCYobM5jypppDMZIQMYd6hOg5f4sgqRXEQ67pckk,676
|
|
52
|
+
fleet/env/client.py,sha256=wvZbmHdftkuhAgpzOGiA4Yl_Th9BUIHFR_6JUYg6Nc8,893
|
|
53
53
|
fleet/instance/__init__.py,sha256=CyWUkbGAK-DBPw4DC4AnCW-MqqheGhZMA5QSRVu-ws4,479
|
|
54
54
|
fleet/instance/base.py,sha256=OYqzBwZFfTX9wlBGSG5gljqj98NbiJeKIfFJ3uj5I4s,1587
|
|
55
55
|
fleet/instance/client.py,sha256=O6B0A2Z0b5SxOLs4TipZ9Ol8yG-b-LG15vVOKMmd6BQ,5908
|
|
@@ -67,10 +67,10 @@ fleet/verifiers/decorator.py,sha256=nAP3O8szXu7md_kpwpz91hGSUNEVLYjwZQZTkQlV1DM,
|
|
|
67
67
|
fleet/verifiers/parse.py,sha256=0bAbj9VvT__yU4ZVREUK-Tn9dukh9LCpmfVsgj1DfP4,8508
|
|
68
68
|
fleet/verifiers/sql_differ.py,sha256=dmiGCFXVMEMbAX519OjhVqgA8ZvhnvdmC1BVpL7QCF0,6490
|
|
69
69
|
fleet/verifiers/verifier.py,sha256=53oBWAf0yy3bZmZx9eH9AWIf65H7OP2UUm0YwWCL6Mc,14286
|
|
70
|
-
fleet_python-0.2.
|
|
71
|
-
scripts/fix_sync_imports.py,sha256=
|
|
70
|
+
fleet_python-0.2.36.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
71
|
+
scripts/fix_sync_imports.py,sha256=X9fWLTpiPGkSHsjyQUDepOJkxOqw1DPj7nd8wFlFqLQ,8368
|
|
72
72
|
scripts/unasync.py,sha256=vWVQxRWX8SRZO5cmzEhpvnG_REhCWXpidIGIpWmEcvI,696
|
|
73
|
-
fleet_python-0.2.
|
|
74
|
-
fleet_python-0.2.
|
|
75
|
-
fleet_python-0.2.
|
|
76
|
-
fleet_python-0.2.
|
|
73
|
+
fleet_python-0.2.36.dist-info/METADATA,sha256=-MAGjnqjasQs79jubQHTQaWExDt6DsRPgLynJuDZzpM,3354
|
|
74
|
+
fleet_python-0.2.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
fleet_python-0.2.36.dist-info/top_level.txt,sha256=_3DSmTohvSDf3AIP_BYfGzhwO1ECFwuzg83X-wHCx3Y,23
|
|
76
|
+
fleet_python-0.2.36.dist-info/RECORD,,
|
scripts/fix_sync_imports.py
CHANGED
|
@@ -76,10 +76,25 @@ def fix_file(filepath: Path) -> bool:
|
|
|
76
76
|
)
|
|
77
77
|
|
|
78
78
|
# Fix imports in top-level fleet files
|
|
79
|
-
if rel_path.parts[0] in ["base.py", "client.py"] and len(rel_path.parts) == 1:
|
|
79
|
+
if rel_path.parts[0] in ["base.py", "client.py", "global_client.py"] and len(rel_path.parts) == 1:
|
|
80
80
|
# Top-level files should use . for fleet level imports
|
|
81
81
|
content = content.replace("from ..models import", "from .models import")
|
|
82
82
|
content = content.replace("from ..config import", "from .config import")
|
|
83
|
+
content = content.replace("from ..tasks import", "from .tasks import")
|
|
84
|
+
|
|
85
|
+
# Fix sync client error messages and imports
|
|
86
|
+
if rel_path.parts[0] == "client.py":
|
|
87
|
+
content = content.replace("Expected AsyncVerifierFunction but got", "Expected SyncVerifierFunction but got")
|
|
88
|
+
content = content.replace("# Ensure we return an AsyncVerifierFunction", "# Ensure we return a SyncVerifierFunction")
|
|
89
|
+
content = content.replace("from .verifiers.verifier import SyncVerifierFunction", "from .verifiers import SyncVerifierFunction")
|
|
90
|
+
|
|
91
|
+
# Remove the type check entirely since it's causing import issues
|
|
92
|
+
content = re.sub(
|
|
93
|
+
r'\s*# Ensure we return a SyncVerifierFunction\s*\n\s*if not isinstance\(verifier_func, SyncVerifierFunction\):\s*\n\s*raise TypeError\(\s*f"Expected SyncVerifierFunction but got \{type\(verifier_func\)\.__name__\}"\s*\)\s*\n\s*',
|
|
94
|
+
'',
|
|
95
|
+
content,
|
|
96
|
+
flags=re.MULTILINE
|
|
97
|
+
)
|
|
83
98
|
|
|
84
99
|
# Fix __init__.py imports - the class is called SyncEnv, not Environment
|
|
85
100
|
if rel_path.parts[0] == "__init__.py" and len(rel_path.parts) == 1:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|