Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make generic TypeAliasType specifications produce different schema definitions #7893

Merged
merged 7 commits into from Oct 26, 2023
Merged

Make generic TypeAliasType specifications produce different schema definitions #7893

merged 7 commits into from Oct 26, 2023

Conversation

alexdrydew
Copy link
Contributor

@alexdrydew alexdrydew commented Oct 21, 2023

Change Summary

This PR fixes #7840: now different specifications of a generic TypeAliasType produce different definitions in pydantic schema which prevents "overwrites" of other specifications with the same origin.

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @sydney-runkle

@alexdrydew alexdrydew marked this pull request as ready for review October 21, 2023 15:13
@alexdrydew
Copy link
Contributor Author

please review

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

LGTM overall, left a few nit picky change requests.

Thanks for the contribution ⭐!!

pydantic/_internal/_core_utils.py Outdated Show resolved Hide resolved
pydantic/_internal/_core_utils.py Outdated Show resolved Hide resolved
pydantic/_internal/_generate_schema.py Outdated Show resolved Hide resolved
Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

@alexdrydew,

Thanks for the contribution 🌟 ! Looks great.

@sydney-runkle sydney-runkle enabled auto-merge (squash) October 26, 2023 19:09
@sydney-runkle sydney-runkle merged commit ebecf91 into pydantic:main Oct 26, 2023
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PEP 695 generic type alias does not work
4 participants