semble 0.7.2__tar.gz → 0.7.3__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.
Files changed (90) hide show
  1. {semble-0.7.2 → semble-0.7.3}/PKG-INFO +1 -1
  2. {semble-0.7.2 → semble-0.7.3}/src/semble/index/create.py +8 -4
  3. {semble-0.7.2 → semble-0.7.3}/src/semble/version.py +1 -1
  4. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/PKG-INFO +1 -1
  5. semble-0.7.3/src/semble.egg-info/scm_version.json +8 -0
  6. {semble-0.7.2 → semble-0.7.3}/tests/index/test_create.py +13 -0
  7. semble-0.7.2/src/semble.egg-info/scm_version.json +0 -8
  8. {semble-0.7.2 → semble-0.7.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  9. {semble-0.7.2 → semble-0.7.3}/.github/workflows/ci.yaml +0 -0
  10. {semble-0.7.2 → semble-0.7.3}/.github/workflows/release.yaml +0 -0
  11. {semble-0.7.2 → semble-0.7.3}/.gitignore +0 -0
  12. {semble-0.7.2 → semble-0.7.3}/.pre-commit-config.yaml +0 -0
  13. {semble-0.7.2 → semble-0.7.3}/CITATION.cff +0 -0
  14. {semble-0.7.2 → semble-0.7.3}/CONTRIBUTING.md +0 -0
  15. {semble-0.7.2 → semble-0.7.3}/LICENSE +0 -0
  16. {semble-0.7.2 → semble-0.7.3}/MANIFEST.in +0 -0
  17. {semble-0.7.2 → semble-0.7.3}/Makefile +0 -0
  18. {semble-0.7.2 → semble-0.7.3}/README.md +0 -0
  19. {semble-0.7.2 → semble-0.7.3}/docs/installation.md +0 -0
  20. {semble-0.7.2 → semble-0.7.3}/pyproject.toml +0 -0
  21. {semble-0.7.2 → semble-0.7.3}/scripts/demo/dark.tape +0 -0
  22. {semble-0.7.2 → semble-0.7.3}/scripts/demo/light.tape +0 -0
  23. {semble-0.7.2 → semble-0.7.3}/scripts/demo/record.sh +0 -0
  24. {semble-0.7.2 → semble-0.7.3}/setup.cfg +0 -0
  25. {semble-0.7.2 → semble-0.7.3}/src/semble/__init__.py +0 -0
  26. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/antigravity.md +0 -0
  27. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/claude.md +0 -0
  28. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/codex.toml +0 -0
  29. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/commandcode.md +0 -0
  30. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/copilot.md +0 -0
  31. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/cursor.md +0 -0
  32. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/gemini.md +0 -0
  33. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/grok.md +0 -0
  34. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/kilo.md +0 -0
  35. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/kiro.md +0 -0
  36. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/opencode.md +0 -0
  37. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/pi.md +0 -0
  38. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/qwen.md +0 -0
  39. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/reasonix.md +0 -0
  40. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/skill.md +0 -0
  41. {semble-0.7.2 → semble-0.7.3}/src/semble/agents/zcode.md +0 -0
  42. {semble-0.7.2 → semble-0.7.3}/src/semble/cache.py +0 -0
  43. {semble-0.7.2 → semble-0.7.3}/src/semble/chunking/__init__.py +0 -0
  44. {semble-0.7.2 → semble-0.7.3}/src/semble/chunking/chunking.py +0 -0
  45. {semble-0.7.2 → semble-0.7.3}/src/semble/chunking/core.py +0 -0
  46. {semble-0.7.2 → semble-0.7.3}/src/semble/cli.py +0 -0
  47. {semble-0.7.2 → semble-0.7.3}/src/semble/index/__init__.py +0 -0
  48. {semble-0.7.2 → semble-0.7.3}/src/semble/index/bm25.py +0 -0
  49. {semble-0.7.2 → semble-0.7.3}/src/semble/index/dense.py +0 -0
  50. {semble-0.7.2 → semble-0.7.3}/src/semble/index/file_walker.py +0 -0
  51. {semble-0.7.2 → semble-0.7.3}/src/semble/index/files.py +0 -0
  52. {semble-0.7.2 → semble-0.7.3}/src/semble/index/index.py +0 -0
  53. {semble-0.7.2 → semble-0.7.3}/src/semble/index/sparse.py +0 -0
  54. {semble-0.7.2 → semble-0.7.3}/src/semble/index/types.py +0 -0
  55. {semble-0.7.2 → semble-0.7.3}/src/semble/installer/__init__.py +0 -0
  56. {semble-0.7.2 → semble-0.7.3}/src/semble/installer/agents.py +0 -0
  57. {semble-0.7.2 → semble-0.7.3}/src/semble/installer/config.py +0 -0
  58. {semble-0.7.2 → semble-0.7.3}/src/semble/installer/installer.py +0 -0
  59. {semble-0.7.2 → semble-0.7.3}/src/semble/mcp.py +0 -0
  60. {semble-0.7.2 → semble-0.7.3}/src/semble/py.typed +0 -0
  61. {semble-0.7.2 → semble-0.7.3}/src/semble/ranking/__init__.py +0 -0
  62. {semble-0.7.2 → semble-0.7.3}/src/semble/ranking/boosting.py +0 -0
  63. {semble-0.7.2 → semble-0.7.3}/src/semble/ranking/penalties.py +0 -0
  64. {semble-0.7.2 → semble-0.7.3}/src/semble/search.py +0 -0
  65. {semble-0.7.2 → semble-0.7.3}/src/semble/stats.py +0 -0
  66. {semble-0.7.2 → semble-0.7.3}/src/semble/tokens.py +0 -0
  67. {semble-0.7.2 → semble-0.7.3}/src/semble/types.py +0 -0
  68. {semble-0.7.2 → semble-0.7.3}/src/semble/utils.py +0 -0
  69. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/SOURCES.txt +0 -0
  70. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/dependency_links.txt +0 -0
  71. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/entry_points.txt +0 -0
  72. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/requires.txt +0 -0
  73. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/scm_file_list.json +0 -0
  74. {semble-0.7.2 → semble-0.7.3}/src/semble.egg-info/top_level.txt +0 -0
  75. {semble-0.7.2 → semble-0.7.3}/tests/__init__.py +0 -0
  76. {semble-0.7.2 → semble-0.7.3}/tests/conftest.py +0 -0
  77. {semble-0.7.2 → semble-0.7.3}/tests/index/test_bm25.py +0 -0
  78. {semble-0.7.2 → semble-0.7.3}/tests/index/test_dense.py +0 -0
  79. {semble-0.7.2 → semble-0.7.3}/tests/index/test_index.py +0 -0
  80. {semble-0.7.2 → semble-0.7.3}/tests/test_cache.py +0 -0
  81. {semble-0.7.2 → semble-0.7.3}/tests/test_chunker.py +0 -0
  82. {semble-0.7.2 → semble-0.7.3}/tests/test_cli.py +0 -0
  83. {semble-0.7.2 → semble-0.7.3}/tests/test_file_walker.py +0 -0
  84. {semble-0.7.2 → semble-0.7.3}/tests/test_files.py +0 -0
  85. {semble-0.7.2 → semble-0.7.3}/tests/test_git.py +0 -0
  86. {semble-0.7.2 → semble-0.7.3}/tests/test_installer.py +0 -0
  87. {semble-0.7.2 → semble-0.7.3}/tests/test_mcp.py +0 -0
  88. {semble-0.7.2 → semble-0.7.3}/tests/test_ranking.py +0 -0
  89. {semble-0.7.2 → semble-0.7.3}/tests/test_search.py +0 -0
  90. {semble-0.7.2 → semble-0.7.3}/tests/test_stats.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semble
3
- Version: 0.7.2
3
+ Version: 0.7.3
4
4
  Summary: Fast and Accurate Code Search for Agents
5
5
  Author-email: Thomas van Dongen <thomasvdongen@proton.me>, Stéphan Tulkens <stephantul@gmail.com>
6
6
  License: MIT License
@@ -86,12 +86,16 @@ def _init_worker() -> None:
86
86
  def _chunk_files(files: list[tuple[Path, str]]) -> Generator[_ChunkedFile | None, None, None]:
87
87
  """Chunk files in order, in SEMBLE_INDEX_WORKERS worker processes when there are enough files."""
88
88
  workers = int(os.environ.get("SEMBLE_INDEX_WORKERS", 0))
89
- if workers == 0 or len(files) < _MIN_FILES_FOR_PROCESSES:
89
+ executor = None
90
+ if workers > 0 and len(files) >= _MIN_FILES_FOR_PROCESSES:
91
+ # Sandboxes (e.g. macOS Seatbelt) can deny the semaphore checks the pool runs on creation.
92
+ with contextlib.suppress(OSError, NotImplementedError):
93
+ executor = ProcessPoolExecutor(
94
+ workers, mp_context=multiprocessing.get_context("spawn"), initializer=_init_worker
95
+ )
96
+ if executor is None:
90
97
  yield from itertools.starmap(_chunk_file, files)
91
98
  else:
92
- executor = ProcessPoolExecutor(
93
- workers, mp_context=multiprocessing.get_context("spawn"), initializer=_init_worker
94
- )
95
99
  try:
96
100
  submitted = (executor.submit(_chunk_file, *file) for file in files)
97
101
  pending = deque(itertools.islice(submitted, _MAX_FILES_IN_FLIGHT))
@@ -1,2 +1,2 @@
1
- __version_triple__ = (0, 7, 2)
1
+ __version_triple__ = (0, 7, 3)
2
2
  __version__ = ".".join(map(str, __version_triple__))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semble
3
- Version: 0.7.2
3
+ Version: 0.7.3
4
4
  Summary: Fast and Accurate Code Search for Agents
5
5
  Author-email: Thomas van Dongen <thomasvdongen@proton.me>, Stéphan Tulkens <stephantul@gmail.com>
6
6
  License: MIT License
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.7.3",
3
+ "distance": 0,
4
+ "node": "ga1ba6c18a4b0a58a3d1a15217d64bc92678d1d9d",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-08"
8
+ }
@@ -126,6 +126,19 @@ def test_unreadable_file_is_skipped(mock_model: Any, tmp_path: Path) -> None:
126
126
  assert list(manifest) == ["a.py"]
127
127
 
128
128
 
129
+ def test_chunks_in_process_when_pool_is_denied(
130
+ mock_model: Any, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
131
+ ) -> None:
132
+ """Files are chunked in the main process when a sandbox denies creating the worker pool."""
133
+ monkeypatch.setattr(create, "_MIN_FILES_FOR_PROCESSES", 0)
134
+ monkeypatch.setenv("SEMBLE_INDEX_WORKERS", "2")
135
+ _write_files(tmp_path, {"a.py": "def a():\n return 1\n"})
136
+
137
+ with patch.object(create, "ProcessPoolExecutor", side_effect=PermissionError(1, "Operation not permitted")):
138
+ _, _, _, manifest = create_index_from_path(tmp_path, mock_model, display_root=tmp_path)
139
+ assert list(manifest) == ["a.py"]
140
+
141
+
129
142
  def test_worker_exits_with_parent(monkeypatch: pytest.MonkeyPatch) -> None:
130
143
  """A chunking worker exits once its parent process is gone."""
131
144
  parent_end, worker_end = multiprocessing.Pipe()
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.7.2",
3
- "distance": 0,
4
- "node": "gbb746c9c79925760df8a3759fcca658734e2eaf6",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-11-03"
8
- }
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