fleet-python 0.2.68__tar.gz → 0.2.69__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.

Files changed (85) hide show
  1. {fleet_python-0.2.68/fleet_python.egg-info → fleet_python-0.2.69}/PKG-INFO +1 -1
  2. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/base.py +4 -3
  3. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/client.py +32 -31
  4. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/verifiers/bundler.py +22 -21
  5. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/verifiers/verifier.py +20 -19
  6. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/base.py +4 -3
  7. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/client.py +29 -29
  8. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/bundler.py +22 -21
  9. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/decorator.py +1 -1
  10. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/verifier.py +20 -19
  11. {fleet_python-0.2.68 → fleet_python-0.2.69/fleet_python.egg-info}/PKG-INFO +1 -1
  12. {fleet_python-0.2.68 → fleet_python-0.2.69}/pyproject.toml +1 -1
  13. {fleet_python-0.2.68 → fleet_python-0.2.69}/LICENSE +0 -0
  14. {fleet_python-0.2.68 → fleet_python-0.2.69}/README.md +0 -0
  15. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/diff_example.py +0 -0
  16. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/dsl_example.py +0 -0
  17. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example.py +0 -0
  18. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/exampleResume.py +0 -0
  19. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_account.py +0 -0
  20. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_action_log.py +0 -0
  21. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_client.py +0 -0
  22. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_mcp_anthropic.py +0 -0
  23. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_mcp_openai.py +0 -0
  24. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_sync.py +0 -0
  25. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_task.py +0 -0
  26. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_tasks.py +0 -0
  27. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/example_verifier.py +0 -0
  28. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/export_tasks.py +0 -0
  29. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/gemini_example.py +0 -0
  30. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/import_tasks.py +0 -0
  31. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/json_tasks_example.py +0 -0
  32. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/nova_act_example.py +0 -0
  33. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/openai_example.py +0 -0
  34. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/openai_simple_example.py +0 -0
  35. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/query_builder_example.py +0 -0
  36. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/quickstart.py +0 -0
  37. {fleet_python-0.2.68 → fleet_python-0.2.69}/examples/test_cdp_logging.py +0 -0
  38. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/__init__.py +0 -0
  39. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/__init__.py +0 -0
  40. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/env/__init__.py +0 -0
  41. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/env/client.py +0 -0
  42. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/exceptions.py +0 -0
  43. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/global_client.py +0 -0
  44. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/instance/__init__.py +0 -0
  45. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/instance/base.py +0 -0
  46. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/instance/client.py +0 -0
  47. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/models.py +0 -0
  48. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/resources/__init__.py +0 -0
  49. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/resources/base.py +0 -0
  50. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/resources/browser.py +0 -0
  51. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/resources/mcp.py +0 -0
  52. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/resources/sqlite.py +0 -0
  53. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/tasks.py +0 -0
  54. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/_async/verifiers/__init__.py +0 -0
  55. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/config.py +0 -0
  56. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/env/__init__.py +0 -0
  57. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/env/client.py +0 -0
  58. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/exceptions.py +0 -0
  59. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/global_client.py +0 -0
  60. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/instance/__init__.py +0 -0
  61. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/instance/base.py +0 -0
  62. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/instance/client.py +0 -0
  63. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/instance/models.py +0 -0
  64. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/models.py +0 -0
  65. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/resources/__init__.py +0 -0
  66. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/resources/base.py +0 -0
  67. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/resources/browser.py +0 -0
  68. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/resources/mcp.py +0 -0
  69. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/resources/sqlite.py +0 -0
  70. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/tasks.py +0 -0
  71. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/types.py +0 -0
  72. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/__init__.py +0 -0
  73. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/code.py +0 -0
  74. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/db.py +0 -0
  75. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/parse.py +0 -0
  76. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet/verifiers/sql_differ.py +0 -0
  77. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet_python.egg-info/SOURCES.txt +0 -0
  78. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet_python.egg-info/dependency_links.txt +0 -0
  79. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet_python.egg-info/requires.txt +0 -0
  80. {fleet_python-0.2.68 → fleet_python-0.2.69}/fleet_python.egg-info/top_level.txt +0 -0
  81. {fleet_python-0.2.68 → fleet_python-0.2.69}/scripts/fix_sync_imports.py +0 -0
  82. {fleet_python-0.2.68 → fleet_python-0.2.69}/scripts/unasync.py +0 -0
  83. {fleet_python-0.2.68 → fleet_python-0.2.69}/setup.cfg +0 -0
  84. {fleet_python-0.2.68 → fleet_python-0.2.69}/tests/__init__.py +0 -0
  85. {fleet_python-0.2.68 → fleet_python-0.2.69}/tests/test_verifier_from_string.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.68
3
+ Version: 0.2.69
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -48,7 +48,7 @@ class BaseWrapper:
48
48
  import logging
49
49
 
50
50
  logger = logging.getLogger(__name__)
51
- logger.debug(f"Headers being sent: {headers}")
51
+ # logger.debug(f"Headers being sent: {headers}")
52
52
  return headers
53
53
 
54
54
 
@@ -93,8 +93,9 @@ class AsyncWrapper(BaseWrapper):
93
93
 
94
94
  # Debug log 500 errors
95
95
  if status_code == 500:
96
- logger.error(f"Got 500 error from {response.url}")
97
- logger.error(f"Response text: {response.text}")
96
+ # logger.error(f"Got 500 error from {response.url}")
97
+ # logger.error(f"Response text: {response.text}")
98
+ pass
98
99
 
99
100
  # Try to parse error response as JSON
100
101
  try:
@@ -406,8 +406,8 @@ class AsyncFleet:
406
406
  error_msg = f"Failed to create verifier {task_json.get('key', task_json.get('id'))}: {e}"
407
407
  if raise_on_verifier_error:
408
408
  raise ValueError(error_msg) from e
409
- else:
410
- logger.warning(error_msg)
409
+ # else:
410
+ # logger.warning(error_msg)
411
411
 
412
412
  task = Task(
413
413
  key=task_json.get("key", task_json.get("id")),
@@ -499,25 +499,25 @@ class AsyncFleet:
499
499
  verifier_sha=tr.verifier.sha256,
500
500
  )
501
501
  except Exception as e:
502
- logger.warning(
503
- f"Failed to create verifier {tr.verifier.key}: {e}"
504
- )
502
+ # logger.warning(
503
+ # f"Failed to create verifier {tr.verifier.key}: {e}"
504
+ # )
505
505
  return None
506
506
  else:
507
507
  # Fallback: try fetching by ID
508
508
  try:
509
- logger.warning(
510
- f"Embedded verifier code missing for {tr.verifier.key} (NoSuchKey). "
511
- f"Attempting to refetch by id {tr.verifier.verifier_id}"
512
- )
509
+ # logger.warning(
510
+ # f"Embedded verifier code missing for {tr.verifier.key} (NoSuchKey). "
511
+ # f"Attempting to refetch by id {tr.verifier.verifier_id}"
512
+ # )
513
513
  return await self._load_verifier(
514
514
  tr.verifier.verifier_id
515
515
  )
516
516
  except Exception as e:
517
- logger.warning(
518
- f"Refetch by verifier id failed for {tr.verifier.key}: {e}. "
519
- "Leaving verifier unset."
520
- )
517
+ # logger.warning(
518
+ # f"Refetch by verifier id failed for {tr.verifier.key}: {e}. "
519
+ # "Leaving verifier unset."
520
+ # )
521
521
  return None
522
522
 
523
523
  # Add the coroutine for parallel execution
@@ -556,9 +556,10 @@ class AsyncFleet:
556
556
  if task_response.verifier:
557
557
  # Process verifier result
558
558
  if isinstance(verifier_result, Exception):
559
- logger.warning(
560
- f"Verifier loading failed for {task_response.key}: {verifier_result}"
561
- )
559
+ # logger.warning(
560
+ # f"Verifier loading failed for {task_response.key}: {verifier_result}"
561
+ # )
562
+ pass
562
563
  elif verifier_result is not None:
563
564
  verifier = verifier_result
564
565
  embedded_code = task_response.verifier.code or ""
@@ -632,10 +633,10 @@ class AsyncFleet:
632
633
  with open(filename, "w", encoding="utf-8") as f:
633
634
  json.dump(tasks_data, f, indent=2, default=str)
634
635
 
635
- logger.info(f"Exported {len(tasks)} tasks to {filename}")
636
+ # logger.info(f"Exported {len(tasks)} tasks to {filename}")
636
637
  return filename
637
638
  else:
638
- logger.info("No tasks found to export")
639
+ # logger.info("No tasks found to export")
639
640
  return None
640
641
 
641
642
  async def import_single_task(self, task: Task, project_key: Optional[str] = None):
@@ -664,7 +665,7 @@ class AsyncFleet:
664
665
  )
665
666
  return response
666
667
  except Exception as e:
667
- logger.error(f"Failed to import task {task.key}: {e}")
668
+ # logger.error(f"Failed to import task {task.key}: {e}")
668
669
  return None
669
670
 
670
671
  async def import_tasks(self, filename: str, project_key: Optional[str] = None):
