Skip to content

CI: Make uncaught warnings raise as errors #19677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomAugspurger opened this issue Feb 13, 2018 · 0 comments
Closed

CI: Make uncaught warnings raise as errors #19677

TomAugspurger opened this issue Feb 13, 2018 · 0 comments
Labels
CI Continuous Integration
Milestone

Comments

@TomAugspurger
Copy link
Contributor

By adding

filterwarnings =
    error

to our setup.cfg, we can easily make uncaught warnings turn into errors. What are people's thoughts on this? The only downside I see is that contributor's PR will fail due to unrelated changes to a downstream package, but we can quickly fix those.

It seems like uses of

with warnings.catch_warnings(record=True):
   ...

does not work with however pytest is asserting that warnings haven't gotten through. We need to actually use tm.assert_produces_warning or pytest.warns, so it'll be a bit of work to transition.

@TomAugspurger TomAugspurger added the CI Continuous Integration label Feb 13, 2018
@TomAugspurger TomAugspurger modified the milestones: 0.23.0, Next Major Release Feb 13, 2018
@jreback jreback modified the milestones: Contributions Welcome, 0.24.0 Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

No branches or pull requests

2 participants