diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 6fdb5bdbb6b1d..c55452cf27309 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -670,6 +670,8 @@ Otherwise, you need to do it manually: .. code-block:: python + import warnings + def old_func(): """Summary of the function. @@ -679,6 +681,9 @@ Otherwise, you need to do it manually: warnings.warn('Use new_func instead.', FutureWarning, stacklevel=2) new_func() + def new_func(): + pass + You'll also need to 1. write a new test that asserts a warning is issued when calling with the deprecated argument @@ -933,6 +938,8 @@ If your change involves checking that a warning is actually emitted, use .. code-block:: python + df = pd.DataFrame() + with tm.assert_produces_warning(FutureWarning): df.some_operation() @@ -963,7 +970,7 @@ a single test. .. code-block:: python - with warch.catch_warnings(): + with warnings.catch_warnings(): warnings.simplefilter("ignore", FutureWarning) # Or use warnings.filterwarnings(...) diff --git a/setup.cfg b/setup.cfg index cc7393e5a09b9..b9994e9ea0b2c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -73,7 +73,6 @@ exclude = doc/source/comparison_with_sql.rst doc/source/comparison_with_stata.rst doc/source/computation.rst - doc/source/contributing.rst doc/source/contributing_docstring.rst doc/source/dsintro.rst doc/source/enhancingperf.rst