Skip to content

Commit 0c0c26a

Browse files
committed
Apply review changes
1 parent 5e127a4 commit 0c0c26a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/source/whatsnew/v2.0.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ Deprecations
854854
- Deprecated :meth:`Series.backfill` in favor of :meth:`Series.bfill` (:issue:`33396`)
855855
- Deprecated :meth:`DataFrame.pad` in favor of :meth:`DataFrame.ffill` (:issue:`33396`)
856856
- Deprecated :meth:`DataFrame.backfill` in favor of :meth:`DataFrame.bfill` (:issue:`33396`)
857+
- Deprecated :meth:`~pandas.io.stata.StataReader.close`. Use :class:`~pandas.io.stata.StataReader` as a context manager instead (:issue:`49228`)
857858

858859
.. ---------------------------------------------------------------------------
859860
.. _whatsnew_200.prior_deprecations:

pandas/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ def close(self) -> None:
12331233
"will be removed in a future version without notice. "
12341234
"Using StataReader as a context manager is the only supported method.",
12351235
FutureWarning,
1236-
stacklevel=2,
1236+
stacklevel=find_stack_level(),
12371237
)
12381238
if self._close_file:
12391239
self._close_file()

0 commit comments

Comments
 (0)