8000 Scope DeprecationWarning errors to just allennlp-internal stuff by matt-gardner · Pull Request #2549 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Scope DeprecationWarning errors to just allennlp-internal stuff #2549

Merged
merged 1 commit into from
Feb 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions pytest.ini
62AC
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@ filterwarnings =
# how to explicitly test warns
# using `unittest`: https://docs.python.org/3/library/warnings.html#testing-warnings
# using `pytest`: https://docs.pytest.org/en/4.1.0/warnings.html#assertwarnings
# 1. transform all DeprecationWarnings and PendingDeprecationWarning to erros
# when we _directly_ call deprecated methods (including internal methods in AllenNLP)
# 2. unless we explicitly _test_ these warns
error::DeprecationWarning
error::PendingDeprecationWarning
# 3. or _ignore_ them (usually caused by third-party modules)
#
# Those warns are caused by `nbconvert==5.4.0` (details see https://github.com/jupyter/nbconvert/pull/945)
#
ignore:`nbconvert.exporters.exporter_locator` is deprecated.*:DeprecationWarning:nbconvert\.exporters\.exporter_locator
ignore:@asynchronous is deprecated, use coroutines instead::tornado\.web
#
ignore:encoding is deprecated, Use raw=False instead.:PendingDeprecationWarning:msgpack_numpy
# For `spacy==2.0.11`
ignore:Direct calling implementation's unpack.*:PendingDeprecationWarning:msgpack_numpy
ignore:The binary mode of fromstring is deprecated.*:DeprecationWarning:msgpack_numpy
# 4. ignore these `ExperimentalFeatureWarning` for now, but record them once
#
# Our policy here is to ignore (silence) any deprecation warnings from _outside_ allennlp, but to
# treat any _internal_ deprecation warnings as errors. If we get a deprecation warning from things
# we call in another library, we will just rely on seeing those outside of tests. The purpose of
# having these errors here is to make sure that we do not deprecate things lightly in allennlp.
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
error::DeprecationWarning:allennlp.*:
error::PendingDeprecationWarning:allennlp.*:
# For this particular warning, we don't want to cause an error for it, but we also don't want to
# see it a whole bunch of times.
once:This particular transformer implementation is a provisional feature.*::allennlp\.modules\.seq2seq_encoders\.bidirectional_language_model_transformer
0