Skip to content

[SYNPY-1930] Deprecate schema registry functions - #1467

Merged
andrewelamb merged 2 commits into
developfrom
deprecate_schema_registry
Oct 23, 2026
Merged

andrewelamb merged 2 commits into
developfrom
deprecate_schema_registry

Conversation

@andrewelamb

@andrewelamb andrewelamb commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem:

  • The functions in synapseclient/extensions/curator/schema_registry.py find JSON schema URIs by a SQL query on a schema registry table (syn69735275). The public functions are:
    • query_schema_registry
    • get_latest_schema_uri
  • The Organization and JSONSchema models in synapseclient.models now let users find JSON schemas and their versions directly through the Synapse JSON schema API. Users do not need to keep a separate registry table up to date.
  • We must tell users to move to the new APIs before we remove the registry functions.

Solution:

  • Added the @deprecated decorator (from the deprecated package, as in models/organization.py) to query_schema_registry and get_latest_schema_uri:
    • version="4.15.0"
    • Reason: "To be removed in 5.0.0. Use the Organization and JSONSchema models from synapseclient.models to find JSON schemas instead."
  • Added a deprecation note to each docstring. The note links to Organization and JSONSchema, and has an example that uses Organization.get_json_schemas() and JSONSchema.get_versions().
  • The function behavior does not change. Callers only get a DeprecationWarning.
  • Notes:
    • SchemaRegistryColumnConfig is not deprecated, because it is a dataclass, not a function. It is used only by the deprecated functions.
    • get_latest_schema_uri calls query_schema_registry, so one call shows two deprecation warnings.
    • docs/guides/extensions/curator/metadata_curation.md and synapseclient/extensions/curator/readme.md still show query_schema_registry. We can update them in a different PR.

@andrewelamb
andrewelamb requested a review from a team as a code owner October 5, 2026 19:36
@andrewelamb andrewelamb changed the title deprecate schema registry functions Deprecate schema registry functions Oct 5, 2026

@thomasyu888 thomasyu888 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still make sure the function works even if it's plan is to be deprecated: https://sagebionetworks.slack.com/archives/C02M7QR8D46/p1791230490708289?thread_ts=1791225742.847109&cid=C02M7QR8D46

Perhaps it's a python 3.14 thing for our users but it would be good to diagnose.

@thomasyu888 thomasyu888 changed the title Deprecate schema registry functions [SYNPY-1930] Deprecate schema registry functions Oct 12, 2026
@andrewelamb

Copy link
Copy Markdown
Contributor Author

@thomasyu888 There's a separate issue for doing the actual fix: https://sagebionetworks.jira.com/browse/SYNPY-1931

@thomasyu888 thomasyu888 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 LGTM!

@andrewelamb
andrewelamb merged commit b67b48a into develop Oct 23, 2026
27 of 41 checks passed
@andrewelamb
andrewelamb deleted the deprecate_schema_registry branch October 23, 2026 14:58
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.

2 participants