Continue on python 3.15 integration: Update dependencies, and fix CI matrix, format gate and venv, fix makefile drift - #314
Conversation
Raise every floor to the current release and re-lock. Notable: openai 1.81 -> 2.53, numpy 2.2.6 -> 2.5.1, pytest 8.3.3 -> 9.1.1, pytest-asyncio 0.24 -> 1.4, black 24.4.2 -> 26.5.1, isort 5.13.2 -> 8.0.1, plus ~60 transitive updates (protobuf 6 -> 7, wrapt 1 -> 2). Two floors are deliberately not the newest release: - mcp is capped at <2. mcp 2.0 removed mcp.server.fastmcp in favour of mcp.server.mcpserver; porting src/typeagent/mcp/server.py and its tests is a separate change. - pydantic keeps a marker fork. Only pydantic-core 2.48.0 (pydantic 2.14) ships cp315 wheels, so 3.15 needs >=2.14.0b1 while older Pythons stay on the 2.13.4 stable line. Both markers previously said >=2.13.4 and the lock held the beta only by accident, which any re-lock would have undone. Also replace the invalid "Programming Language :: Python :: 3.15.0rc1" classifier with 3.15 -- the rc form is not in PyPI's trove list and would be rejected on upload.
numpy 2.5 deprecates in-place shape assignment; the three call sites emitted 135 DeprecationWarnings across the test run. reshape() is equivalent here -- the arrays are empty and freshly owned in all three cases.
The matrix had no effect: nothing told uv which interpreter to use, so uv sync selected a managed CPython of its own regardless of what setup-python installed. Feed setup-python's resolved path to uv through UV_PYTHON so the 3.15 legs really run on 3.15. Other fixes: - The format job ran 'make format', which rewrites files and always exits 0, so unformatted code passed. Run the tools with --check. - .venv had no prerequisites, so dependency changes never triggered a re-sync. Depend on pyproject.toml and uv.lock, and touch .venv after syncing since uv leaves the directory's own mtime alone. - make.bat check ran bare pyright while the Makefile pins several versions, and batch reports only the last command's status, so an early failure was masked. Pin the same versions and propagate exit codes. - offline-test excluded Windows 3.14 but not the release candidate, so Windows tested the rc and not the newest stable. Mirror the check job. - Replace the 3.15.0rc1 pin with 3.15 plus allow-prereleases, so CI keeps working once rc1 leaves the setup-python manifest. - Add 3.13 to make check, add a build job so make build is exercised, and bump setup-uv to 0.12.2.
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates dependency floors/lock compatibility (including Python 3.15 classifiers), resolves NumPy 2.5 shape-assignment deprecations, and fixes CI/build plumbing so the Python matrix + formatting gate + venv resync behave correctly.
Changes:
- Bumped dependency minimums and corrected the Trove classifier for Python 3.15.
- Replaced deprecated
ndarray.shape = ...usage withreshape(...)for NumPy 2.5+. - Reworked CI + local build scripts to honor the matrix interpreter for
uv, make format checks fail CI, and resync.venvwhen deps change.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/typeagent/aitools/vectorbase.py |
Avoids NumPy 2.5 deprecation by using reshape() instead of in-place shape assignment. |
pyproject.toml |
Raises dependency floors, adds Python 3.15 Trove classifier, and introduces marker-based pydantic selection for cp315 wheels. |
make.bat |
Makes Windows scripting fail-fast and aligns pyright checks with the Makefile target. |
Makefile |
Adds 3.13/3.15 pyright checks and makes .venv resync when pyproject.toml/uv.lock change. |
.github/workflows/ci.yml |
Fixes matrix correctness for uv, makes format job gating work, updates versions, and adds a build job. |
| - name: Point uv at the matrix interpreter | ||
| shell: bash | ||
| env: | ||
| PYTHON_PATH: ${{ steps.setup-python.outputs.python-path }} | ||
| run: echo "UV_PYTHON=$PYTHON_PATH" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
ignore for now
There was a problem hiding this comment.
But what to do about it? It does look like this will just fail on Windows, doesn't it? And there's no bash shell on Windows.
|
Hi Bernhard, I really wish you wouldn't rely on AI to produce PR descriptions -- they are too long to read and contain way more words than needed to describe what's going on in the PR from a high level (and for more details we have the diff). The copilot reviews are similarly distracting, but maybe they're useful to you -- I will ignore those to save my sanity. In #313 I relaxed the minimum versions of dependencies intentionally so that projects using typeagent as a dependency aren't unnecessarily constrained -- a common reason for unsolveable dependencies is that some dependency A requires a high minimum version of dependency B while another dependency C requires a lower version of dependency B. Please roll back that part of your changes. |
|
I expect we'll need one more PR after this to fully nail the 3.15 story. That'll be nice since that will be PR #315. :-) |
|
More seriously, you've got several test failures with this error: Error: The version '3.15.0rc1' with architecture 'x64' was not found for Ubuntu 24.04. |
I have no Ubuntu 24.04 to test locally. Do you have ? (I could setup in a VM on my machine but it is some work) |
…tch script - implemented feedback from review
Dang, 315 was stolen by dependa bot, grrrr ;-) |
|
all builds are green, feedback has been implemented |
Guido van Rossum (gvanrossum)
left a comment
There was a problem hiding this comment.
Despite the one Windows question I think you can go ahead and merge this! Thanks for taking all my random feedback into account.
PS. You can get an Ubuntu VM for a given PR simply by hitting . in your browser when on that PR's GitHub page. This starts one in codespaces. (There are a bunch more steps to set up but that's basically it. I used the smallest VM on offer, 2 cores 8 MB, and it worked fine.)
| - name: Point uv at the matrix interpreter | ||
| shell: bash | ||
| env: | ||
| PYTHON_PATH: ${{ steps.setup-python.outputs.python-path }} | ||
| run: echo "UV_PYTHON=$PYTHON_PATH" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
But what to do about it? It does look like this will just fail on Windows, doesn't it? And there's no bash shell on Windows.
follow up to #313 and #308
Also replaces the invalid
"Programming Language :: Python :: 3.15.0rc1"classifier with3.15. The rc form is not in PyPI's trove list, sorelease-py.ymlwould have been rejected on upload.ndarray.shapeinVectorBasenumpy 2.5 deprecates in-place shape assignment.
fixed ci.yml and windows/mac/linux makefile drifts.