@@ -884,17 +885,17 @@ async def _execute_verifier_remote(
884
885
  request_data["bundle"] = bundle_b64
885
886
 
886
887
  # Debug logging
887
- logger.debug(
888
- f"Sending verifier execute request: key={key}, sha256={bundle_sha[:8]}..., function_name={function_name}"
889
- )
890
- logger.debug(f"Request has bundle: {needs_upload}")
891
- logger.debug(f"Using client with base_url: {client.base_url}")
892
- logger.debug(f"Request data keys: {list(request_data.keys())}")
893
- logger.debug(
894
- f"Bundle size: {len(request_data.get('bundle', ''))} chars"
895
- if "bundle" in request_data
896
- else "No bundle"
897
- )
888
+ # logger.debug(
889
+ # f"Sending verifier execute request: key={key}, sha256={bundle_sha[:8]}..., function_name={function_name}"
890
+ # )
891
+ # logger.debug(f"Request has bundle: {needs_upload}")
892
+ # logger.debug(f"Using client with base_url: {client.base_url}")
893
+ # logger.debug(f"Request data keys: {list(request_data.keys())}")
894
+ # logger.debug(
895
+ # f"Bundle size: {len(request_data.get('bundle', ''))} chars"
896
+ # if "bundle" in request_data
897
+ # else "No bundle"
898
+ # )
898
899
 
899
900
  # Note: This should be called on the instance URL, not the orchestrator
900
901
  # The instance has manager URLs for verifier execution
@@ -902,6 +903,6 @@ async def _execute_verifier_remote(
902
903
 
903
904
  # Debug the response
904
905
  response_json = response.json()
905
- logger.debug(f"Verifier execute response: {response_json}")
906
+ # logger.debug(f"Verifier execute response: {response_json}")
906
907
 
907
908
  return VerifiersExecuteResponse(**response_json)
@@ -37,7 +37,7 @@ class FunctionBundler:
37
37
  ) -> bytes:
38
38
  """Create a function bundle with statically extracted code."""
39
39
 
40
- logger.info(f"Creating function bundle for {func.__name__}")
40
+ # logger.info(f"Creating function bundle for {func.__name__}")
41
41
 
42
42
  # 1. Parse the main function and find dependencies
43
43
  mod_file = Path(func.__code__.co_filename)
@@ -115,7 +115,7 @@ class FunctionBundler:
115
115
 
116
116
  # Find function calls within the verifier function
117
117
  called_functions = self._extract_function_calls(main_func_ast)
118
- logger.debug(f"Functions called in verifier: {called_functions}")
118
+ # logger.debug(f"Functions called in verifier: {called_functions}")
119
119
 
120
120
  # Find all functions defined in the module
121
121
  module_functions = {}
@@ -128,7 +128,7 @@ class FunctionBundler:
128
128
  for func_name in called_functions:
129
129
  if func_name in module_functions and func_name != func.__name__:
130
130
  same_module_deps.append(func_name)
131
- logger.debug(f"Found same-module dependency: {func_name}")
131
+ # logger.debug(f"Found same-module dependency: {func_name}")
132
132
 
133
133
  # Separate local and external imports
134
134
  local_imports = {}
@@ -292,7 +292,7 @@ class FunctionBundler:
292
292
  code = ast.unparse(node)
293
293
  extracted_code.append(code)
294
294
  except Exception as e:
295
- logger.warning(f"Could not unparse AST node: {e}")
295
+ # logger.warning(f"Could not unparse AST node: {e}")
296
296
  # Fallback to original source extraction
297
297
  lines = content.split("\n")
298
298
  start_line = node.lineno - 1
@@ -305,11 +305,11 @@ class FunctionBundler:
305
305
  extracted_code.append(code)
306
306
 
307
307
  result = "\n\n".join(extracted_code)
308
- logger.debug(f"Extracted {len(extracted_code)} items from {file_path}")
308
+ # logger.debug(f"Extracted {len(extracted_code)} items from {file_path}")
309
309
  return result
310
310
 
311
311
  except Exception as e:
312
- logger.warning(f"Failed to extract functions from {file_path}: {e}")
312
+ # logger.warning(f"Failed to extract functions from {file_path}: {e}")
313
313
  # Fallback to including the entire file
314
314
  with open(file_path, "r", encoding="utf-8") as f:
315
315
  return f.read()
@@ -464,14 +464,14 @@ class FunctionBundler:
464
464
  version = dist.version # Get the installed version
465
465
  package_with_version = f"{package_name}=={version}"
466
466
  packages.add(package_with_version)
467
- logger.debug(f"Mapped {mod} -> {package_with_version}")
467
+ # logger.debug(f"Mapped {mod} -> {package_with_version}")
468
468
  except imd.PackageNotFoundError:
469
469
  # Skip stdlib or local modules
470
- logger.debug(f"Skipping {mod} (stdlib or local)")
470
+ # logger.debug(f"Skipping {mod} (stdlib or local)")
471
471
  continue
472
472
 
473
473
  package_list = list(packages)
474
- logger.debug(f"Final package list: {package_list}")
474
+ # logger.debug(f"Final package list: {package_list}")
475
475
  return package_list
476
476
 
477
477
  def _merge_requirements(
@@ -511,10 +511,10 @@ class FunctionBundler:
511
511
  if pkg_name not in seen_packages:
512
512
  final_requirements.append(req)
513
513
  seen_packages.add(pkg_name)
514
- else:
515
- logger.debug(
516
- f"Skipping auto-detected {req}, using explicit version instead"
517
- )
514
+ # else:
515
+ # logger.debug(
516
+ # f"Skipping auto-detected {req}, using explicit version instead"
517
+ # )
518
518
 
519
519
  # Always ensure fleet-python is included
520
520
  if "fleet-python" not in seen_packages:
@@ -565,9 +565,9 @@ class FunctionBundler:
565
565
  )
566
566
  if dep_src:
567
567
  same_module_code += f"\n{dep_src}\n"
568
- logger.debug(
569
- f"Extracted same-module dependency: {dep_name}"
570
- )
568
+ # logger.debug(
569
+ # f"Extracted same-module dependency: {dep_name}"
570
+ # )
571
571
 
572
572
  # Create verifier.py with the main function
573
573
  verifier_file = build_dir / "verifier.py"
@@ -586,7 +586,7 @@ class FunctionBundler:
586
586
  {code}
587
587
  """
588
588
  dest_path.write_text(extracted_content)
589
- logger.debug(f"Created extracted file: {relative_path}")
589
+ # logger.debug(f"Created extracted file: {relative_path}")
590
590
 
591
591
  # Ensure __init__.py files exist
592
592
  self._ensure_init_files(Path(relative_path), build_dir)
@@ -595,7 +595,7 @@ class FunctionBundler:
595
595
  return self._create_zip_bundle(build_dir)
596
596
 
597
597
  except Exception as e:
598
- logger.error(f"Failed to build function bundle: {e}")
598
+ # logger.error(f"Failed to build function bundle: {e}")
599
599
  raise RuntimeError(f"Function bundle creation failed: {e}")
600
600
 
601
601
  def _ensure_init_files(self, rel_path: Path, build_dir: Path):
@@ -607,7 +607,7 @@ class FunctionBundler:
607
607
  if not init_file.exists():
608
608
  init_file.parent.mkdir(parents=True, exist_ok=True)
609
609
  init_file.write_text("# Auto-generated __init__.py")
610
- logger.debug(f"Created __init__.py: {current}")
610
+ # logger.debug(f"Created __init__.py: {current}")
611
611
  current = current.parent
612
612
 
613
613
  def _create_zip_bundle(self, build_dir: Path) -> bytes:
@@ -621,7 +621,7 @@ class FunctionBundler:
621
621
  zf.write(file_path, arcname)
622
622
 
623
623
  bundle_size = len(zip_buffer.getvalue())
624
- logger.debug(f"Created function bundle ({bundle_size:,} bytes)")
624
+ # logger.debug(f"Created function bundle ({bundle_size:,} bytes)")
625
625
  return zip_buffer.getvalue()
626
626
 
627
627
  def _extract_function_source(
@@ -662,7 +662,8 @@ class FunctionBundler:
662
662
  return "\n".join(func_lines)
663
663
 
664
664
  except Exception as e:
665
- logger.warning(f"Failed to extract function {function_name}: {e}")
665
+ # logger.warning(f"Failed to extract function {function_name}: {e}")
666
+ pass
666
667
 
667
668
  return None
668
669
 
@@ -79,9 +79,9 @@ class AsyncVerifierFunction:
79
79
 
80
80
  self._bundle_data = zip_buffer.getvalue()
81
81
  self._bundle_sha = _get_bundle_sha(self._bundle_data)
82
- logger.debug(
83
- f"Created bundle from raw code for {self.key} with SHA: {self._bundle_sha}"
84
- )
82
+ # logger.debug(
83
+ # f"Created bundle from raw code for {self.key} with SHA: {self._bundle_sha}"
84
+ # )
85
85
  else:
86
86
  # Try to create bundle from function source
87
87
  try:
@@ -89,9 +89,9 @@ class AsyncVerifierFunction:
89
89
  self.func, self.extra_requirements, self.verifier_id
90
90
  )
91
91
  self._bundle_sha = _get_bundle_sha(self._bundle_data)
92
- logger.debug(
93
- f"Created bundle for {self.key} with SHA: {self._bundle_sha}"
94
- )
92
+ # logger.debug(
93
+ # f"Created bundle for {self.key} with SHA: {self._bundle_sha}"
94
+ # )
95
95
  except OSError as e:
96
96
  # Can't create bundle - no source and no raw code
97
97
  raise OSError(f"Cannot create bundle for {self.key}: {e}")
@@ -104,20 +104,21 @@ class AsyncVerifierFunction:
104
104
 
105
105
  # If bundle_data is empty, we're using server-side bundle
106
106
  if not bundle_data:
107
- logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
107
+ # logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
108
108
  return bundle_sha, False # No upload needed, server has it
109
109
 
110
110
  # Always check if bundle exists on server
111
111
  try:
112
112
  exists = await env.check_bundle_exists(bundle_sha)
113
113
  if exists.success:
114
- logger.info(f"Bundle {bundle_sha[:8]}... found on server")
114
+ # logger.info(f"Bundle {bundle_sha[:8]}... found on server")
115
115
  return bundle_sha, False # Found on server, no upload needed
116
116
  except Exception as e:
117
- logger.warning(f"Failed to check bundle existence: {e}")
117
+ # logger.warning(f"Failed to check bundle existence: {e}")
118
+ pass
118
119
 
119
120
  # Bundle not found on server - upload needed
120
- logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
121
+ # logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
121
122
  return bundle_sha, True # Upload needed
122
123
 
123
124
  async def __call__(self, env: AsyncEnv, *args, **kwargs) -> float:
@@ -147,7 +148,7 @@ class AsyncVerifierFunction:
147
148
  )
148
149
 
149
150
  except Exception as e:
150
- logger.error(f"Error in verifier {self.key}: {e}")
151
+ # logger.error(f"Error in verifier {self.key}: {e}")
151
152
  # Return error score 0
152
153
  return 0.0
153
154
 
@@ -179,7 +180,7 @@ class AsyncVerifierFunction:
179
180
  try:
180
181
  return float(result)
181
182
  except (ValueError, TypeError):
182
- logger.warning(f"Could not convert result to float: {result}")
183
+ # logger.warning(f"Could not convert result to float: {result}")
183
184
  return 0.0
184
185
 
185
186
  def _raise_remote_error(self, error_info: Dict[str, Any]):
@@ -238,7 +239,7 @@ Remote traceback:
238
239
 
239
240
  if needs_upload:
240
241
  # Need to upload bundle to S3
241
- logger.info(f"Uploading bundle {bundle_sha[:8]}... for {self.key}")
242
+ # logger.info(f"Uploading bundle {bundle_sha[:8]}... for {self.key}")
242
243
  bundle_data, _ = self._get_or_create_bundle()
243
244
 
244
245
  response = await env.execute_verifier_remote(
@@ -252,11 +253,11 @@ Remote traceback:
252
253
  needs_upload=True,
253
254
  )
254
255
 
255
- logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
256
+ # logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
256
257
 
257
258
  else:
258
259
  # Bundle already available - execute without upload
259
- logger.info(f"Bundle {bundle_sha[:8]}... already cached for {self.key}")
260
+ # logger.info(f"Bundle {bundle_sha[:8]}... already cached for {self.key}")
260
261
  response = await env.execute_verifier_remote(
261
262
  bundle_data=b"", # Empty bundle since it's cached
262
263
  bundle_sha=bundle_sha,
@@ -273,9 +274,9 @@ Remote traceback:
273
274
  except Exception as e:
274
275
  # Check if error indicates bundle not found and retry with upload
275
276
  if self._is_bundle_not_found_error(e) and not needs_upload:
276
- logger.info(
277
- f"Bundle {bundle_sha[:8]}... not found on server, uploading..."
278
- )
277
+ # logger.info(
278
+ # f"Bundle {bundle_sha[:8]}... not found on server, uploading..."
279
+ # )
279
280
  bundle_data, _ = self._get_or_create_bundle()
280
281
  response = await env.execute_verifier_remote(
281
282
  bundle_data=bundle_data,
@@ -289,7 +290,7 @@ Remote traceback:
289
290
  )
290
291
  return response
291
292
  else:
292
- logger.error(f"Error in remote execution of {self.key}: {e}")
293
+ # logger.error(f"Error in remote execution of {self.key}: {e}")
293
294
  raise
294
295
 
295
296
 
@@ -48,7 +48,7 @@ class BaseWrapper:
48
48
  import logging
49
49
 
50
50
  logger = logging.getLogger(__name__)
51
- logger.debug(f"Headers being sent: {headers}")
51
+ # logger.debug(f"Headers being sent: {headers}")
52
52
  return headers
53
53
 
54
54
 
@@ -93,8 +93,9 @@ class SyncWrapper(BaseWrapper):
93
93
 
94
94
  # Debug log 500 errors
95
95
  if status_code == 500:
96
- logger.error(f"Got 500 error from {response.url}")
97
- logger.error(f"Response text: {response.text}")
96
+ # logger.error(f"Got 500 error from {response.url}")
97
+ # logger.error(f"Response text: {response.text}")
98
+ pass
98
99
 
99
100
  # Try to parse error response as JSON
100
101
  try:
@@ -404,8 +404,8 @@ class Fleet:
404
404
  error_msg = f"Failed to create verifier {task_json.get('key', task_json.get('id'))}: {e}"
405
405
  if raise_on_verifier_error:
406
406
  raise ValueError(error_msg) from e
407
- else:
408
- logger.warning(error_msg)
407
+ # else:
408
+ # logger.warning(error_msg)
409
409
 
410
410
  task = Task(
411
411
  key=task_json.get("key", task_json.get("id")),
@@ -495,23 +495,23 @@ class Fleet:
495
495
  verifier_sha=tr.verifier.sha256,
496
496
  )
497
497
  except Exception as e:
498
- logger.warning(
499
- f"Failed to create verifier {tr.verifier.key}: {e}"
500
- )
498
+ # logger.warning(
499
+ # f"Failed to create verifier {tr.verifier.key}: {e}"
500
+ # )
501
501
  return None
502
502
  else:
503
503
  # Fallback: try fetching by ID
504
504
  try:
505
- logger.warning(
506
- f"Embedded verifier code missing for {tr.verifier.key} (NoSuchKey). "
507
- f"Attempting to refetch by id {tr.verifier.verifier_id}"
508
- )
505
+ # logger.warning(
506
+ # f"Embedded verifier code missing for {tr.verifier.key} (NoSuchKey). "
507
+ # f"Attempting to refetch by id {tr.verifier.verifier_id}"
508
+ # )
509
509
  return self._load_verifier(tr.verifier.verifier_id)
510
510
  except Exception as e:
511
- logger.warning(
512
- f"Refetch by verifier id failed for {tr.verifier.key}: {e}. "
513
- "Leaving verifier unset."
514
- )
511
+ # logger.warning(
512
+ # f"Refetch by verifier id failed for {tr.verifier.key}: {e}. "
513
+ # "Leaving verifier unset."
514
+ # )
515
515
  return None
516
516
 
517
517
  # Add the task for parallel execution
@@ -551,7 +551,7 @@ class Fleet:
551
551
  result = future.result()
552
552
  verifier_results.append(result)
553
553
  except Exception as e:
554
- logger.warning(f"Verifier loading failed: {e}")
554
+ # logger.warning(f"Verifier loading failed: {e}")
555
555
  verifier_results.append(None)
556
556
 
557
557
  # Build tasks with results
@@ -638,10 +638,10 @@ class Fleet:
638
638
  with open(filename, "w", encoding="utf-8") as f:
639
639
  json.dump(tasks_data, f, indent=2, default=str)
640
640
 
641
- logger.info(f"Exported {len(tasks)} tasks to {filename}")
641
+ # logger.info(f"Exported {len(tasks)} tasks to {filename}")
642
642
  return filename
643
643
  else:
644
- logger.info("No tasks found to export")
644
+ # logger.info("No tasks found to export")
645
645
  return None
646
646
 
647
647
  def import_single_task(self, task: Task, project_key: Optional[str] = None):
@@ -670,7 +670,7 @@ class Fleet:
670
670
  )
671
671
  return response
672
672
  except Exception as e:
673
- logger.error(f"Failed to import task {task.key}: {e}")
673
+ # logger.error(f"Failed to import task {task.key}: {e}")
674
674
  return None
675
675
 
676
676
  def import_tasks(self, filename: str, project_key: Optional[str] = None):
@@ -883,17 +883,17 @@ def _execute_verifier_remote(
883
883
  request_data["bundle"] = bundle_b64
884
884
 
885
885
  # Debug logging
886
- logger.debug(
887
- f"Sending verifier execute request: key={key}, sha256={bundle_sha[:8]}..., function_name={function_name}"
888
- )
889
- logger.debug(f"Request has bundle: {needs_upload}")
890
- logger.debug(f"Using client with base_url: {client.base_url}")
891
- logger.debug(f"Request data keys: {list(request_data.keys())}")
892
- logger.debug(
893
- f"Bundle size: {len(request_data.get('bundle', ''))} chars"
894
- if "bundle" in request_data
895
- else "No bundle"
896
- )
886
+ # logger.debug(
887
+ # f"Sending verifier execute request: key={key}, sha256={bundle_sha[:8]}..., function_name={function_name}"
888
+ # )
889
+ # logger.debug(f"Request has bundle: {needs_upload}")
890
+ # logger.debug(f"Using client with base_url: {client.base_url}")
891
+ # logger.debug(f"Request data keys: {list(request_data.keys())}")
892
+ # logger.debug(
893
+ # f"Bundle size: {len(request_data.get('bundle', ''))} chars"
894
+ # if "bundle" in request_data
895
+ # else "No bundle"
896
+ # )
897
897
 
898
898
  # Note: This should be called on the instance URL, not the orchestrator
899
899
  # The instance has manager URLs for verifier execution
@@ -901,6 +901,6 @@ def _execute_verifier_remote(
901
901
 
902
902
  # Debug the response
903
903
  response_json = response.json()
904
- logger.debug(f"Verifier execute response: {response_json}")
904
+ # logger.debug(f"Verifier execute response: {response_json}")
905
905
 
906
906
  return VerifiersExecuteResponse(**response_json)
@@ -37,7 +37,7 @@ class FunctionBundler:
37
37
  ) -> bytes:
38
38
  """Create a function bundle with statically extracted code."""
39
39
 
40
- logger.info(f"Creating function bundle for {func.__name__}")
40
+ # logger.info(f"Creating function bundle for {func.__name__}")
41
41
 
42
42
  # 1. Parse the main function and find dependencies
43
43
  mod_file = Path(func.__code__.co_filename)
@@ -115,7 +115,7 @@ class FunctionBundler:
115
115
 
116
116
  # Find function calls within the verifier function
117
117
  called_functions = self._extract_function_calls(main_func_ast)
118
- logger.debug(f"Functions called in verifier: {called_functions}")
118
+ # logger.debug(f"Functions called in verifier: {called_functions}")
119
119
 
120
120
  # Find all functions defined in the module
121
121
  module_functions = {}
@@ -128,7 +128,7 @@ class FunctionBundler:
128
128
  for func_name in called_functions:
129
129
  if func_name in module_functions and func_name != func.__name__:
130
130
  same_module_deps.append(func_name)
131
- logger.debug(f"Found same-module dependency: {func_name}")
131
+ # logger.debug(f"Found same-module dependency: {func_name}")
132
132
 
133
133
  # Separate local and external imports
134
134
  local_imports = {}
@@ -292,7 +292,7 @@ class FunctionBundler:
292
292
  code = ast.unparse(node)
293
293
  extracted_code.append(code)
294
294
  except Exception as e:
295
- logger.warning(f"Could not unparse AST node: {e}")
295
+ # logger.warning(f"Could not unparse AST node: {e}")
296
296
  # Fallback to original source extraction
297
297
  lines = content.split("\n")
298
298
  start_line = node.lineno - 1
@@ -305,11 +305,11 @@ class FunctionBundler:
305
305
  extracted_code.append(code)
306
306
 
307
307
  result = "\n\n".join(extracted_code)
308
- logger.debug(f"Extracted {len(extracted_code)} items from {file_path}")
308
+ # logger.debug(f"Extracted {len(extracted_code)} items from {file_path}")
309
309
  return result
310
310
 
311
311
  except Exception as e:
312
- logger.warning(f"Failed to extract functions from {file_path}: {e}")
312
+ # logger.warning(f"Failed to extract functions from {file_path}: {e}")
313
313
  # Fallback to including the entire file
314
314
  with open(file_path, "r", encoding="utf-8") as f:
315
315
  return f.read()
@@ -464,14 +464,14 @@ class FunctionBundler:
464
464
  version = dist.version # Get the installed version
465
465
  package_with_version = f"{package_name}=={version}"
466
466
  packages.add(package_with_version)
467
- logger.debug(f"Mapped {mod} -> {package_with_version}")
467
+ # logger.debug(f"Mapped {mod} -> {package_with_version}")
468
468
  except imd.PackageNotFoundError:
469
469
  # Skip stdlib or local modules
470
- logger.debug(f"Skipping {mod} (stdlib or local)")
470
+ # logger.debug(f"Skipping {mod} (stdlib or local)")
471
471
  continue
472
472
 
473
473
  package_list = list(packages)
474
- logger.debug(f"Final package list: {package_list}")
474
+ # logger.debug(f"Final package list: {package_list}")
475
475
  return package_list
476
476
 
477
477
  def _merge_requirements(
@@ -511,10 +511,10 @@ class FunctionBundler:
511
511
  if pkg_name not in seen_packages:
512
512
  final_requirements.append(req)
513
513
  seen_packages.add(pkg_name)
514
- else:
515
- logger.debug(
516
- f"Skipping auto-detected {req}, using explicit version instead"
517
- )
514
+ # else:
515
+ # logger.debug(
516
+ # f"Skipping auto-detected {req}, using explicit version instead"
517
+ # )
518
518
 
519
519
  # Always ensure fleet-python is included
520
520
  if "fleet-python" not in seen_packages:
@@ -565,9 +565,9 @@ class FunctionBundler:
565
565
  )
566
566
  if dep_src:
567
567
  same_module_code += f"\n{dep_src}\n"
568
- logger.debug(
569
- f"Extracted same-module dependency: {dep_name}"
570
- )
568
+ # logger.debug(
569
+ # f"Extracted same-module dependency: {dep_name}"
570
+ # )
571
571
 
572
572
  # Create verifier.py with the main function
573
573
  verifier_file = build_dir / "verifier.py"
@@ -586,7 +586,7 @@ class FunctionBundler:
586
586
  {code}
587
587
  """
588
588
  dest_path.write_text(extracted_content)
589
- logger.debug(f"Created extracted file: {relative_path}")
589
+ # logger.debug(f"Created extracted file: {relative_path}")
590
590
 
591
591
  # Ensure __init__.py files exist
592
592
  self._ensure_init_files(Path(relative_path), build_dir)
@@ -595,7 +595,7 @@ class FunctionBundler:
595
595
  return self._create_zip_bundle(build_dir)
596
596
 
597
597
  except Exception as e:
598
- logger.error(f"Failed to build function bundle: {e}")
598
+ # logger.error(f"Failed to build function bundle: {e}")
599
599
  raise RuntimeError(f"Function bundle creation failed: {e}")
600
600
 
601
601
  def _ensure_init_files(self, rel_path: Path, build_dir: Path):
@@ -607,7 +607,7 @@ class FunctionBundler:
607
607
  if not init_file.exists():
608
608
  init_file.parent.mkdir(parents=True, exist_ok=True)
609
609
  init_file.write_text("# Auto-generated __init__.py")
610
- logger.debug(f"Created __init__.py: {current}")
610
+ # logger.debug(f"Created __init__.py: {current}")
611
611
  current = current.parent
612
612
 
613
613
  def _create_zip_bundle(self, build_dir: Path) -> bytes:
@@ -621,7 +621,7 @@ class FunctionBundler:
621
621
  zf.write(file_path, arcname)
622
622
 
623
623
  bundle_size = len(zip_buffer.getvalue())
624
- logger.debug(f"Created function bundle ({bundle_size:,} bytes)")
624
+ # logger.debug(f"Created function bundle ({bundle_size:,} bytes)")
625
625
  return zip_buffer.getvalue()
626
626
 
627
627
  def _extract_function_source(
@@ -662,7 +662,8 @@ class FunctionBundler:
662
662
  return "\n".join(func_lines)
663
663
 
664
664
  except Exception as e:
665
- logger.warning(f"Failed to extract function {function_name}: {e}")
665
+ # logger.warning(f"Failed to extract function {function_name}: {e}")
666
+ pass
666
667
 
667
668
  return None
668
669
 
@@ -49,7 +49,7 @@ class SyncVerifierFunction:
49
49
  )
50
50
 
51
51
  except Exception as e:
52
- logger.error(f"Error in verifier {self.key}: {e}")
52
+ # logger.error(f"Error in verifier {self.key}: {e}")
53
53
  # Return error score 0
54
54
  return 0.0
55
55
 
@@ -90,9 +90,9 @@ class SyncVerifierFunction:
90
90
 
91
91
  self._bundle_data = zip_buffer.getvalue()
92
92
  self._bundle_sha = _get_bundle_sha(self._bundle_data)
93
- logger.debug(
94
- f"Created bundle from raw code for {self.key} with SHA: {self._bundle_sha}"
95
- )
93
+ # logger.debug(
94
+ # f"Created bundle from raw code for {self.key} with SHA: {self._bundle_sha}"
95
+ # )
96
96
  else:
97
97
  # Try to create bundle from function source
98
98
  try:
@@ -100,9 +100,9 @@ class SyncVerifierFunction:
100
100
  self.func, self.extra_requirements, self.verifier_id
101
101
  )
102
102
  self._bundle_sha = _get_bundle_sha(self._bundle_data)
103
- logger.debug(
104
- f"Created bundle for {self.key} with SHA: {self._bundle_sha}"
105
- )
103
+ # logger.debug(
104
+ # f"Created bundle for {self.key} with SHA: {self._bundle_sha}"
105
+ # )
106
106
  except OSError as e:
107
107
  # Can't create bundle - no source and no raw code
108
108
  raise OSError(f"Cannot create bundle for {self.key}: {e}")
@@ -115,20 +115,21 @@ class SyncVerifierFunction:
115
115
 
116
116
  # If bundle_data is empty, we're using server-side bundle
117
117
  if not bundle_data:
118
- logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
118
+ # logger.debug(f"Using server-side bundle {bundle_sha[:8]}...")
119
119
  return bundle_sha, False # No upload needed, server has it
120
120
 
121
121
  # Always check if bundle exists on server
122
122
  try:
123
123
  exists = env.check_bundle_exists(bundle_sha)
124
124
  if exists.success:
125
- logger.info(f"Bundle {bundle_sha[:8]}... found on server")
125
+ # logger.info(f"Bundle {bundle_sha[:8]}... found on server")
126
126
  return bundle_sha, False # Found on server, no upload needed
127
127
  except Exception as e:
