classifyre-cli 0.9.1__py3-none-any.whl → 0.9.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: classifyre-cli
3
- Version: 0.9.1
3
+ Version: 0.9.2
4
4
  Summary: Classifyre CLI — scan data sources for personal data and secrets
5
5
  License: MIT
6
6
  Keywords: data,governance,masking,pii,secrets
@@ -101,7 +101,7 @@ src/query/predicate.py,sha256=VH4U3UyfAL5aWKdcrSSgADy5T3s7WVWJowmNywo6EaE,1644
101
101
  src/query/rows.py,sha256=JcUgThkVIKJsQIlhemT_xQ0aiQNItCQ-x8NsLx0KLhc,4588
102
102
  src/query/runner.py,sha256=Azp3PMVMQCwXIsgku8FDiuCmDgzViltrqksutbd8Bvg,7804
103
103
  src/query/session.py,sha256=zUYfPUaN9IP2VcLdzGnU24jlRX66pSc8n7u-_IonCTA,35451
104
- src/query/warm.py,sha256=DIFFb715cMC6HDgeb8NWsvoviXSO7hN_v7Pc5V2Gmjw,6639
104
+ src/query/warm.py,sha256=Fq9x6Oej51ezywmRvoDUwYJKfHwZMmRBul4JJ01N8oo,7268
105
105
  src/query/worker.py,sha256=HG2qbuIApSpQWIuAuXZ60fvgih-_vQCrWdvgBf0Bb3U,39886
106
106
  src/query/connectors/__init__.py,sha256=e8rZ-xjwo4qewUMzdwAl5yifTY0sPpUGFaWyYeB48R4,4669
107
107
  src/query/connectors/arrow.py,sha256=psnqGJZXNx0Riyl4yhGQ9hayIxMrqaDA-7aplEz7YLc,22760
@@ -254,7 +254,7 @@ src/utils/urn.py,sha256=gqSl0H0FBZZ3cJbpDWX1ewGcyZz2MrNVTIQdoFrQMM0,12622
254
254
  src/utils/uv_sync.py,sha256=L4ETHuidlgFLbz4e3Vv0Ornh7w8xrkYeFQQGw0hJe8E,10214
255
255
  src/utils/validation.py,sha256=5NHsgyZwyEONRu9_ADxUAQNPvbMnpMhKL-hpgFEVMm8,3837
256
256
  src/utils/video_processing.py,sha256=B6Br9ybFEa_ioglJGo0P9Fmp1e2B95C24joAktwrjww,11293
257
- classifyre_cli-0.9.1.dist-info/METADATA,sha256=vCsNYQ00xaUSLBEJoUDGNZRI94qUSyi4TvXty49uodA,5841
258
- classifyre_cli-0.9.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
259
- classifyre_cli-0.9.1.dist-info/entry_points.txt,sha256=edxllyMiIFfajgCZ3dTRACXYGC34ZX1AYTezMSR5E_8,45
260
- classifyre_cli-0.9.1.dist-info/RECORD,,
257
+ classifyre_cli-0.9.2.dist-info/METADATA,sha256=CsmcURnldweB6Kt6C_UJzskmp6nIntK7l3f2ZbCHq9Q,5841
258
+ classifyre_cli-0.9.2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
259
+ classifyre_cli-0.9.2.dist-info/entry_points.txt,sha256=edxllyMiIFfajgCZ3dTRACXYGC34ZX1AYTezMSR5E_8,45
260
+ classifyre_cli-0.9.2.dist-info/RECORD,,
src/query/warm.py CHANGED
@@ -93,6 +93,22 @@ def _other_threads() -> list[str]:
93
93
  return others[1:] # one of them is this thread
94
94
 
95
95
 
96
+ #: How long to wait for threads that are already ending (DuckDB's background
97
+ #: threads stop asynchronously after the connection closes, and a loaded host
98
+ #: can take a second or two to schedule them out).
99
+ THREAD_SETTLE_SECONDS = 5.0
100
+
101
+
102
+ def _settled_other_threads(timeout: float = THREAD_SETTLE_SECONDS, poll: float = 0.05) -> list[str]:
103
+ """`_other_threads()`, once the threads that are on their way out are gone."""
104
+ deadline = time.monotonic() + timeout
105
+ others = _other_threads()
106
+ while others and time.monotonic() < deadline:
107
+ time.sleep(poll)
108
+ others = _other_threads()
109
+ return others
110
+
111
+
96
112
  def warm_up() -> dict[str, float]:
97
113
  """Run every warm-up step once; return how long each took."""
98
114
  if timings:
@@ -152,7 +168,7 @@ def warm_up() -> dict[str, float]:
152
168
  _duckdb.default_connection().close()
153
169
  except Exception: # older DuckDB: no default connection to close
154
170
  pass
155
- others = _other_threads()
171
+ others = _settled_other_threads()
156
172
  if others:
157
173
  logger.warning(
158
174
  "Query worker fork server has other threads before forking (%s); "