Skip to content

Commit 669973a

Browse files
authored
DEPR: provide deprecations and exposure for NaTType (#16146)
xref #16137
1 parent 5a04376 commit 669973a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.20.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ these are now the public subpackages.
12461246

12471247

12481248
- The function :func:`~pandas.api.types.union_categoricals` is now importable from ``pandas.api.types``, formerly from ``pandas.types.concat`` (:issue:`15998`)
1249-
1249+
- The type import ``pandas.tslib.NaTType`` is deprecated and can be replaced by using ``type(pandas.NaT)`` (:issue:`16146`)
12501250

12511251
.. _whatsnew_0200.privacy.errors:
12521252

pandas/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
moved={'Timestamp': 'pandas.Timestamp',
7878
'Timedelta': 'pandas.Timedelta',
7979
'NaT': 'pandas.NaT',
80+
'NaTType': 'type(pandas.NaT)',
8081
'OutOfBoundsDatetime': 'pandas.errors.OutOfBoundsDatetime'})
8182

8283
# use the closest tagged version if possible

pandas/tslib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
warnings.warn("The pandas.tslib module is deprecated and will be "
55
"removed in a future version.", FutureWarning, stacklevel=2)
66
from pandas._libs.tslib import (Timestamp, Timedelta,
7-
NaT, OutOfBoundsDatetime)
7+
NaT, NaTType, OutOfBoundsDatetime)

0 commit comments

Comments
 (0)