Commit ee210a9
Add Python 3.14 support and drop Python 3.9 (#2787)
* Initial plan
* Add Python 3.14 support and drop Python 3.9
- Update workflow to test Python 3.10-3.14 instead of 3.9-3.13
- Update pyproject.toml to target Python 3.10 as minimum version
- Upgrade Pillow from 10.4.0 to 12.0.0 for Python 3.14 support
- Update Dockerfile to use Python 3.13-bookworm
- Update devcontainer to use Python 3.13-bookworm
- Update README and AGENTS.md documentation
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Fix pyproject.toml python_version format for mypy
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Update uv version to 0.9.5 in GitHub workflows
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Upgrade type annotations to Python 3.10+ syntax (X | Y)
Applied ruff check --fix to automatically upgrade type annotations:
- Replace Optional[X] with X | None
- Replace Union[X, Y] with X | Y
- Move Callable import from typing to collections.abc
This is possible now that Python 3.9 support is dropped.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Upgrade pydantic-core to 2.41.4 for Python 3.14 support
Upgraded dependencies to get Python 3.14 wheel support:
- pydantic: 2.8.2 → 2.12.3
- pydantic-core: 2.20.1 → 2.41.4 (has cp314 wheels)
- openai: 1.99.8 → 2.6.1
- Also upgraded Azure SDKs and other dependencies
Verified pydantic-core 2.41.4 has Python 3.14 (cp314) wheels available
on PyPI and installs successfully.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Fix openai version to stay on v1.x to avoid breaking changes
Constrained openai to <2.0 in requirements.in to prevent upgrading
to v2.x which has breaking API changes. Downgraded from 2.6.1 to
1.109.1 (latest v1.x). Kept pydantic-core at 2.41.4 for Python 3.14
support.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Fix: Use minimal pydantic upgrade for Python 3.14 support
Reverted to original requirements and applied minimal upgrades:
- pydantic: 2.8.2 → 2.12.3
- pydantic-core: 2.20.1 → 2.41.4 (has cp314 wheels)
- typing-extensions: 4.13.2 → 4.15.0
- Added typing-inspection==0.4.2 (new pydantic dependency)
- Constrained openai to <2.0 in requirements.in
This avoids upgrading tiktoken, uvicorn, and other unrelated packages
that were causing test failures.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Upgrade Pillow to 12.0.0 for Python 3.14 support
Pillow 10.4.0 doesn't have Python 3.14 (cp314) wheels. Upgraded to
Pillow 12.0.0 which includes cp314 wheels for Python 3.14 support.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Upgrade tiktoken to 0.12.0 for Python 3.14 support
tiktoken 0.8.0 doesn't have Python 3.14 (cp314) wheels. Upgraded to
tiktoken 0.12.0 which includes cp314 wheels for Python 3.14 support.
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
* Remove unneeded upper bound on openai
* Bring back optional
* Undo unneeded change
* Fix mypy
* Add tests for missing lines
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pamelafox <297042+pamelafox@users.noreply.github.com>
Co-authored-by: Pamela Fox <pamelafox@microsoft.com>
Co-authored-by: Pamela Fox <pamela.fox@gmail.com>1 parent 6c9c9ab commit ee210a9
File tree
26 files changed
+302
-234
lines changed- .devcontainer
- .github/workflows
- app/backend
- approaches
- chat_history
- core
- prepdocslib
- scripts
- tests
26 files changed
+302
-234
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
| |||
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
98 | | - | |
| 110 | + | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
106 | | - | |
| 118 | + | |
107 | 119 | | |
108 | 120 | | |
109 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
| 480 | + | |
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
0 commit comments