dirsql 0.3.77__tar.gz → 0.3.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.
- {dirsql-0.3.77 → dirsql-0.3.78}/Cargo.lock +1 -1
- {dirsql-0.3.77 → dirsql-0.3.78}/PKG-INFO +1 -1
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/_async.py +20 -6
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/e2e-attestation.json +2 -2
- {dirsql-0.3.77 → dirsql-0.3.78}/Cargo.toml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/README.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/_dirsql.pyi +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/cli/binary_path.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/cli/is_windows.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/cli/main.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/py.typed +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/resolve_config_extensions.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/AGENTS.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/explanation.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/getting-started.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/embed.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/persist.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/index.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/migrations.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/package.json +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/playwright.config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/cli.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/columns.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/config.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/hooks.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/http-api.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/reference/sdk.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/docs/vitest.config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/README.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/conftest.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/index.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/playwright.config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/cli.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/reference/sdk.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/vitest.config.ts +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/src/lib.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/binding/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/python/tests/smoke/__init__.py +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/README.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/index.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/cli.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/docs/reference/sdk.md +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/command.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/db.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/default_config.toml +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/lib.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.77 → dirsql-0.3.78}/pyproject.toml +0 -0
|
@@ -11,8 +11,9 @@ from dirsql.resolve_extension import resolve_extension_path
|
|
|
11
11
|
class _WatchStream:
|
|
12
12
|
"""Async iterator that polls for file events."""
|
|
13
13
|
|
|
14
|
-
def __init__(self,
|
|
15
|
-
self.
|
|
14
|
+
def __init__(self, owner):
|
|
15
|
+
self._owner = owner
|
|
16
|
+
self._db = None
|
|
16
17
|
self._started = False
|
|
17
18
|
self._buffer = []
|
|
18
19
|
|
|
@@ -21,13 +22,19 @@ class _WatchStream:
|
|
|
21
22
|
|
|
22
23
|
async def __anext__(self):
|
|
23
24
|
if not self._started:
|
|
24
|
-
await
|
|
25
|
+
await self._owner.ready()
|
|
26
|
+
db = self._owner._db
|
|
27
|
+
assert db is not None # ready() returned, so _init_bg set _db
|
|
28
|
+
self._db = db
|
|
29
|
+
await asyncio.to_thread(db._start_watcher)
|
|
25
30
|
self._started = True
|
|
26
31
|
|
|
32
|
+
db = self._db
|
|
33
|
+
assert db is not None
|
|
27
34
|
while True:
|
|
28
35
|
if self._buffer:
|
|
29
36
|
return self._buffer.pop(0)
|
|
30
|
-
events = await asyncio.to_thread(
|
|
37
|
+
events = await asyncio.to_thread(db._poll_events, 200)
|
|
31
38
|
if events:
|
|
32
39
|
self._buffer.extend(events)
|
|
33
40
|
|
|
@@ -166,5 +173,12 @@ class DirSQL:
|
|
|
166
173
|
return await asyncio.to_thread(db.query, sql)
|
|
167
174
|
|
|
168
175
|
def watch(self):
|
|
169
|
-
"""Start watching for file changes. Returns an async iterable of RowEvent.
|
|
170
|
-
|
|
176
|
+
"""Start watching for file changes. Returns an async iterable of RowEvent.
|
|
177
|
+
|
|
178
|
+
Like :meth:`query`, the returned stream awaits :meth:`ready` on its
|
|
179
|
+
first iteration before starting the watcher, so calling ``watch``
|
|
180
|
+
before an explicit ``await db.ready()`` waits for the background scan
|
|
181
|
+
(and surfaces any initialization error) instead of failing on a
|
|
182
|
+
still-``None`` ``_db``.
|
|
183
|
+
"""
|
|
184
|
+
return _WatchStream(self)
|
|
@@ -4,7 +4,7 @@ name = "dirsql-py-ext"
|
|
|
4
4
|
# pypi/maturin handler can rewrite it via `write-version` before
|
|
5
5
|
# `maturin build`. `pyproject.toml` declares `dynamic = ["version"]`
|
|
6
6
|
# and maturin reads this field. Mirrors `packages/rust/Cargo.toml`.
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.78"
|
|
8
8
|
edition.workspace = true
|
|
9
9
|
publish = false
|
|
10
10
|
readme = "README.md"
|
|
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
|
{dirsql-0.3.77 → dirsql-0.3.78}/packages/python/docs/tests/integration/language-flag.spec.ts
RENAMED
|
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
|