Repository navigation
Re-export imports in __init__.py files - #501
Merged
Merged
Conversation
Collaborator
|
Thanks |
NishchayMahor
pushed a commit
to NishchayMahor/python-sdk-1
that referenced
this pull request
Sep 22, 2026
…necone-io#498) (pinecone-io#506) pinecone-db#18066 removed the obstacle that made the guided hard break in _internal/index_migration.py necessary: a schema whose fields are exactly _values (dense) and/or _sparse_values (sparse) persists no schema_def, so the stored row is identical to a legacy index. Those two names are reserved names the vectors API already addresses, so translating dimension=1536 no longer means inventing a field name. New module pinecone/_internal/legacy_index_translation.py holds the four pure translations pinecone-io#500 (create) and pinecone-io#501 (configure) will share across the sync and async surfaces: spec_to_deployment(spec) -> dict spec_to_read_capacity(spec) -> dict | None legacy_vector_schema(*, dimension, metric, vector_type) -> dict legacy_pod_scaling(*, replicas, pod_type) -> dict spec_to_read_capacity is separate because 2026-07 carries read capacity at the top level of the request while ServerlessSpec and ByocSpec nest it inside the spec -- the easiest part of the mapping to drop silently. A dict spec is rebuilt as its struct and then translated, so the dict form inherits PodSpec's defaults rather than carrying a second copy of them. The four 9.x validation messages are preserved verbatim, since user code may match on them. IntegratedSpec stays in the rejection path, pointing at create_for_model(). Nothing is wired in yet, so the orphaned-helper gate would flag all five functions. Rather than fold them into ACKNOWLEDGED_ORPHANS (the pinecone-io#479 backlog), tests/unit/test_orphaned_helpers.py grows a PENDING_CONSUMERS set for helpers landed ahead of their caller; its stale-set assertion is what forces these names off it when pinecone-io#500/pinecone-io#501 land. Tests: table tests for every row of pinecone-io#498's translation table, a source-level and a fresh-interpreter purity guard, and a Hypothesis suite pinning the one-reserved-field, enum-equals-its-value, object-equals-dict-form, and encoder-round-trip properties. 100% branch coverage on the new module.
NishchayMahor
pushed a commit
to NishchayMahor/python-sdk-1
that referenced
this pull request
Sep 22, 2026
… names (pinecone-io#499) (pinecone-io#507) * feat(backcompat): pure legacy-to-2026-07 index translation module (pinecone-io#498) pinecone-db#18066 removed the obstacle that made the guided hard break in _internal/index_migration.py necessary: a schema whose fields are exactly _values (dense) and/or _sparse_values (sparse) persists no schema_def, so the stored row is identical to a legacy index. Those two names are reserved names the vectors API already addresses, so translating dimension=1536 no longer means inventing a field name. New module pinecone/_internal/legacy_index_translation.py holds the four pure translations pinecone-io#500 (create) and pinecone-io#501 (configure) will share across the sync and async surfaces: spec_to_deployment(spec) -> dict spec_to_read_capacity(spec) -> dict | None legacy_vector_schema(*, dimension, metric, vector_type) -> dict legacy_pod_scaling(*, replicas, pod_type) -> dict spec_to_read_capacity is separate because 2026-07 carries read capacity at the top level of the request while ServerlessSpec and ByocSpec nest it inside the spec -- the easiest part of the mapping to drop silently. A dict spec is rebuilt as its struct and then translated, so the dict form inherits PodSpec's defaults rather than carrying a second copy of them. The four 9.x validation messages are preserved verbatim, since user code may match on them. IntegratedSpec stays in the rejection path, pointing at create_for_model(). Nothing is wired in yet, so the orphaned-helper gate would flag all five functions. Rather than fold them into ACKNOWLEDGED_ORPHANS (the pinecone-io#479 backlog), tests/unit/test_orphaned_helpers.py grows a PENDING_CONSUMERS set for helpers landed ahead of their caller; its stale-set assertion is what forces these names off it when pinecone-io#500/pinecone-io#501 land. Tests: table tests for every row of pinecone-io#498's translation table, a source-level and a fresh-interpreter purity guard, and a Hypothesis suite pinning the one-reserved-field, enum-equals-its-value, object-equals-dict-form, and encoder-round-trip properties. 100% branch coverage on the new module. * fix(models): stop rejecting reserved underscore-prefixed schema field names (pinecone-io#499) The 2026-07 API now accepts `_`- and `$`-prefixed schema field names (e.g. `_values`, `_sparse_values`) as the backward-compatible way to request a classic vector index, so the SDK's client-side prefix guard was refusing a shape the server accepts. Removed the prefix-rejection branches from validate_schema_field_name() (requests.py) and _validate_field_name() (schema_builder.py), keeping the emptiness and 64-character checks. Added a type check in _validate_schema() so a non-str key in schema["fields"] raises PineconeValueError naming the key and its type instead of surfacing as a confusing encoder error.
NishchayMahor
pushed a commit
to NishchayMahor/python-sdk-1
that referenced
this pull request
Sep 22, 2026
…pinecone-io#501) (pinecone-io#509) * fix(rest,asyncio): restore configure() legacy pod/read-capacity sugar (pinecone-io#501) Indexes.configure() and AsyncIndexes.configure() accept replicas=/pod_type=/ serverless_read_capacity= again as deprecated keyword-only arguments, translated via pinecone/_internal/legacy_index_translation.py's legacy_pod_scaling() into deployment=/read_capacity= instead of raising. embed= and spec= still hard-break: neither has a 2026-07 PATCH-body destination to translate to. * docs: describe configure() legacy kwargs relative to 9.x, not dev history "Restored" implied removed-then-put-back relative to an earlier commit in this unreleased branch, not to any released version. Readers of the 2026-07 docs never experienced that in-between state.
jhamon
added a commit
that referenced
this pull request
Oct 20, 2026
…6-document changes (#782) * docs(migration): add a 10.0-to-10.1 upgrade page and mark 10.1 changes in the V10 guide The page covers each behavior change since v10.0.0 by task, and a unit test runs its snippets in order against respx, checking every quoted error. The V10 guide again describes 10.0.0, with version notes where 10.1.0 differs; its path-parameter section moves to the new page. * docs(models): bound the read-your-writes recipe and note the 10.1 LSN change The ResponseInfo example now gives its search loop a deadline, and a versionchanged note says why the 10.0.0 fetch-polling recipe never exits. A test runs the example both to completion and to its deadline. * docs(documents): state the 96-document cap for indexes that embed a field upsert, batch_upsert and update now name the server's 96-documents-per-request limit for indexes with embed or sparse_embed fields, and batch_upsert no longer calls an oversize batch_size safe on those indexes. * test(docs): drop the db-control 9.x parametrization that collected nothing The section's 9.x-shaped calls became working deprecated sugar in #500/#501, so the selector found no block and the test skipped as [NOTSET]. The guided errors it meant to cover are pinned in client/test_indexes_create.py and its async twin. * no-mistakes(review): Fix 10.0.0 db_data shim note; restore non-URL type-guard list * no-mistakes(ci): The Sphinx docs build failed at its "Check published docs URLs still resolve" step. That step requires every built page to be listed in `docs/published-urls.txt`, and the new 10.0-to-10.1 upgrade page (`migration/v10-1-upgrade.html`) wasn't in the list. I added that one line, in sorted position with the other `migration/` entries. No other new page was missing. Locally, `make -C docs html` built successfully, and `uv run --no-sync python scripts/check_docs_urls.py` passed: "ok: all 236 published URLs still resolve in this build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
My type checker was complaining when I imported anything from
db_control.types.Solution
Add all types meant for re-export to
__all__.Type of Change
Test Plan
N/A