fix(deps): install the milvus-lite extra on Windows for Python >=3.10 (#3676) - #3767
fix(deps): install the milvus-lite extra on Windows for Python >=3.10 (#3676)#3767Anai-Guo wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Anai-Guo The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
bb5cc7b to
351fc4b
Compare
The milvus_lite extra carries a `sys_platform!='win32'` marker, so `pip install -U "pymilvus[milvus-lite]"` silently installs nothing on Windows even though the docs and README list Windows as supported. That marker was correct when it was written: milvus-lite <3.0 only published macOS and manylinux wheels. Since 3.0 the project ships a single pure-Python `py3-none-any` wheel, which installs and runs on Windows. Add a win32 branch pinned to >=3.0 rather than relaxing the existing marker, because milvus-lite 3.x requires Python >=3.10 while pymilvus still supports 3.9 -- on Windows + 3.9 there is still no installable candidate, and the resolver should say so instead of picking a 2.x wheel that does not exist for that platform. Non-Windows resolution is unchanged. Fixes milvus-io#3676 Signed-off-by: Anai-Guo <antai12232931@outlook.com>
351fc4b to
4d6838b
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
| # milvus-lite <3.0 only published macOS/manylinux wheels, hence the win32 exclusion | ||
| # above. 3.x ships a pure-Python py3-none-any wheel that works on Windows, but it | ||
| # requires Python >=3.10, so 3.9 on Windows still has no installable candidate. | ||
| "milvus-lite>=3.0;sys_platform=='win32' and python_version>='3.10'", |
There was a problem hiding this comment.
pyproject.toml line:84
Medium ---- This new win32 branch is not reflected in the committed uv.lock. At the PR head the lock still records the milvus_lite extra as milvus-lite>=2.4.0; sys_platform != 'win32' and extra == 'milvus-lite' (uv.lock requires-dist, ~line 3559) and keeps milvus-lite 3.0's resolution markers win32-excluded for Python 3.11-3.14 (uv.lock ~lines 2114-2124). Both CI workflows run uv sync --frozen, which uses the lockfile as the source of truth and does not check freshness, so the Windows branch of this extra will never be installed in the repo's own environments, and any uv lock / uv sync --locked run will report drift. The superseded PR #3701 regenerated uv.lock (adding the faiss-cpu win_amd64 wheel) when it changed this extra, and CONTRIBUTING.md documents uv.lock as the locked dependency graph used by uv. Please run uv lock and commit the updated lockfile in this PR.
| # milvus-lite <3.0 only published macOS/manylinux wheels, hence the win32 exclusion | ||
| # above. 3.x ships a pure-Python py3-none-any wheel that works on Windows, but it | ||
| # requires Python >=3.10, so 3.9 on Windows still has no installable candidate. | ||
| "milvus-lite>=3.0;sys_platform=='win32' and python_version>='3.10'", |
There was a problem hiding this comment.
pyproject.toml line:84
Medium ---- tests/integration/lite/test_milvus_lite.py (unchanged by this PR) still hard-skips the whole module on Windows: pytestmark = pytest.mark.skipif(sys.platform.startswith("win"), reason="Milvus Lite is not supported on Windows"). That marker now directly contradicts the behavior this PR enables, so the fix is never exercised by the repo's own CI (the windows-2022 matrix collects then skips the Lite tests), and a future reader trusting the marker will keep believing Windows is unsupported. The issue discussion (#3676) explicitly proposed enabling these tests on a supported Windows/Python combination, and the superseded PR #3701 de-skipped the same file. Please re-gate the skip on python_version < '3.10' instead of the platform (milvus-lite 3.x requires Python >=3.10), and consider adding a CI step that installs .[milvus-lite] on Windows so this metadata fix is actually verified.
…dows Signed-off-by: Anai-Guo <antai12232931@outlook.com>
|
Thanks @yhmo — both points were correct and are fixed in 1d83032. 1. 2. The module-level Windows skip contradicted the fix. Dropped the Verified on real Windows, not by reasoning — this machine is Windows 11 / So the Lite server does start, serve, and answer on Windows under milvus-lite 3.0 — the four tests that CI has been collecting-then-skipping on the (The 🤖 Generated with Claude Code |
4cac705 to
ab92b32
Compare
Summary
Fixes #3676.
pip install -U "pymilvus[milvus-lite]"installs nothing on Windows, silently. The extra carries asys_platform!='win32'marker:so the resolver drops the requirement, exits 0, and the user gets a pymilvus with no local mode — even though the README and docs list Windows as supported. There is no warning, because an extra whose markers all evaluate false is not an error.
Why the marker was right, and why it no longer is
It was correct when written. milvus-lite
<3.0published platform-specific wheels only:No Windows wheel existed, so excluding win32 was the only way to keep the extra resolvable.
Since
3.0the project ships a single pure-Python wheel:py3-none-anyinstalls on Windows. The exclusion is now stale.Why a new marker instead of relaxing the existing one
milvus-lite 3.x declares
requires_python >=3.10, while pymilvus still supports 3.9 (requires-python = '>=3.9'). Simply dropping!='win32'would let the resolver try to satisfymilvus-lite>=2.4.0on Windows + Python 3.9, where no wheel exists for that platform.Adding a separate win32 branch pinned to
>=3.0keeps each environment pointed at a distribution that actually exists:milvus-lite>=3.0milvus-lite>=3.0milvus-lite>=2.4.0(unchanged)milvus-lite>=2.4.0(unchanged)milvus-lite>=2.4.0(unchanged)Generated by evaluating the three requirement markers with
packaging.markers.Marker(...).evaluate(env). Non-Windows resolution is byte-for-byte unchanged.Verification
Milvus Lite was exercised end-to-end on Windows 11 (Python 3.12.10, clean venv), not just installed:
Collection creation, insert, and vector search all succeed, and the
.dbfile is written.Notes
This supersedes #3701, which proposed the same version-aware split and was closed by its author on 2026-08-12 without maintainer objection. I kept the
>=3.10gate for the reason given above and left the existingsetuptools<82pin untouched.🤖 Generated with Claude Code