From 2d81862e4e97d59c878b6682366d3938adad1794c60b13fb7bf135f28621c493 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 3 May 2021 13:18:24 +0000 Subject: [PATCH 1/3] Accepting request 889926 from system:homeautomation:home-assistant:unstable - 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 - obsoletes disable-lag-baomer.patch OBS-URL: https://build.opensuse.org/request/show/889926 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-holidays?expand=0&rev=18 --- disable-flake.patch | 18 -------- disable-lag-baomer.patch | 96 ---------------------------------------- holidays-0.10.5.2.tar.gz | 3 -- holidays-0.11.1.tar.gz | 3 ++ python-holidays.changes | 19 ++++++++ python-holidays.spec | 11 ++--- 6 files changed, 26 insertions(+), 124 deletions(-) delete mode 100644 disable-flake.patch delete mode 100644 disable-lag-baomer.patch delete mode 100644 holidays-0.10.5.2.tar.gz create mode 100644 holidays-0.11.1.tar.gz 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..1a05ab5 100644 --- a/python-holidays.changes +++ b/python-holidays.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +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 +- obsoletes disable-lag-baomer.patch + ------------------------------------------------------------------- Mon Feb 8 07:18:37 UTC 2021 - Adrian Schröter diff --git a/python-holidays.spec b/python-holidays.spec index 1c0ffb3..662fe43 100644 --- a/python-holidays.spec +++ b/python-holidays.spec @@ -18,16 +18,13 @@ %{?!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} @@ -35,6 +32,8 @@ BuildRequires: %{python_module korean-lunar-calendar} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: %{python_module pytest} +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 +%python_expand $python -m pytest %files %{python_files} %license LICENSE From bfbf1288e31b5a8debc881bc8c2528a24d01603662ae80f869b0b4c17ca42f93 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 3 May 2021 13:21:57 +0000 Subject: [PATCH 2/3] - Use %pytest macro OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-holidays?expand=0&rev=19 --- python-holidays.changes | 5 +++++ python-holidays.spec | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python-holidays.changes b/python-holidays.changes index 1a05ab5..03d310c 100644 --- a/python-holidays.changes +++ b/python-holidays.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 3 13:19:03 UTC 2021 - Matej Cepl + +- Use %pytest macro + ------------------------------------------------------------------- Mon May 3 07:33:00 UTC 2021 - Adrian Schröter diff --git a/python-holidays.spec b/python-holidays.spec index 662fe43..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 @@ -28,11 +28,11 @@ Source: https://files.pythonhosted.org/packages/source/h/holidays/holida 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 pytest} BuildRequires: %{python_module testsuite} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -60,7 +60,7 @@ It makes determining whether a specific date is a holiday possible. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_expand $python -m pytest +%pytest %files %{python_files} %license LICENSE From 2e9e0bdfea22ed0b2d501ac16d7d8a191c14a30c51966751c1aebe881d21480d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 4 May 2021 16:00:35 +0000 Subject: [PATCH 3/3] Fix changes OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-holidays?expand=0&rev=20 --- python-holidays.changes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-holidays.changes b/python-holidays.changes index 03d310c..802fd4c 100644 --- a/python-holidays.changes +++ b/python-holidays.changes @@ -20,7 +20,9 @@ Mon May 3 07:33:00 UTC 2021 - Adrian Schröter * United Kingdom get_list fix * Singapore fix for multi-year * Fixed holidays pickling -- obsoletes disable-lag-baomer.patch +- remove: + - disable-lag-baomer.patch + - disable-flake.patch ------------------------------------------------------------------- Mon Feb 8 07:18:37 UTC 2021 - Adrian Schröter