Conversation
Contributor
|
@hulkbig is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Related Issues
No issue is linked. Independently reproduced on
mainata5432b976f888678b61902a7fb999654a6384ef6.This follows the
Literalsupport added in #12286. The open #12339 handlesAnnotatedmetadata; it does not fix the existing generic-argument and PEP 604 scanners changed here.Proposed Changes:
Type deserialization counts brackets and splits separators before reaching the quote-aware
Literalparser. A bracket inside a string value can therefore be mistaken for type syntax. For example, this public component round trip currently fails:The same problem affects
Literal["]|"], nestedCallableandOptionaltypes, and PEP 604 unions containing these values.deserialize_type()inputsOutputAdapter.to_dict()/from_dict()regressionsThe serialized format and deserialization allowlist are unchanged.
How did you test it?
Locally with Python 3.12.14 and Hatch 1.14.2:
main, the existing type-serialization and OutputAdapter suites passed: 217 passedAlso passed:
hatch run fmt-checkacross the repositoryhatch run test:typesacross all 550 source fileshatch run pre-commit run --filesfor the four changed fileshatch run reno lint .and the release-note backtick checkgit diff --checkThe full unit suite, live integrations, Docker-based license-header CI job, and other Python versions were not run locally. No provider credentials or model downloads were used.
Notes for the reviewer
This PR was fully generated with an AI assistant. AI was used for the investigation, implementation, testing, independent review, and this write-up. The reported checks were run locally. The independent review identified the triple-quoted input compatibility case, which is covered by the added tests.
Checklist
fix:.