PageIndex/pageindex/utils.py
Ray c8aa83ac85 fix: address xhigh review findings for PR #272
- cloud: _get_folder_id raises CollectionNotFoundError when the folder is
  gone instead of silently falling back to the account-wide space; delete
  stays idempotent
- cloud: CloudBackend honors a base_url override (PageIndexClient.BASE_URL
  previously only reached the legacy API)
- cloud: query_stream runs doc-id listing and thread join off the event
  loop (asyncio.to_thread)
- cloud_api: non-streaming chat_completions gets a 300s read timeout
- local: unexplained IntegrityError is wrapped as CollectionNotFoundError/
  IndexingError instead of leaking raw sqlite3 errors
- index: check_title_appearance rejects below-range physical_index instead
  of wrapping to the last page; page_index_main coerces legacy 'yes'/'no'
  string flags
- config: correct max_concurrency doc and warn when a per-index value
  exceeds the process ceiling
- compat: restore pageindex.utils config alias; add legacy names back to
  __all__
2026-07-16 01:31:57 +08:00

17 lines
749 B
Python

# pageindex/utils.py
# Deprecation shim. The indexing utilities now live in pageindex/index/utils.py,
# which is the single source of truth. This module re-exports them so legacy
# imports (`from pageindex.utils import ...`) keep working.
import warnings
warnings.warn(
"pageindex.utils has moved to pageindex.index.utils; importing it from the "
"top level is deprecated and will be removed in a future release.",
PendingDeprecationWarning,
stacklevel=2,
)
from .index.utils import * # noqa: F401,F403,E402
# Legacy 0.2.x alias. index.utils keeps it private (_config) so its star-export
# can't shadow the pageindex.config submodule; re-expose it only in this shim.
from types import SimpleNamespace as config # noqa: E402,F401