128
- logger.warning(f"Failed to check bundle existence: {e}")
128
+ # logger.warning(f"Failed to check bundle existence: {e}")
129
+ pass
129
130
 
130
131
  # Bundle not found on server - upload needed
131
- logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
132
+ # logger.info(f"Bundle {bundle_sha[:8]}... needs to be uploaded")
132
133
  return bundle_sha, True # Upload needed
133
134
 
134
135
  def __call__(self, env: "SyncEnv", *args, **kwargs) -> float:
@@ -158,7 +159,7 @@ class SyncVerifierFunction:
158
159
  )
159
160
 
160
161
  except Exception as e:
161
- logger.error(f"Error in verifier {self.key}: {e}")
162
+ # logger.error(f"Error in verifier {self.key}: {e}")
162
163
  # Return error score 0
163
164
  return 0.0
164
165
 
@@ -190,7 +191,7 @@ class SyncVerifierFunction:
190
191
  try:
191
192
  return float(result)
192
193
  except (ValueError, TypeError):
193
- logger.warning(f"Could not convert result to float: {result}")
194
+ # logger.warning(f"Could not convert result to float: {result}")
194
195
  return 0.0
195
196
 
196
197
  def _raise_remote_error(self, error_info: Dict[str, Any]):
@@ -249,7 +250,7 @@ Remote traceback:
249
250
 
250
251
  if needs_upload:
251
252
  # Need to upload bundle to S3
252
- logger.info(f"Uploading bundle {bundle_sha[:8]}... for {self.key}")
253
+ # logger.info(f"Uploading bundle {bundle_sha[:8]}... for {self.key}")
253
254
  bundle_data, _ = self._get_or_create_bundle()
254
255
 
255
256
  response = env.execute_verifier_remote(
@@ -263,12 +264,12 @@ Remote traceback:
263
264
  needs_upload=True,
264
265
  )
265
266
 
266
- logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
267
+ # logger.debug(f"Bundle {bundle_sha[:8]}... uploaded successfully")
267
268
  return response
268
269
 
269
270
  else:
270
271
  # Bundle already available - execute without upload
271
- logger.info(f"Bundle {bundle_sha[:8]}... already cached for {self.key}")
272
+ # logger.info(f"Bundle {bundle_sha[:8]}... already cached for {self.key}")
272
273
  response = env.execute_verifier_remote(
273
274
  bundle_data=b"", # Empty bundle since it's cached
274
275
  bundle_sha=bundle_sha,
@@ -284,9 +285,9 @@ Remote traceback:
284
285
  except Exception as e:
285
286
  # Check if error indicates bundle not found and retry with upload
286
287
  if self._is_bundle_not_found_error(e) and not needs_upload:
287
- logger.info(
288
- f"Bundle {bundle_sha[:8]}... not found on server, uploading..."
289
- )
288
+ # logger.info(
289
+ # f"Bundle {bundle_sha[:8]}... not found on server, uploading..."
290
+ # )
290
291
  bundle_data, _ = self._get_or_create_bundle()
291
292
  response = env.execute_verifier_remote(
292
293
  bundle_data=bundle_data,
@@ -300,7 +301,7 @@ Remote traceback:
300
301
  )
301
302
  return response
302
303
  else:
303
- logger.error(f"Error in remote execution of {self.key}: {e}")
304
+ # logger.error(f"Error in remote execution of {self.key}: {e}")
304
305
  raise
305
306
 
306
307
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fleet-python
3
- Version: 0.2.68
3
+ Version: 0.2.69
4
4
  Summary: Python SDK for Fleet environments
5
5
  Author-email: Fleet AI <nic@fleet.so>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fleet-python"
7
- version = "0.2.68"
7
+ version = "0.2.69"
8
8
  description = "Python SDK for Fleet environments"
9
9
  authors = [
10
10
  {name = "Fleet AI", email = "nic@fleet.so"},
File without changes
File without changes
File without changes