diff --git a/disable-flake.patch b/disable-flake.patch deleted file mode 100644 index dc09811..0000000 --- a/disable-flake.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- tests.py.orig 2021-01-04 08:54:13.334014409 +0100 -+++ tests.py 2021-01-04 08:55:56.793886083 +0100 -@@ -20,7 +20,6 @@ - - from datetime import date, datetime, timedelta - from dateutil.relativedelta import relativedelta, MO --from flake8.api import legacy as flake8 - - import holidays - -@@ -29,6 +28,7 @@ - - def test_flake8(self): - """Test that we conform to PEP-8.""" -+ self.skipTest("code style does not matter for production") - self.style_guide = flake8.get_style_guide(ignore=['I', 'F401', 'W504']) - self.py_files = [y for x in os.walk(os.path.abspath('holidays')) for y in glob(os.path.join(x[0], '*.py'))] - self.report = self.style_guide.check_files(self.py_files) diff --git a/disable-lag-baomer.patch b/disable-lag-baomer.patch deleted file mode 100644 index 6d0139b..0000000 --- a/disable-lag-baomer.patch +++ /dev/null @@ -1,96 +0,0 @@ ---- ./holidays/countries/israel.py.orig 2021-02-08 08:47:30.109263136 +0100 -+++ ./holidays/countries/israel.py 2021-02-08 08:58:05.624157929 +0100 -@@ -13,7 +13,7 @@ - - - from convertdate import gregorian, hebrew --from convertdate.holidays import hanukkah, lag_baomer, passover, purim, \ -+from convertdate.holidays import hanukkah, passover, purim, \ - rosh_hashanah, shavuot, sukkot, yom_kippur - from datetime import date - from dateutil.relativedelta import relativedelta as rd -@@ -44,37 +44,10 @@ - self[passover_start_dt + rd(days=6)] = name + ' - Eve' - self[passover_start_dt + rd(days=7)] = name - -- # Memorial Day -- name = 'Memorial Day' -- year, month, day = gregorian.from_jd( -- hebrew.to_jd_gregorianyear(year, hebrew.IYYAR, 3)) -- self[date(year, month, day) + rd(days=1)] = name -- -- observed_delta = 0 -- if self.observed: -- day_in_week = date(year, month, day).weekday() -- if day_in_week in (2, 3): -- observed_delta = - (day_in_week - 1) -- elif 2004 <= year and day_in_week == 5: -- observed_delta = 1 -- -- if observed_delta != 0: -- self[date(year, month, day) + rd(days=observed_delta + 1)] = \ -- name + ' (Observed)' -- - # Independence Day - name = 'Independence Day' - self[date(year, month, day) + rd(days=2)] = name - -- if self.observed and observed_delta != 0: -- self[date(year, month, day) + rd(days=observed_delta + 2)] = \ -- name + ' (Observed)' -- -- # Lag Baomer -- name = "Lag B'Omer" -- year, month, day = lag_baomer(year, eve=False) -- self[date(year, month, day)] = name -- - # Shavuot - name = 'Shavuot' - year, month, day = shavuot(year, eve=True) ---- tests.py.orig 2021-02-08 09:08:55.924307292 +0100 -+++ tests.py 2021-02-08 09:13:07.820186641 +0100 -@@ -6152,44 +6152,6 @@ - self.assertIn(date(2010, 2, 26), self.holidays) - - --class TestIsrael(unittest.TestCase): -- def test_memorial_day(self): -- self._test_observed_holidays('Memorial Day') -- -- def test_independence_day(self): -- self._test_observed_holidays('Independence Day') -- -- def _test_observed_holidays(self, holiday_name): -- days_delta = 0 if holiday_name == 'Memorial Day' else 1 -- -- # Postponed -- il_holidays = holidays.IL(years=[2017], observed=True) -- official_memorial_day = date(2017, 4, 30) + relativedelta(days=days_delta) -- observed_memorial_day = date(2017, 5, 1) + relativedelta(days=days_delta) -- self.assertIn(official_memorial_day, il_holidays) -- self.assertIn(holiday_name, il_holidays[official_memorial_day]) -- self.assertIn(observed_memorial_day, il_holidays) -- self.assertIn(holiday_name + ' (Observed)', il_holidays[observed_memorial_day]) -- -- # Earlier -- il_holidays = holidays.IL(years=[2018], observed=True) -- official_memorial_day = date(2018, 4, 19) + relativedelta(days=days_delta) -- observed_memorial_day = date(2018, 4, 18) + relativedelta(days=days_delta) -- self.assertIn(official_memorial_day, il_holidays) -- self.assertIn(holiday_name, il_holidays[official_memorial_day]) -- self.assertIn(observed_memorial_day, il_holidays) -- self.assertIn(holiday_name + ' (Observed)', il_holidays[observed_memorial_day]) -- -- # On time -- il_holidays = holidays.IL(years=[2020], observed=True) -- official_memorial_day = date(2020, 4, 28) + relativedelta(days=days_delta) -- self.assertIn(official_memorial_day, il_holidays) -- self.assertIn(holiday_name, il_holidays[official_memorial_day]) -- -- for names in il_holidays.values(): -- self.assertNotIn(holiday_name + ' (Observed)', names) -- -- - class TestGreece(unittest.TestCase): - def setUp(self): - self.gr_holidays = holidays.GR() diff --git a/holidays-0.10.5.2.tar.gz b/holidays-0.10.5.2.tar.gz deleted file mode 100644 index f5114eb..0000000 --- a/holidays-0.10.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed17186d785928723efecebe4ab2d03358abe8ef3f7fa939a39d3392d6c2903c -size 121756 diff --git a/holidays-0.11.1.tar.gz b/holidays-0.11.1.tar.gz new file mode 100644 index 0000000..2ff493f --- /dev/null +++ b/holidays-0.11.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fafd846f67f0eb7e1f9c19c38f4a7967bf07aed5ded2dd7a8aa2f937b0ea01b +size 90565 diff --git a/python-holidays.changes b/python-holidays.changes index 047c71b..802fd4c 100644 --- a/python-holidays.changes +++ b/python-holidays.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Mon May 3 13:19:03 UTC 2021 - Matej Cepl + +- Use %pytest macro + +------------------------------------------------------------------- +Mon May 3 07:33:00 UTC 2021 - Adrian Schröter + +- update to version 0.11.1 + * Support for Saudi Arabia + * Support for Curacao + * Support for Jamaica + * Support for Georgia + * init.py flake8 issue fix + * Korea 2020 fix + * Singapore fix for multi-year + * Israel fix + * Japan fix + * Serbia fix + * United Kingdom get_list fix + * Singapore fix for multi-year + * Fixed holidays pickling +- remove: + - disable-lag-baomer.patch + - disable-flake.patch + ------------------------------------------------------------------- Mon Feb 8 07:18:37 UTC 2021 - Adrian Schröter diff --git a/python-holidays.spec b/python-holidays.spec index 1c0ffb3..9696a66 100644 --- a/python-holidays.spec +++ b/python-holidays.spec @@ -1,7 +1,7 @@ # # spec file for package python-holidays # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,23 +18,22 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-holidays -Version: 0.10.5.2 +Version: 0.11.1 Release: 0 Summary: Python library for generating holidays on the fly License: MIT Group: Development/Languages/Python URL: https://github.com/dr-prodigy/python-holidays Source: https://files.pythonhosted.org/packages/source/h/holidays/holidays-%{version}.tar.gz -Patch1: disable-flake.patch -# searched for 15 minutes and did not found it anywhere, sorry -Patch2: disable-lag-baomer.patch BuildRequires: %{python_module convertdate} BuildRequires: %{python_module hijri-converter} BuildRequires: %{python_module korean-lunar-calendar} -#BuildRequires: %{python_module lag_baomer} +BuildRequires: %{python_module pytest} +#BuildRequires: %%{python_module lag_baomer} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: %{python_module testsuite} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-convertdate @@ -52,8 +51,6 @@ It makes determining whether a specific date is a holiday possible. %prep %setup -q -n holidays-%{version} -%patch1 -p0 -%patch2 -p0 %build %python_build @@ -63,7 +60,7 @@ It makes determining whether a specific date is a holiday possible. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand $python tests.py +%pytest %files %{python_files} %license LICENSE