Handle deprecation warnings from all sources consistently in Python#796
Merged
bryanwweber merged 2 commits intoCantera:masterfrom Feb 12, 2020
Merged
Handle deprecation warnings from all sources consistently in Python#796bryanwweber merged 2 commits intoCantera:masterfrom
bryanwweber merged 2 commits intoCantera:masterfrom
Conversation
Since deprecation warnings issued from C++ and from Cython code are shown by default, set deprecation warnings issued from Python code to do the same. Also, modify handling of Cython- and Python- issued deprecation warnings when calling the make_deprecation_warnings_fatal and suppress_deprecation_warnings functions.
Since tests like test_composite.TestModels.test_load_thermo_models rely on deprecation warnings being fatal, we need to make sure that this setting is always enabled. Previously, running the tests using "python -m unittest" instead of the runCythonTests.py script did not do this. Fixes Cantera#802
53d5801 to
f99ae3c
Compare
Codecov Report
@@ Coverage Diff @@
## master #796 +/- ##
=======================================
Coverage 71.54% 71.54%
=======================================
Files 372 372
Lines 44348 44348
=======================================
Hits 31730 31730
Misses 12618 12618 Continue to review full report at Codecov.
|
4 tasks
bryanwweber
approved these changes
Feb 12, 2020
speth
added a commit
to speth/cantera
that referenced
this pull request
Feb 12, 2020
speth
added a commit
to speth/cantera
that referenced
this pull request
Feb 12, 2020
ischoegl
pushed a commit
to ischoegl/cantera
that referenced
this pull request
Feb 12, 2020
speth
added a commit
that referenced
this pull request
Feb 13, 2020
srikanthallu
pushed a commit
to srikanthallu/cantera
that referenced
this pull request
Sep 17, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
scons build&scons test) and unit tests address code coverageIf applicable, fill in the issue number this pull request is fixing
Fixes #791
Changes proposed in this pull request
Since deprecation warnings issued from C++ and from Cython code are shown by default, set deprecation warnings issued from Python code to do the same.
Also, modify handling of Cython- and Python- issued deprecation warnings when calling the
make_deprecation_warnings_fatalandsuppress_deprecation_warningsfunctions.