Skip to content

Continue on python 3.15 integration: Update dependencies, and fix CI matrix, format gate and venv, fix makefile drift - #314

Open
Bernhard Merkle (bmerkle) wants to merge 6 commits into
microsoft:mainfrom
bmerkle:update-deps-and-fix-ci
Open

Continue on python 3.15 integration: Update dependencies, and fix CI matrix, format gate and venv, fix makefile drift#314
Bernhard Merkle (bmerkle) wants to merge 6 commits into
microsoft:mainfrom
bmerkle:update-deps-and-fix-ci

Conversation

@bmerkle

@bmerkle Bernhard Merkle (bmerkle) commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

follow up to #313 and #308

  1. Update dependencies to latest and fix the 3.15 classifier

Also replaces the invalid "Programming Language :: Python :: 3.15.0rc1" classifier with 3.15. The rc form is not in PyPI's trove list, so release-py.yml would have been rejected on upload.

  1. Stop assigning to ndarray.shape in VectorBase

numpy 2.5 deprecates in-place shape assignment.

  1. Make the CI python-version matrix and format gate actually work

fixed ci.yml and windows/mac/linux makefile drifts.

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.
@bmerkle
Bernhard Merkle (bmerkle) marked this pull request as ready for review August 6, 2026 23:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with reshape(...) for NumPy 2.5+.
  • Reworked CI + local build scripts to honor the matrix interpreter for uv, make format checks fail CI, and resync .venv when 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.

Comment thread Makefile Outdated
Comment thread make.bat Outdated
Comment thread make.bat Outdated
Comment thread .github/workflows/ci.yml
Comment on lines +82 to +86
- 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"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore for now

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gvanrossum

Copy link
Copy Markdown
Collaborator

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.

Comment thread Makefile
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread src/typeagent/aitools/vectorbase.py
@gvanrossum

Copy link
Copy Markdown
Collaborator

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. :-)

@gvanrossum

Copy link
Copy Markdown
Collaborator

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.

@bmerkle

Copy link
Copy Markdown
Collaborator Author

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)

@bmerkle

Copy link
Copy Markdown
Collaborator Author

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. :-)

Dang, 315 was stolen by dependa bot, grrrr ;-)

@bmerkle

Copy link
Copy Markdown
Collaborator Author

all builds are green, feedback has been implemented
cut the PR description down from the agentic blurb to the essential part (and I will do this in future).

@bmerkle Bernhard Merkle (bmerkle) changed the title Update dependencies to latest, and fix CI matrix, format gate and venv staleness Continue on python 3.15 integration: Update dependencies, and fix CI matrix, format gate and venv, fix makefile drift Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Comment thread .github/workflows/ci.yml
Comment on lines +82 to +86
- 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"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants