Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ Otherwise, you need to do it manually:

.. code-block:: python

import warnings

def old_func():
"""Summary of the function.

Expand All @@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -963,7 +970,7 @@ a single test.

.. code-block:: python

with warch.catch_warnings():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume warnings was meant.
If someone knows better I can change it.

with warnings.catch_warnings():
warnings.simplefilter("ignore", FutureWarning)
# Or use warnings.filterwarnings(...)

Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down