esuls 0.1.17__tar.gz → 0.1.19__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: esuls
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Utility library for async database operations, HTTP requests, and parallel execution
5
5
  Author-email: IperGiove <ipergiove@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "esuls"
7
- version = "0.1.17"
7
+ version = "0.1.19"
8
8
  description = "Utility library for async database operations, HTTP requests, and parallel execution"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.14"
@@ -46,7 +46,6 @@ class AsyncDB(Generic[SchemaType]):
46
46
  _schema_init_lock: asyncio.Lock = None
47
47
  # Threading lock to guard class-level dict mutations
48
48
  _db_locks_guard = threading.Lock()
49
-
50
49
  def __init__(self, db_path: Union[str, Path], table_name: str, schema_class: Type[SchemaType]):
51
50
  """Initialize AsyncDB with a path and schema dataclass."""
52
51
  if not is_dataclass(schema_class):
@@ -95,7 +94,7 @@ class AsyncDB(Generic[SchemaType]):
95
94
  try:
96
95
  db = aiosqlite.connect(self.db_path, timeout=30.0)
97
96
  # Mark aiosqlite's thread as daemon so it won't block process exit
98
- db.daemon = True
97
+ db._thread.daemon = True
99
98
  db = await db
100
99
  # Fast WAL mode with minimal sync
101
100
  await db.execute("PRAGMA journal_mode=WAL")
@@ -256,15 +256,6 @@ async def close_shared_client() -> None:
256
256
  _domain_clients.clear()
257
257
 
258
258
 
259
- async def cleanup_all() -> None:
260
- """Close all global HTTP resources (domain clients + cffi session)."""
261
- await close_shared_client()
262
- if _get_session_cffi.cache_info().currsize > 0:
263
- cffi_session = _get_session_cffi()
264
- await cffi_session.close()
265
- _get_session_cffi.cache_clear()
266
-
267
-
268
259
  async def close_domain_client(url: str, http2: Optional[bool] = None) -> None:
269
260
  """Close HTTP client for a specific domain. If http2 is None, closes both h1 and h2 clients."""
270
261
  domain = _extract_domain(url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: esuls
3
- Version: 0.1.17
3
+ Version: 0.1.19
4
4
  Summary: Utility library for async database operations, HTTP requests, and parallel execution
5
5
  Author-email: IperGiove <ipergiove@gmail.com>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes