python: accept free-form custom extension vendors - #172
Merged
khush-bhatia merged 1 commit intoJul 14, 2026
Conversation
Contributor
|
@onkardahale Because of the rename, there are some merge conflicts, could you please resolve that. |
Custom extension vendor names are free-form strings in the current OSI specification and JSON schema. The Python model still typed OSICustomExtension.vendor_name as OSIVendor, which rejects schema-valid documents using a vendor name outside the built-in well-known list. Change vendor_name to str so the Python package accepts any spec-valid custom extension vendor name. Keep OSIVendor available as well-known constants for existing callers. Update the converter guide to stop telling contributors to add new vendors to a core enum. Signed-off-by: Onkar Dahale <dahaleonkar@gmail.com>
onkardahale
force-pushed
the
python-custom-extension-vendors
branch
from
July 14, 2026 01:01
4b86b11 to
77553b3
Compare
Contributor
Author
|
@khush-bhatia Fixed it. Merge looks clean now |
jbonofre
self-requested a review
July 14, 2026 18:40
khush-bhatia
approved these changes
Jul 14, 2026
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.
Custom extension vendor names are free-form strings in the current spec and JSON schema, but the Python package still types OSICustomExtension.vendor_name as the OSIVendor enum. A document that is valid against osi-schema.json, e.g. a custom extension with vendor_name: ACME, is rejected by the Python model.
#91 relaxed vendor_name to a free-form string in the spec and schema but did not update the Python package, so the package is now stricter than the spec it implements.
Change vendor_name to str. OSIVendor stays as well-known constants, and since it is a str enum, comparisons like vendor_name == "DBT" still work. Also fix the converter guide, which still tells contributors to add new vendors to a core enum.
Does not touch root dialects/vendors (#148 covers that). Verified locally that the old model rejects vendor_name: ACME and the new one accepts and round-trips it.