Skip to content

Commit e2960b6

Browse files
committed
Add implementation details to PDEP-17
1 parent 638ca5b commit e2960b6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ All warnings for upcoming changes in pandas will have the base class :class:`pan
3232

3333
- :class:`pandas.errors.Pandas4Warning`: Warnings which will be enforced in pandas 4.0.
3434
- :class:`pandas.errors.Pandas4Warning`: Warnings which will be enforced in pandas 5.0.
35-
- :class:`pandas.errors.PandasPendingDeprecationWarning`: Warnings which will emit a ``PendingDeprecationWarning``, independent of the version they will be enforced.
36-
- :class:`pandas.errors.PandasDeprecationWarning`: Warnings which will emit a ``DeprecationWarning``, independent of the version they will be enforced.
37-
- :class:`pandas.errors.PandasFutureWarning`: Warnings which will emit a ``PandasFutureWarning``, independent of the version they will be enforced.
35+
- :class:`pandas.errors.PandasPendingDeprecationWarning`: Base class of all warnings which emit a ``PendingDeprecationWarning``, independent of the version they will be enforced.
36+
- :class:`pandas.errors.PandasDeprecationWarning`: Base class of all warnings which emit a ``DeprecationWarning``, independent of the version they will be enforced.
37+
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``PandasFutureWarning``, independent of the version they will be enforced.
3838

3939
.. _whatsnew_300.enhancements.other:
4040

web/pandas/pdeps/0017-backwards-compatibility-and-deprecation-policy.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ Additionally, when one introduces a deprecation, they should:
5858

5959
### Which warning class to use
6060

61-
Deprecations should initially use ``DeprecationWarning``, and then be switched to ``FutureWarning`` for broader visibility in the last minor release before the major release they are planned to be removed in.
62-
This implementation detail can be ignored by using the appropriate ``PandasDeprecationWarning`` variable, which will be aliased to the proper warning class based on the pandas version.
61+
Starting in pandas 3.0, pandas will provide version-specific warnings. For example, ``Pandas4Warnings`` for all deprecation warnings that will be enforced in pandas 4.0. In addition to these, pandas exposes four additional classes to give users more control over pandas deprecation warnings.
62+
63+
- :class:`pandas.errors.PandasChangeWarning`: Base class of all pandas deprecation warnings.
64+
- :class:`pandas.errors.PandasPendingDeprecationWarning`: Base class of all warnings which emit a ``PendingDeprecationWarning``, independent of the version they will be enforced.
65+
- :class:`pandas.errors.PandasDeprecationWarning`: Base class of all warnings which emit a ``DeprecationWarning``, independent of the version they will be enforced.
66+
- :class:`pandas.errors.PandasFutureWarning`: Base class of all warnings which emit a ``PandasFutureWarning``, independent of the version they will be enforced.
6367

6468
### Enforcement of deprecations
6569

0 commit comments

Comments
 (0)