Skip to content

feat: PageSearchClient and PageExtractClient give their PageIndexClient as .documents, and .pageindex still works with a DeprecationWarning - #697

Merged
rejojer merged 2 commits into
mainfrom
feat/product-clients-documents
Nov 24, 2026
Merged

rejojer merged 2 commits into
mainfrom
feat/product-clients-documents

Conversation

@rejojer

@rejojer rejojer commented Nov 24, 2026

Copy link
Copy Markdown
Member

Summary

PageSearchClient and PageExtractClient expose their PageIndexClient as client.documents. Docs now read client.documents.page_image(doc_id, 5) and client.documents.create_collection(...) instead of client.pageindex..., whose name said nothing about what it is for. documents is also what the old pageindex-search / pageindex-extract SDKs called this namespace.

client.pageindex keeps working: it returns the same object and raises a DeprecationWarning saying it will be removed in a future release.

Test plan

  • pytest tests/test_client.py -k "own_older_key or cloud_only": key resolution reads .documents, and .pageindex warns and returns the same object as .documents, for both clients (8 passed)

…nt as .documents, and .pageindex still works with a DeprecationWarning
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T18:56:04.990563Z 0dc78f0 New commits
🔒 Security Review ✅ Completed 2026-11-24T18:57:36.402884Z 0dc78f0 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…mock.patch.object and monkeypatch on it keep working

As a getter-only property, .pageindex raised AttributeError ("no setter" / "no deleter") on assignment, del, mock.patch.object and monkeypatch.setattr, all of which worked while it was a plain attribute. One shared _pageindex_alias() now builds the property for both clients: reading, assigning and deleting each warn and go through .documents. The test patches .pageindex with mock.patch.object and checks the warning points at the caller's line.
@rejojer
rejojer merged commit d6b4a0a into main Nov 24, 2026
10 checks passed
@rejojer
rejojer requested a review from ahonn November 24, 2026 19:53
@rejojer

rejojer commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

@ahonn could you review this? Once it's approved and merged, it can go out in a new PyPI release (push a v* tag). The docs change that uses .documents is VectifyAI/homepage#187, which merges after this release.

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