Commit a40df61
authored
Migrate to uv, drop 3.9 and 3.10, fix tests (#335)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Medium risk because it changes packaging/build tooling and CI
execution (Poetry→uv, setuptools build) and adjusts split-PDF hook
timeout/cleanup behavior, which can affect test stability and request
handling.
>
> **Overview**
> Migrates the project from Poetry to `uv`: CI now installs via `uv sync
--locked`, the Makefile runs lint/tests with `uv run`, and publishing is
switched to `uv build`/`uv publish` with a hardened `scripts/publish.sh`
(strict bash + Python >=3.11 guard). Python support is narrowed to 3.11+
(CI matrix and `pylintrc`), dependency versions are updated, and
`poetry.lock`/`poetry.toml` are removed in favor of a setuptools-based
`pyproject.toml` with dynamic versioning.
>
> Improves split-PDF behavior and test robustness: the split hook now
propagates request timeouts into chunk requests, scales the outer future
timeout by concurrency “waves”, and ensures per-operation state is
cleaned up on both success and dummy-request failures; corresponding
unit/integration tests were updated (including relaxed equivalence
checks for `hi_res` OCR outputs and longer client timeouts). Adds
regression-guard unit tests to enforce key packaging/CI/publish
invariants and multipart file serialization, and removes an
unused/disabled encryption test suite.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3e0d3d3. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0571f93 commit a40df61
File tree
18 files changed
+1380
-1703
lines changed- .github/workflows
- _test_contract
- _test_unstructured_client
- integration
- unit
- scripts
- src/unstructured_client
- _hooks/custom
18 files changed
+1380
-1703
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
42 | 57 | | |
43 | 58 | | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
47 | 64 | | |
48 | 65 | | |
| 66 | + | |
49 | 67 | | |
50 | | - | |
51 | | - | |
| 68 | + | |
| 69 | + | |
52 | 70 | | |
53 | 71 | | |
| 72 | + | |
54 | 73 | | |
55 | 74 | | |
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
59 | 81 | | |
60 | 82 | | |
61 | | - | |
62 | | - | |
63 | 83 | | |
| 84 | + | |
64 | 85 | | |
| 86 | + | |
| 87 | + | |
65 | 88 | | |
66 | 89 | | |
67 | 90 | | |
| 91 | + | |
68 | 92 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 93 | + | |
| 94 | + | |
73 | 95 | | |
74 | 96 | | |
| 97 | + | |
75 | 98 | | |
76 | 99 | | |
77 | 100 | | |
78 | 101 | | |
79 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
80 | 106 | | |
81 | 107 | | |
82 | 108 | | |
| 109 | + | |
| 110 | + | |
83 | 111 | | |
84 | 112 | | |
85 | 113 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
| 39 | + | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
Lines changed: 100 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
25 | 116 | | |
26 | 117 | | |
27 | 118 | | |
| |||
53 | 144 | | |
54 | 145 | | |
55 | 146 | | |
56 | | - | |
| 147 | + | |
57 | 148 | | |
58 | 149 | | |
59 | 150 | | |
| |||
100 | 191 | | |
101 | 192 | | |
102 | 193 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 194 | + | |
115 | 195 | | |
116 | 196 | | |
117 | 197 | | |
| |||
136 | 216 | | |
137 | 217 | | |
138 | 218 | | |
139 | | - | |
| 219 | + | |
140 | 220 | | |
141 | 221 | | |
142 | 222 | | |
| |||
183 | 263 | | |
184 | 264 | | |
185 | 265 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 266 | + | |
199 | 267 | | |
200 | 268 | | |
201 | 269 | | |
| |||
212 | 280 | | |
213 | 281 | | |
214 | 282 | | |
215 | | - | |
| 283 | + | |
216 | 284 | | |
217 | 285 | | |
218 | 286 | | |
| |||
231 | 299 | | |
232 | 300 | | |
233 | 301 | | |
234 | | - | |
| 302 | + | |
235 | 303 | | |
236 | 304 | | |
237 | 305 | | |
| |||
287 | 355 | | |
288 | 356 | | |
289 | 357 | | |
290 | | - | |
| 358 | + | |
291 | 359 | | |
292 | 360 | | |
293 | 361 | | |
| |||
351 | 419 | | |
352 | 420 | | |
353 | 421 | | |
354 | | - | |
| 422 | + | |
355 | 423 | | |
356 | 424 | | |
357 | 425 | | |
| |||
400 | 468 | | |
401 | 469 | | |
402 | 470 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 471 | + | |
415 | 472 | | |
416 | 473 | | |
417 | 474 | | |
| |||
0 commit comments