prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Swaziland deprecation warning
  Resolves #793.
  
  </issue>
  <code>
  [start of holidays/__init__.py]
  1 #  python-holidays
  2 #  ---------------
  3 #  A fast, efficient Python library for generating country, province and state
  4 #  specific sets of holidays on the fly. It aims to make determining whether a
  5 #  specific date is a holiday as fast and flexible as possible.
  6 #
  7 #  Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022
  8 #           ryanss <ryanssdev@icloud.com> (c) 2014-2017
  9 #  Website: https://github.com/dr-prodigy/python-holidays
  10 #  License: MIT (see LICENSE file)
  11 from holidays.constants import (
  12     MON,
  13     TUE,
  14     WED,
  15     THU,
  16     FRI,
  17     SAT,
  18     SUN,
  19     WEEKEND,
  20     JAN,
  21     FEB,
  22     MAR,
  23     APR,
  24     MAY,
  25     JUN,
  26     JUL,
  27     AUG,
  28     SEP,
  29     OCT,
  30     NOV,
  31     DEC,
  32 )
  33 from holidays.countries import *
  34 from holidays.financial import *
  35 from holidays.holiday_base import *  # * import required for IDE docstrings
  36 from holidays.utils import (
  37     CountryHoliday,
  38     country_holidays,
  39     financial_holidays,
  40     list_supported_countries,
  41     list_supported_financial,
  42 )
  43 
  44 __version__ = "0.17"
  45
  [end of holidays/__init__.py]
  [start of holidays/countries/eswatini.py]
  1 #  python-holidays
  2 #  ---------------
  3 #  A fast, efficient Python library for generating country, province and state
  4 #  specific sets of holidays on the fly. It aims to make determining whether a
  5 #  specific date is a holiday as fast and flexible as possible.
  6 #
  7 #  Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022
  8 #           ryanss <ryanssdev@icloud.com> (c) 2014-2017
  9 #  Website: https://github.com/dr-prodigy/python-holidays
  10 #  License: MIT (see LICENSE file)
  11 
  12 import warnings
  13 from datetime import date
  14 
  15 from dateutil.easter import easter
  16 from dateutil.relativedelta import relativedelta as rd
  17 
  18 from holidays.constants import SUN, JAN, APR, MAY, JUL, SEP, DEC
  19 from holidays.holiday_base import HolidayBase
  20 
  21 
  22 class Eswatini(HolidayBase):
  23     """
  24     https://swazilii.org/sz/legislation/act/1938/71
  25     https://www.officeholidays.com/countries/swaziland
  26     """
  27 
  28     country = "SZ"
  29 
  30     def _populate(self, year):
  31         super()._populate(year)
  32 
  33         # Observed since 1938
  34         if year > 1938:
  35             self[date(year, JAN, 1)] = "New Year's Day"
  36 
  37             e = easter(year)
  38             good_friday = e - rd(days=2)
  39             easter_monday = e + rd(days=1)
  40             ascension_day = e + rd(days=39)
  41             self[good_friday] = "Good Friday"
  42             self[easter_monday] = "Easter Monday"
  43             self[ascension_day] = "Ascension Day"
  44 
  45             if year > 1968:
  46                 self[date(year, APR, 25)] = "National Flag Day"
  47 
  48             if year > 1982:
  49                 # https://www.officeholidays.com/holidays/swaziland/birthday-of-late-king-sobhuza
  50                 self[date(year, JUL, 22)] = "Birthday of Late King Sobhuza"
  51 
  52             if year > 1986:
  53                 # https://www.officeholidays.com/holidays/swaziland/birthday-of-king-mswati-iii
  54                 self[date(year, APR, 19)] = "King's Birthday"
  55 
  56             self[date(year, MAY, 1)] = "Worker's Day"
  57             self[date(year, SEP, 6)] = "Independence Day"
  58             self[date(year, DEC, 25)] = "Christmas Day"
  59             self[date(year, DEC, 26)] = "Boxing Day"
  60 
  61             # Once-off public holidays
  62             y2k = "Y2K changeover"
  63 
  64             if year == 1999:
  65                 # https://mg.co.za/article/1999-12-09-swaziland-declares-bank-holidays/
  66                 self[date(1999, DEC, 31)] = y2k
  67             if year == 2000:
  68                 self[date(2000, JAN, 3)] = y2k
  69 
  70             # As of 2021/1/1, whenever a public holiday falls on a
  71             # Sunday
  72             # it rolls over to the following Monday
  73             for k, v in list(self.items()):
  74 
  75                 if self.observed and k.weekday() == SUN and k.year == year:
  76                     add_days = 1
  77                     while self.get(k + rd(days=add_days)) is not None:
  78                         add_days += 1
  79                     self[k + rd(days=add_days)] = v + " (Day Off)"
  80 
  81 
  82 class Swaziland(Eswatini):
  83     warnings.warn(
  84         "Swaziland is deprecated, use Eswatini instead.",
  85         DeprecationWarning,
  86     )
  87     pass
  88 
  89 
  90 class SZ(Eswatini):
  91     pass
  92 
  93 
  94 class SZW(Eswatini):
  95     pass
  96
  [end of holidays/countries/eswatini.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/holidays/__init__.py b/holidays/__init__.py
  --- a/holidays/__init__.py
  +++ b/holidays/__init__.py
  @@ -41,4 +41,4 @@
       list_supported_financial,
   )
   
  -__version__ = "0.17"
  +__version__ = "0.17.1"
  diff --git a/holidays/countries/eswatini.py b/holidays/countries/eswatini.py
  --- a/holidays/countries/eswatini.py
  +++ b/holidays/countries/eswatini.py
  @@ -80,11 +80,13 @@
   
   
   class Swaziland(Eswatini):
  -    warnings.warn(
  -        "Swaziland is deprecated, use Eswatini instead.",
  -        DeprecationWarning,
  -    )
  -    pass
  +    def __init__(self, *args, **kwargs) -> None:
  +        warnings.warn(
  +            "Swaziland is deprecated, use Eswatini instead.",
  +            DeprecationWarning,
  +        )
  +
  +        super().__init__(*args, **kwargs)
   
   
   class SZ(Eswatini):
  
