Skip to content

Conversation

hannah-heywa
Copy link
Contributor

@hannah-heywa hannah-heywa commented Jul 24, 2025

Change Summary

Previously it showed up as originating here, but with stacklevel=4 we get it at the site of the issue e.g:

  .venv/lib/python3.13/site-packages/ninja/schema.py:181: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/
    result = super().__new__(cls, name, bases, namespace, **kwargs)

.venv/lib/python3.13/site-packages/ninja/conf.py:8
.venv/lib/python3.13/site-packages/ninja_extra/conf/package_settings.py:63
...

Part of #7908.

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

Previously it showed up as originating here, but with stacklevel=4 we get it at the site of the issue e.g:

```
  .venv/lib/python3.13/site-packages/ninja/schema.py:181: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/
    result = super().__new__(cls, name, bases, namespace, **kwargs)

.venv/lib/python3.13/site-packages/ninja/conf.py:8
.venv/lib/python3.13/site-packages/ninja_extra/conf/package_settings.py:63
...
```
@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Jul 24, 2025
Copy link

codspeed-hq bot commented Jul 24, 2025

CodSpeed Performance Report

Merging #12082 will not alter performance

Comparing hannah-heywa:patch-1 (3d9d40a) with main (ffc0840)

Summary

✅ 46 untouched benchmarks

Copy link
Contributor

Coverage report

Click to see where and how coverage changed

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

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

Copy link
Member

@Viicos Viicos left a comment

Choose a reason for hiding this comment

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

Thanks!

@Viicos Viicos changed the title Increase stacklevel for ConfigDict deprecation warning Add proper stacklevel for class-based config deprecation warning Jul 24, 2025
@Viicos Viicos merged commit de6528b into pydantic:main Jul 24, 2025
108 of 110 checks passed
@Viicos Viicos added relnotes-ignore Omit this PR from the release notes. and removed relnotes-fix Used for bugfixes. labels Jul 24, 2025
@hannah-heywa hannah-heywa deleted the patch-1 branch July 28, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-ignore Omit this PR from the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants