Skip to content

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Oct 8, 2024

Change Summary

Also fixed in #10530 but in a separate PR for a cleaner commit history.

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

@Viicos Viicos changed the title Do not use the previous config from the stack for dataclasses without… Do not use the previous config from the stack for dataclasses without config Oct 8, 2024
@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Oct 8, 2024
Copy link

cloudflare-workers-and-pages bot commented Oct 8, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: db5e36c
Status: ✅  Deploy successful!
Preview URL: https://f5fda88c.pydantic-docs.pages.dev
Branch Preview URL: https://dataclass-config-bug.pydantic-docs.pages.dev

View logs

Copy link

codspeed-hq bot commented Oct 8, 2024

CodSpeed Performance Report

Merging #10576 will not alter performance

Comparing dataclass-config-bug (db5e36c) with main (bb7bd96)

Summary

✅ 38 untouched benchmarks

Copy link
Contributor

@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.

Good find, thanks!

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Coverage report

This PR does not seem to contain any modification to coverable code.

@sydney-runkle
Copy link
Contributor

Maybe we add a test demonstrating that this is not allowed?

@dataclasses.dataclass
class DC:
    a: ArbitraryType
    b: str

class Model(BaseModel):
    model_config = ConfigDict(arbitrary_types_allowed=True)

    dc: DC
    other: str

@Viicos Viicos enabled auto-merge (squash) October 8, 2024 15:26
@Viicos Viicos force-pushed the dataclass-config-bug branch from 8583919 to db5e36c Compare October 8, 2024 15:27
@Viicos Viicos merged commit ce91077 into main Oct 8, 2024
62 checks passed
@Viicos Viicos deleted the dataclass-config-bug branch October 8, 2024 15:47
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.

2 participants