Skip to content

DO NOT MERGE - WIP - python: remove pinning for windows version - #1205

Closed
reyammer wants to merge 11 commits into
mainfrom
py-test-no-pinning
Closed

reyammer wants to merge 11 commits into
mainfrom
py-test-no-pinning

Conversation

@reyammer

@reyammer reyammer commented Oct 29, 2025 •

Copy link
Copy Markdown
Collaborator

At some point we added pinning for windows for onnxruntime (see #1099).

Now I'm trying to check whether we could avoid that, by using what's suggested at astral-sh/uv#9425 (comment).

Update: upon further inspection, the reason we had the onnxruntime pin for windows was not to "guide" uv, but to make sure that, on windows, we pick a version of onnxruntime that is old enough to not require the new VC++ requirement. So, the workaround mentioned in the uv's issue does not seem to be related to this problem. We'll keep the pinning for now.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request removes the version pinning for onnxruntime on Windows, which is a good step to simplify dependencies if testing confirms it's stable. I've added one suggestion to refactor the remaining onnxruntime dependency specifiers for better readability. Also, once this change is validated and ready for merging, please remember to update the CHANGELOG.md to reflect the removal of this pinning.

Comment thread python/pyproject.toml
Comment on lines 38 to 39
"onnxruntime>=1.17.0 ; python_version > '3.9'",
"onnxruntime>=1.17.0, <1.20.0 ; python_version <= '3.9'",

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.

medium

For better readability and to reduce redundancy, you can simplify the onnxruntime dependency specifications. You can declare the base requirement for all versions and then add the conditional upper bound for older Python versions on a separate line. This makes the dependency logic easier to follow.

Suggested change
"onnxruntime>=1.17.0 ; python_version > '3.9'",
"onnxruntime>=1.17.0, <1.20.0 ; python_version <= '3.9'",
"onnxruntime>=1.17.0",
"onnxruntime<1.20.0 ; python_version <= '3.9'",

- add pre-release-checks, gated by release tags
- run package checks on the actual artifacts (i.e., the packages), and not just from the source of the repo.
- add stub for actual release
- simplify "uv add magika" linux vs. windows, using shell: bash
- make uv version easily updatable
In GH actions, the "path" filter is not used for tags push. This means that any tag push would trigger this gh action, even if the push has nothing to do with it.

Fixed by triggering only for branch pushes to main (note: the branch filter is used for tags as well), and for any PR that relates to this.
…ot needed

if we don't do that, the build-wheels and other jobs will not run as the pre-release-checks is a dependency.
@reyammer
reyammer requested a review from invernizzi as a code owner October 29, 2025 14:18
@reyammer reyammer closed this Oct 29, 2025
@reyammer
reyammer deleted the py-test-no-pinning branch October 29, 2025 14:38
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.

1 participant