Skip to content

chore: merge main (v0.8.5) into dev/0.9 - #238

Merged
gouyt13 merged 10 commits into
dev/0.9from
sync/main-into-dev-0.9
Nov 14, 2026
Merged

gouyt13 merged 10 commits into
dev/0.9from
sync/main-into-dev-0.9

Conversation

@gouyt13

@gouyt13 gouyt13 commented Nov 14, 2026

Copy link
Copy Markdown
Member

Brings main at v0.8.5 (cf2764f) into dev/0.9: the 0.9 names with deprecation warnings for the 0.8 spellings (#235, #236) and the 0.8.5 release preparation (#237). It goes through a pull request because pushes to dev/0.9 run no CI.

Merge this with a merge commit, not a squash, so dev/0.9 records main as merged.

Conflicts

Six files conflicted. Each resolution keeps both sides.

  • docs/docs/index/hnsw.md, ivf.md, qg.md: the cosine metric and the -1 missing-result ID from dev/0.9; capacity, routing, ef_search and their deprecation notes from main.
  • python_bindings/__init__.py: the FormatError import from dev/0.9 in the import layout of main.
  • python_bindings/__init__.pyi: cosine in the metric lists, routing in place of initializer.
  • tests/python/typing/public_api.py: routing= together with the cosine metric type.

Changes git could not make

The two sides did not touch the same lines here, so there was no conflict to see.

  • The five deprecated search overloads that main added to the stubs returned uint32 IDs; on dev/0.9 every search returns int64. They now return int64, and a new typing fixture checks it (it fails if one overload is changed back).
  • The migration guide said "three changes come without a warning in 0.9". On this branch that count is wrong: IDs become int64, a missing result becomes -1, and save writes format 2. The sentence is narrowed and a paragraph points to the 0.9 notes.

Checks

On Linux x86-64, Xeon Gold 6418H, GCC 14.3, CPython 3.13.15, against a wheel built from the merged tree:

  • Python suite with the mypy and Pyright tests: 1226 passed, 18 skipped (16 need the C++ example targets, 2 are wheel tests for other platforms).
  • test_compat_09.py, test_train_api.py, test_symqg_api.py and test_examples.py under -W error::DeprecationWarning: 183 passed.
  • check-python.sh, mkdocs build --strict and git diff --check pass.
  • An independent audit compared the result with both parents and found no wrong resolution; the two changes above are from it and from this merge's own review. It also exercised what neither branch tests alone: the 0.9 names with int64 IDs and -1 padding, with the cosine metric, and after a format-2 save and load.
  • No C++ check was run locally. The merge changes one line under src, include, tests/unit, tests/consumer and CMakeLists.txt: the project version, 0.8.4 to 0.8.5.

Known and left alone

  • Format-2 files written from this branch now record writer version 0.8.5, a release that cannot read format 2. The field is used in error messages only, and the tests compare it with the build's version.
  • quick_start.md and installation.md say they describe 0.8.5 while the branch describes 0.9 behaviour; they said 0.8.4 before. Both change with the 0.9 version bump.
  • On an index loaded read-only from a newer format-2 file, reserve_cluster and reserve report the C++ operation names reserve and resize.
  • docs/docs/index/ivf.md says add() returns a uint32 array. That sentence was already on dev/0.9.

Code PRs must be built and tested locally, including changes produced with
automated tools, and contributors must respond to review. Claims on code
issues state how the change will be verified; unanswered review feedback
can lead to unassignment.
0.9 gives the three index classes one name for each concept (#232). This
release accepts both spellings and raises a DeprecationWarning, at the
caller's line, for the 0.8 one:

- HnswIndex.capacity and reserve(num_points) for max_elements and resize;
  max_elements is deprecated on IvfIndex and SymqgIndex.
- IvfIndex.reserve_cluster for reserve.
- IvfIndex(routing=...) and the routing property for initializer.
- search(queries, k, ef_search=...) for ef= on HnswIndex and SymqgIndex.
- Search options after the breadth are keyword-only; positions warn.
- nprobe=0 and ef_search=0 for the default warn; None selects it.
- HnswIndex seeds above 2**32 - 1 warn.

The extension keeps the 0.8 names, so the new ones are added in the Python
layer, which 0.9 deletes when the extension itself is renamed. No 0.8 call
changes its result or its exception type. The HnswIndex default seed and
repr() are unchanged here; the 0.9 changes to them are announced in the new
0.8.5 release notes page, which also records #231.
A property assigned to a class after its creation does not get
__set_name__, and before Python 3.13 it then reports errors without its
name: assigning to the read-only routing property raised "property of
'IvfIndex' object has no setter". CI's wheel tests on CPython 3.11 caught
this through test_new_members_are_named_after_their_class; the local
environment is 3.13, where the name falls back to the getter's name.

Call __set_name__ when adding the properties, so every supported Python
names them.
feat(python): accept the 0.9 names and deprecate the 0.8 spellings
…lings

0.9 names the k-means parameters like the index parameters (#233). This
release accepts both spellings and raises a DeprecationWarning, at the
caller's line, for the 0.8 one:

- QGKMeans and QGKMeansParameters take nbits (32, 4 or 8), max_degree and
  ef_construction for quantization_bits (0, 4 or 8), graph_degree and
  ef_build, as keywords and as attributes of cp.
- final_assignment takes 'approximate' or 'exact', also on the cp of
  IvfIndex and HnswIndex. FinalAssignmentMode members are still accepted,
  and the attribute still reads back as a member until 0.9.
- KMeansIterationStats is the one name of the statistics class.
  FinalAssignmentMode, QGKMeansIterationStats and
  RaBitQKMeansIterationStats warn when imported or read from the package,
  through a module-level __getattr__.

The extension keeps the 0.8 names; the new ones live in the Python layer,
which 0.9 deletes when the extension is renamed. No 0.8 call changes its
result, its exception type or its error message. The statistics class now
reports its name as KMeansIterationStats.
feat(python): accept the 0.9 k-means names and deprecate the 0.8 spellings
Bump the version to 0.8.5 in pyproject.toml and CMakeLists.txt, and update
the install pins, clone commands and version text in the README, home
page, installation, quick start and C++ integration pages.

Turn docs/docs/releases/0.8.5.md into the release page: drop
"(unreleased)" from the title and the navigation, add the Upgrading
section, and correct three statements (search options become keyword-only
in 0.9, not now; set_centroids used every CPU for every routing type
before #231; the stubs cannot mark the deprecations that depend on a value
or the two old statistics names).

The Python samples need 0.8.5 since #235 and #236, so their README asks
for it. README news gains v0.8.5 and keeps the three most recent entries.
main is at v0.8.5 (cf2764f): the 0.9 names with deprecation warnings for
the 0.8 spellings (#235, #236) and the 0.8.5 release preparation (#237).

Conflicts, resolved by keeping both sides:
- docs/docs/index/{hnsw,ivf,qg}.md: the cosine metric and the -1
  missing-result ID from dev/0.9, the new names from main.
- python_bindings/__init__.py: the FormatError import from dev/0.9 in
  main's import layout.
- python_bindings/__init__.pyi: cosine in the metric lists, routing for
  initializer.
- tests/python/typing/public_api.py: routing= with the cosine metric type.

Changes git could not make, because the two sides did not touch the same
lines:
- The deprecated search overloads from main return int64 IDs, as every
  search does on dev/0.9; a typing fixture checks it.
- The migration guide said three changes come without a warning in 0.9;
  with int64 IDs, the -1 marker and format 2 that count was wrong.
@github-actions github-actions Bot added the release:maintenance Release category managed from the PR title label Nov 14, 2026
@gouyt13
gouyt13 merged commit df00663 into dev/0.9 Nov 14, 2026
35 checks passed
@gouyt13
gouyt13 deleted the sync/main-into-dev-0.9 branch November 14, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:maintenance Release category managed from the PR title

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant