File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ from pandas._libs.tslibs.offsets import (
115115 BDay,
116116)
117117
118+ from pandas.util._decorators import set_module
119+
118120cdef:
119121 enum :
120122 INT32_MIN = - 2 _147_483_648LL
@@ -2662,6 +2664,7 @@ cdef class _Period(PeriodMixin):
26622664 return period_format(self.ordinal , base , fmt )
26632665
26642666
2667+ @set_module("pandas")
26652668class Period(_Period ):
26662669 """
26672670 Represents a period of time.
Original file line number Diff line number Diff line change 11import collections
22import warnings
33
4+ from pandas.util._decorators import set_module
45from pandas.util._exceptions import find_stack_level
56
67cimport cython
@@ -1771,7 +1772,7 @@ cdef class _Timedelta(timedelta):
17711772
17721773# Python front end to C extension type _Timedelta
17731774# This serves as the box for timedelta64
1774-
1775+ @ set_module ( " pandas " )
17751776class Timedelta (_Timedelta ):
17761777 """
17771778 Represents a duration, the difference between two dates or times.
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ import datetime as dt
5050from pandas._libs.tslibs cimport ccalendar
5151from pandas._libs.tslibs.base cimport ABCTimestamp
5252
53+ from pandas.util._decorators import set_module
5354from pandas.util._exceptions import find_stack_level
5455
5556from pandas._libs.tslibs.conversion cimport (
@@ -1263,7 +1264,7 @@ cdef class _Timestamp(ABCTimestamp):
12631264# Python front end to C extension type _Timestamp
12641265# This serves as the box for datetime64
12651266
1266-
1267+ @ set_module ( " pandas " )
12671268class Timestamp (_Timestamp ):
12681269 """
12691270 Pandas replacement for python datetime.datetime object.
Original file line number Diff line number Diff line change @@ -405,3 +405,6 @@ def test_pandas_array_alias():
405405
406406def test_set_module ():
407407 assert pd .DataFrame .__module__ == "pandas"
408+ assert pd .Period .__module__ == "pandas"
409+ assert pd .Timestamp .__module__ == "pandas"
410+ assert pd .Timedelta .__module__ == "pandas"
You can’t perform that action at this time.
0 commit comments