8000 Add class name to "has conflict" warnings by msabramo · Pull Request #9964 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@msabramo
Copy link
Contributor
@msabramo msabramo commented Jul 24, 2024

Change Summary

Make it easier to identify which class has the conflict when multiple classes are involved.

Before:

.../site-packages/pydantic/_internal/_fields.py:160:
UserWarning: Field "model_max_budget"
has conflict with protected namespace "model_".

After:

.../site-packages/pydantic/_internal/_fields.py:160:
UserWarning: Field "model_max_budget" in LiteLLM_BudgetTable
has conflict with protected namespace "model_".

Related issue number

#9962

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 Jul 24, 2024
To fix pydantic#9962

This makes it easier to identify which class has the conflict when multiple
classes are involved.

Before:

```
.../site-packages/pydantic/_internal/_fields.py:160:
UserWarning: Field "model_max_budget"
has conflict with protected namespace "model_".
```

After:

```
.../site-packages/pydantic/_internal/_fields.py:160:
UserWarning: Field "model_max_budget" in LiteLLM_BudgetTable
has conflict with protected namespace "model_".
```
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.

Nice!

@msabramo msabramo force-pushed the add-class-name-to-field-warnings branch from ede3733 to 249faf9 Compare July 24, 2024 19:04
@sydney-runkle
Copy link
Contributor

Pending linting fixes @msabramo, happy to merge this. Thanks for your contribution :)

@codspeed-hq
Copy link
codspeed-hq bot commented Jul 24, 2024

CodSpeed Performance Report

Merging #9964 will not alter performance

Comparing msabramo:add-class-name-to-field-warnings (249faf9) with main (630cc56)

Summary

✅ 14 untouched benchmarks

@sydney-runkle sydney-runkle merged commit f3dc053 into pydantic:main Jul 24, 2024
@msabramo msabramo deleted the add-class-name-to-field-warnings branch July 24, 2024 19:18
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

0