verification_info: {"golden_diff": "diff --git a/holidays/__init__.py b/holidays/__init__.py\n--- a/holidays/__init__.py\n+++ b/holidays/__init__.py\n@@ -41,4 +41,4 @@\n     list_supported_financial,\n )\n \n-__version__ = \"0.17\"\n+__version__ = \"0.17.1\"\ndiff --git a/holidays/countries/eswatini.py b/holidays/countries/eswatini.py\n--- a/holidays/countries/eswatini.py\n+++ b/holidays/countries/eswatini.py\n@@ -80,11 +80,13 @@\n \n \n class Swaziland(Eswatini):\n-    warnings.warn(\n-        \"Swaziland is deprecated, use Eswatini instead.\",\n-        DeprecationWarning,\n-    )\n-    pass\n+    def __init__(self, *args, **kwargs) -> None:\n+        warnings.warn(\n+            \"Swaziland is deprecated, use Eswatini instead.\",\n+            DeprecationWarning,\n+        )\n+\n+        super().__init__(*args, **kwargs)\n \n \n class SZ(Eswatini):\n", "issue": "Swaziland deprecation warning\nResolves #793.\n", "before_files": [{"content": "#  python-holidays\n#  ---------------\n#  A fast, efficient Python library for generating country, province and state\n#  specific sets of holidays on the fly. It aims to make determining whether a\n#  specific date is a holiday as fast and flexible as possible.\n#\n#  Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022\n#           ryanss <ryanssdev@icloud.com> (c) 2014-2017\n#  Website: https://github.com/dr-prodigy/python-holidays\n#  License: MIT (see LICENSE file)\nfrom holidays.constants import (\n    MON,\n    TUE,\n    WED,\n    THU,\n    FRI,\n    SAT,\n    SUN,\n    WEEKEND,\n    JAN,\n    FEB,\n    MAR,\n    APR,\n    MAY,\n    JUN,\n    JUL,\n    AUG,\n    SEP,\n    OCT,\n    NOV,\n    DEC,\n)\nfrom holidays.countries import *\nfrom holidays.financial import *\nfrom holidays.holiday_base import *  # * import required for IDE docstrings\nfrom holidays.utils import (\n    CountryHoliday,\n    country_holidays,\n    financial_holidays,\n    list_supported_countries,\n    list_supported_financial,\n)\n\n__version__ = \"0.17\"\n", "path": "holidays/__init__.py"}, {"content": "#  python-holidays\n#  ---------------\n#  A fast, efficient Python library for generating country, province and state\n#  specific sets of holidays on the fly. It aims to make determining whether a\n#  specific date is a holiday as fast and flexible as possible.\n#\n#  Authors: dr-prodigy <maurizio.montel@gmail.com> (c) 2017-2022\n#           ryanss <ryanssdev@icloud.com> (c) 2014-2017\n#  Website: https://github.com/dr-prodigy/python-holidays\n#  License: MIT (see LICENSE file)\n\nimport warnings\nfrom datetime import date\n\nfrom dateutil.easter import easter\nfrom dateutil.relativedelta import relativedelta as rd\n\nfrom holidays.constants import SUN, JAN, APR, MAY, JUL, SEP, DEC\nfrom holidays.holiday_base import HolidayBase\n\n\nclass Eswatini(HolidayBase):\n    \"\"\"\n    https://swazilii.org/sz/legislation/act/1938/71\n    https://www.officeholidays.com/countries/swaziland\n    \"\"\"\n\n    country = \"SZ\"\n\n    def _populate(self, year):\n        super()._populate(year)\n\n        # Observed since 1938\n        if year > 1938:\n            self[date(year, JAN, 1)] = \"New Year's Day\"\n\n            e = easter(year)\n            good_friday = e - rd(days=2)\n            easter_monday = e + rd(days=1)\n            ascension_day = e + rd(days=39)\n            self[good_friday] = \"Good Friday\"\n            self[easter_monday] = \"Easter Monday\"\n            self[ascension_day] = \"Ascension Day\"\n\n            if year > 1968:\n                self[date(year, APR, 25)] = \"National Flag Day\"\n\n            if year > 1982:\n                # https://www.officeholidays.com/holidays/swaziland/birthday-of-late-king-sobhuza\n                self[date(year, JUL, 22)] = \"Birthday of Late King Sobhuza\"\n\n            if year > 1986:\n                # https://www.officeholidays.com/holidays/swaziland/birthday-of-king-mswati-iii\n                self[date(year, APR, 19)] = \"King's Birthday\"\n\n            self[date(year, MAY, 1)] = \"Worker's Day\"\n            self[date(year, SEP, 6)] = \"Independence Day\"\n            self[date(year, DEC, 25)] = \"Christmas Day\"\n            self[date(year, DEC, 26)] = \"Boxing Day\"\n\n            # Once-off public holidays\n            y2k = \"Y2K changeover\"\n\n            if year == 1999:\n                # https://mg.co.za/article/1999-12-09-swaziland-declares-bank-holidays/\n                self[date(1999, DEC, 31)] = y2k\n            if year == 2000:\n                self[date(2000, JAN, 3)] = y2k\n\n            # As of 2021/1/1, whenever a public holiday falls on a\n            # Sunday\n            # it rolls over to the following Monday\n            for k, v in list(self.items()):\n\n                if self.observed and k.weekday() == SUN and k.year == year:\n                    add_days = 1\n                    while self.get(k + rd(days=add_days)) is not None:\n                        add_days += 1\n                    self[k + rd(days=add_days)] = v + \" (Day Off)\"\n\n\nclass Swaziland(Eswatini):\n    warnings.warn(\n        \"Swaziland is deprecated, use Eswatini instead.\",\n        DeprecationWarning,\n    )\n    pass\n\n\nclass SZ(Eswatini):\n    pass\n\n\nclass SZW(Eswatini):\n    pass\n", "path": "holidays/countries/eswatini.py"}]}