Skip to content

Support uv requirement upgrade diffs#677

Merged
bmtcril merged 4 commits intomasterfrom
bmtcril/support_uv_diffs
Mar 20, 2026
Merged

Support uv requirement upgrade diffs#677
bmtcril merged 4 commits intomasterfrom
bmtcril/support_uv_diffs

Conversation

@bmtcril
Copy link
Copy Markdown
Contributor

@bmtcril bmtcril commented Mar 18, 2026

When using uv workflows for managing Python requirements the comments on requirement PRs are empty, and the diffs on uv.lock are huge and unreadable. These changes should at least make the comments work again.

Note: Because uv does a better job of managing different versions of Python the output now is a lot more verbose. Previously if we ran a requirements upgrade, it would only pick up the dependency versions for the version of Python we ran the script against. Now if we support multiple Python versions (or specific platforms like Win32) we get a line of text for each. There doesn't seem to be an easy way to consolidate those lines since they can differ along a variety of axes, but I'm open to suggestions.

Example output:

Valid reqs:

- `cachetools - python_full_version == '3.10.*'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `7.0.1` to `7.0.5`
- `cachetools - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `7.0.1` to `7.0.5`
- `charset-normalizer` changes from `3.4.4` to `3.4.5`
- `code-annotations - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `2.3.0` to `2.3.2`
- `code-annotations - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `2.3.0` to `2.3.2`
- `fastcore - python_full_version == '3.10.*'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `1.12.22` to `1.12.24`
- `fastcore - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `1.12.22` to `1.12.24`
- `filelock - python_full_version == '3.10.*'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `3.25.0` to `3.25.2`
- `filelock - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `3.25.0` to `3.25.2`
- `fonttools - python_full_version == '3.10.*'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `4.61.1` to `4.62.0`
- `fonttools - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `4.61.1` to `4.62.0`
- `kiwisolver - python_full_version == '3.10.*'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `1.4.9` to `1.5.0`
- `kiwisolver - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `1.4.9` to `1.5.0`
- `numpy - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `2.4.2` to `2.4.3`
- `numpy - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `2.4.2` to `2.4.3`
- `platformdirs - python_full_version == '3.10.*'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `4.9.2` to `4.9.4`
- `platformdirs - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `4.9.2` to `4.9.4`
- `python-discovery` changes from `1.1.0` to `1.1.3`
- `smmap` changes from `5.0.2` to `5.0.3`
- `tox - python_full_version == '3.10.*'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version == '3.11.*' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version == '3.11.*' and sys_platform == 'emscripten'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version == '3.11.*' and sys_platform == 'win32'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.14' and sys_platform == 'emscripten'` changes from `4.47.0` to `4.49.1`
- `tox - python_full_version >= '3.14' and sys_platform == 'win32'` changes from `4.47.0` to `4.49.1`
- `virtualenv` changes from `21.1.0` to `21.2.0`

Suspicious reqs:

- **[MAJOR]** `pytz` changes from `2025.2` to `2026.1.post1`
- **[NEW]**  `testing123` (`1.0`) added to the requirements
- **[REMOVED]**  `testing321` (`1.0.0`) removed from the requirements
- **[NEW]**  `tomli-w` (`1.2.0`) added to the requirements

Tycho Hob added 4 commits March 17, 2026 16:23
Specifically makes readable diffs for the comments on requirement
upgrade PRs.
The only real change is to update the GitHubHelper.compare_pr_differnce
signature in the existing tests.
@bmtcril bmtcril merged commit 92f6af8 into master Mar 20, 2026
3 checks passed
@bmtcril bmtcril deleted the bmtcril/support_uv_diffs branch March 20, 2026 18:01
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.

2 participants