99from datetime import date , timedelta
1010from dateutil .relativedelta import relativedelta
1111
12+ from .exceptions import PendulumDeprecationWarning
1213from .period import Period
1314from .formatting .difference_formatter import DifferenceFormatter
1415from .mixins .default import TranslatableMixin , FormattableMixing , TestableMixin
@@ -118,7 +119,7 @@ def year_(self, year):
118119 warnings .warn (
119120 'The year_() method will be removed in version 2.0. '
120121 'Use set(year={}) instead.' .format (year ),
121- DeprecationWarning ,
122+ PendulumDeprecationWarning ,
122123 stacklevel = 2
123124 )
124125
@@ -128,7 +129,7 @@ def month_(self, month):
128129 warnings .warn (
129130 'The month_() method will be removed in version 2.0. '
130131 'Use set(month={}) instead.' .format (month ),
131- DeprecationWarning ,
132+ PendulumDeprecationWarning ,
132133 stacklevel = 2
133134 )
134135
@@ -138,7 +139,7 @@ def day_(self, day):
138139 warnings .warn (
139140 'The day_() method will be removed in version 2.0. '
140141 'Use set(day={}) instead.' .format (day ),
141- DeprecationWarning ,
142+ PendulumDeprecationWarning ,
142143 stacklevel = 2
143144 )
144145
@@ -293,7 +294,7 @@ def between(self, dt1, dt2, equal=True):
293294 """
294295 warnings .warn (
295296 'The between() method will be removed in version 2.0.' ,
296- DeprecationWarning ,
297+ PendulumDeprecationWarning ,
297298 stacklevel = 2
298299 )
299300
@@ -350,7 +351,7 @@ def min_(self, dt=None):
350351 """
351352 warnings .warn (
352353 'The min_() method will be removed in version 2.0.' ,
353- DeprecationWarning ,
354+ PendulumDeprecationWarning ,
354355 stacklevel = 2
355356 )
356357
@@ -373,7 +374,7 @@ def minimum(self, dt=None):
373374 """
374375 warnings .warn (
375376 'The minimum() method will be removed in version 2.0.' ,
376- DeprecationWarning ,
377+ PendulumDeprecationWarning ,
377378 stacklevel = 2
378379 )
379380
@@ -390,7 +391,7 @@ def max_(self, dt=None):
390391 """
391392 warnings .warn (
392393 'The max_() method will be removed in version 2.0.' ,
393- DeprecationWarning ,
394+ PendulumDeprecationWarning ,
394395 stacklevel = 2
395396 )
396397
@@ -413,7 +414,7 @@ def maximum(self, dt=None):
413414 """
414415 warnings .warn (
415416 'The maximum() method will be removed in version 2.0.' ,
416- DeprecationWarning ,
417+ PendulumDeprecationWarning ,
417418 stacklevel = 2
418419 )
419420
@@ -427,7 +428,7 @@ def is_weekday(self):
427428 """
428429 warnings .warn (
429430 'The is_weekday() method will be removed in version 2.0.' ,
430- DeprecationWarning ,
431+ PendulumDeprecationWarning ,
431432 stacklevel = 2
432433 )
433434
@@ -441,7 +442,7 @@ def is_weekend(self):
441442 """
442443 warnings .warn (
443444 'The is_weekend() method will be removed in version 2.0.' ,
444- DeprecationWarning ,
445+ PendulumDeprecationWarning ,
445446 stacklevel = 2
446447 )
447448
@@ -455,7 +456,7 @@ def is_yesterday(self):
455456 """
456457 warnings .warn (
457458 'The is_yesterday() method will be removed in version 2.0.' ,
458- DeprecationWarning ,
459+ PendulumDeprecationWarning ,
459460 stacklevel = 2
460461 )
461462
@@ -469,7 +470,7 @@ def is_today(self):
469470 """
470471 warnings .warn (
471472 'The is_today() method will be removed in version 2.0.' ,
472- DeprecationWarning ,
473+ PendulumDeprecationWarning ,
473474 stacklevel = 2
474475 )
475476
@@ -483,7 +484,7 @@ def is_tomorrow(self):
483484 """
484485 warnings .warn (
485486 'The is_tomorrow() method will be removed in version 2.0.' ,
486- DeprecationWarning ,
487+ PendulumDeprecationWarning ,
487488 stacklevel = 2
488489 )
489490
@@ -533,7 +534,7 @@ def is_same_day(self, dt):
533534 """
534535 warnings .warn (
535536 'The is_same_day() method will be removed in version 2.0.' ,
536- DeprecationWarning ,
537+ PendulumDeprecationWarning ,
537538 stacklevel = 2
538539 )
539540
@@ -547,7 +548,7 @@ def is_sunday(self):
547548 """
548549 warnings .warn (
549550 'The is_sunday() method will be removed in version 2.0.' ,
550- DeprecationWarning ,
551+ PendulumDeprecationWarning ,
551552 stacklevel = 2
552553 )
553554
@@ -561,7 +562,7 @@ def is_monday(self):
561562 """
562563 warnings .warn (
563564 'The is_monday() method will be removed in version 2.0.' ,
564- DeprecationWarning ,
565+ PendulumDeprecationWarning ,
565566 stacklevel = 2
566567 )
567568
@@ -575,7 +576,7 @@ def is_tuesday(self):
575576 """
576577 warnings .warn (
577578 'The is_tuesday() method will be removed in version 2.0.' ,
578- DeprecationWarning ,
579+ PendulumDeprecationWarning ,
579580 stacklevel = 2
580581 )
581582
@@ -589,7 +590,7 @@ def is_wednesday(self):
589590 """
590591 warnings .warn (
591592 'The is_wednesday() method will be removed in version 2.0.' ,
592- DeprecationWarning ,
593+ PendulumDeprecationWarning ,
593594 stacklevel = 2
594595 )
595596
@@ -603,7 +604,7 @@ def is_thursday(self):
603604 """
604605 warnings .warn (
605606 'The is_thursday() method will be removed in version 2.0.' ,
606- DeprecationWarning ,
607+ PendulumDeprecationWarning ,
607608 stacklevel = 2
608609 )
609610
@@ -617,7 +618,7 @@ def is_friday(self):
617618 """
618619 warnings .warn (
619620 'The is_friday() method will be removed in version 2.0.' ,
620- DeprecationWarning ,
621+ PendulumDeprecationWarning ,
621622 stacklevel = 2
622623 )
623624
@@ -631,7 +632,7 @@ def is_saturday(self):
631632 """
632633 warnings .warn (
633634 'The is_saturday() method will be removed in version 2.0.' ,
634- DeprecationWarning ,
635+ PendulumDeprecationWarning ,
635636 stacklevel = 2
636637 )
637638
@@ -717,7 +718,7 @@ def add_timedelta(self, delta):
717718 """
718719 warnings .warn (
719720 'The add_timedelta() method will be removed in version 2.0.' ,
720- DeprecationWarning ,
721+ PendulumDeprecationWarning ,
721722 stacklevel = 2
722723 )
723724
@@ -734,7 +735,7 @@ def subtract_timedelta(self, delta):
734735 """
735736 warnings .warn (
736737 'The subtract_timedelta() method will be removed in version 2.0.' ,
737- DeprecationWarning ,
738+ PendulumDeprecationWarning ,
738739 stacklevel = 2
739740 )
740741
0 commit comments