Skip to content

Treat some warnings as errors in CI#2258

Open
tim-schilling wants to merge 2 commits intomainfrom
warnings-as-errors
Open

Treat some warnings as errors in CI#2258
tim-schilling wants to merge 2 commits intomainfrom
warnings-as-errors

Conversation

@tim-schilling
Copy link
Copy Markdown
Member

Description

Explicitly ignores the RedirectPanel's deprecation warning.

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

@tim-schilling tim-schilling changed the title Treat all warnings as errors. Use default PYTHONWARNINGS setting Nov 19, 2025
@github-actions
Copy link
Copy Markdown

Coverage report

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

Copy link
Copy Markdown
Member

@matthiask matthiask left a comment

Choose a reason for hiding this comment

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

I have to admit I'm confused. -W error would make warnings errors. -W always just makes us show warnings each time they are encountered, not just once per call location.

The tox.ini change makes us not show warnings all the time anymore, and additionally also ignores the redirects panel warning... I think that's fine, since using a warnings eating context manager is hard here.

However, the changelog entry doesn't seem to match what we're doing here?

@tim-schilling
Copy link
Copy Markdown
Member Author

tim-schilling commented Nov 23, 2025

I forgot to update the changelog after I switched away from error. I'm going to change this though to follow what Adam does with django-mysql then ignore our specific warning.

      -W error::ResourceWarning \
      -W error::DeprecationWarning \
      -W error::PendingDeprecationWarning \

@tim-schilling tim-schilling changed the title Use default PYTHONWARNINGS setting Treat some warnings as errors in CI Dec 3, 2025
This also skips the RedirectsPanel's deprecation warning from raising errors.
Copy link
Copy Markdown
Member

@matthiask matthiask left a comment

Choose a reason for hiding this comment

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

Makes sense! Obviously we still have some problems to fix or to ignore if we want to merge this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants