Skip to content

Use correct types namespace when building namedtuple core schemas - #10337

Merged
sydney-runkle merged 2 commits into
mainfrom
10336
Sep 6, 2024
Merged

sydney-runkle merged 2 commits into
mainfrom
10336

Conversation

@Viicos

@Viicos Viicos commented Sep 6, 2024 •

Copy link
Copy Markdown
Member

Change Summary

Fixes #10336

Regression introduced in #10063

See diff without whitespaces

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

@github-actions github-actions Bot added the relnotes-fix Used for bugfixes. label Sep 6, 2024
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2024 •

Copy link
Copy Markdown

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 61ef3dd
Status: ✅  Deploy successful!
Preview URL: https://801cbc02.pydantic-docs.pages.dev
Branch Preview URL: https://10336.pydantic-docs.pages.dev

View logs

@codspeed

codspeed Bot commented Sep 6, 2024 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #10337 will not alter performance

Comparing 10336 (61ef3dd) with main (97d357f)

Summary

✅ 50 untouched benchmarks

@sydney-runkle sydney-runkle left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great find @Viicos. Do we need to make any changed to typed dicts (I see we also changed that schema gen func in the original PR)

Feel free to remove that benchmark for now (let's comment it out), it's too flaky to be valuable at this point.

@github-actions

github-actions Bot commented Sep 6, 2024

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic/_internal
  _generate_schema.py
Project Total  

This report was generated by python-coverage-comment-action

@Viicos

Viicos commented Sep 6, 2024

Copy link
Copy Markdown
Member Author

Do we need to make any changed to typed dicts

The types namespace stack is updated for typeddicts but wasn't for namedtuples, so this only affected the latter.

@Viicos

Viicos commented Sep 6, 2024

Copy link
Copy Markdown
Member Author

Feel free to remove that benchmark for now (let's comment it out), it's too flaky to be valuable at this point.

I have a pending PR that I'll finish this afternoon to tackle this

@sydney-runkle

Copy link
Copy Markdown
Contributor

Sounds good. Also, could you please add a test before we merge?

@sydney-runkle sydney-runkle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes-fix Used for bugfixes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong class namespace used when evaluating annotations of a NamedTuple

2 participants