From a680703840d7919e189a43eb41e0971fe625b88202b47818098ada77307ce665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 8 Apr 2019 08:33:42 +0000 Subject: [PATCH 1/3] Accepting request 692066 from home:jengelh:branches:devel:languages:python - Use noun phrase in summary. Wrap description. OBS-URL: https://build.opensuse.org/request/show/692066 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vdirsyncer?expand=0&rev=10 --- python-vdirsyncer.changes | 5 +++++ python-vdirsyncer.spec | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/python-vdirsyncer.changes b/python-vdirsyncer.changes index e25b58d..605dcdd 100644 --- a/python-vdirsyncer.changes +++ b/python-vdirsyncer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 6 22:18:22 UTC 2019 - Jan Engelhardt + +- Use noun phrase in summary. Wrap description. + ------------------------------------------------------------------- Fri Mar 29 13:31:30 UTC 2019 - pgajdos@suse.com diff --git a/python-vdirsyncer.spec b/python-vdirsyncer.spec index 898ff49..e8c46cc 100644 --- a/python-vdirsyncer.spec +++ b/python-vdirsyncer.spec @@ -21,7 +21,7 @@ Name: python-vdirsyncer Version: 0.16.7 Release: 0 -Summary: Synchronize CalDAV and CardDAV +Summary: CalDAV and CardDAV synchronization module License: BSD-3-Clause Group: Productivity/Networking/News/Utilities URL: https://github.com/pimutils/vdirsyncer @@ -65,8 +65,10 @@ Obsoletes: vdirsyncer < %{version} %python_subpackages %description -Vdirsyncer synchronizes your calendars and addressbooks between two storages. The supported storages are CalDAV, CardDAV, arbitrary HTTP resources, vdir and some more. -It aims to be for CalDAV and CardDAV what OfflineIMAP is for IMAP. +Vdirsyncer synchronizes calendars and addressbooks between two +storages. The supported storages are CalDAV, CardDAV, arbitrary HTTP +resources, vdir and some more. It aims to be for CalDAV and CardDAV +what OfflineIMAP is for IMAP. %prep %setup -q -n vdirsyncer-%{version} From 8b2414146a6b025102453eecb3ce3b23e8d048a255913fcf6d957e31b9fb1325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 6 May 2019 13:41:12 +0000 Subject: [PATCH 2/3] Accepting request 701106 from home:pgajdos please really carefully review OBS-URL: https://build.opensuse.org/request/show/701106 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vdirsyncer?expand=0&rev=11 --- python-vdirsyncer-fix-tests.patch | 53 +++++++++++++++++++++++++------ python-vdirsyncer.changes | 7 ++++ python-vdirsyncer.spec | 1 + 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/python-vdirsyncer-fix-tests.patch b/python-vdirsyncer-fix-tests.patch index 4c646f1..c23443f 100644 --- a/python-vdirsyncer-fix-tests.patch +++ b/python-vdirsyncer-fix-tests.patch @@ -1,16 +1,49 @@ -diff --git a/tests/conftest.py b/tests/conftest.py -index ff774ce1..6272d42d 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -27,7 +27,10 @@ def benchmark(): +Index: vdirsyncer-0.16.7/tests/conftest.py +=================================================================== +--- vdirsyncer-0.16.7.orig/tests/conftest.py 2018-02-16 19:48:40.000000000 +0100 ++++ vdirsyncer-0.16.7/tests/conftest.py 2019-05-06 15:24:28.233806166 +0200 +@@ -7,7 +7,7 @@ import os + + import click_log + +-from hypothesis import HealthCheck, Verbosity, settings ++from hypothesis import Verbosity, settings + + import pytest + +@@ -27,15 +27,12 @@ else: del pytest_benchmark -settings.suppress_health_check = [HealthCheck.too_slow] -+settings.register_profile("dev", settings( -+ suppress_health_check=[HealthCheck.too_slow] -+)) -+settings.load_profile("dev") - +- settings.register_profile("ci", settings( max_examples=1000, + verbosity=Verbosity.verbose, + )) + settings.register_profile("deterministic", settings( + derandomize=True, +- perform_health_check=False + )) + + if os.environ.get('DETERMINISTIC_TESTS', 'false').lower() == 'true': +Index: vdirsyncer-0.16.7/tests/unit/test_repair.py +=================================================================== +--- vdirsyncer-0.16.7.orig/tests/unit/test_repair.py 2018-07-19 21:07:31.000000000 +0200 ++++ vdirsyncer-0.16.7/tests/unit/test_repair.py 2019-05-06 15:24:59.781963794 +0200 +@@ -11,7 +11,6 @@ from vdirsyncer.vobject import Item + + + @given(uid=uid_strategy) +-@settings(perform_health_check=False) # Using the random module for UIDs + def test_repair_uids(uid): + s = MemoryStorage() + s.items = { +@@ -35,7 +34,6 @@ def test_repair_uids(uid): + + + @given(uid=uid_strategy.filter(lambda x: not href_safe(x))) +-@settings(perform_health_check=False) # Using the random module for UIDs + def test_repair_unsafe_uids(uid): + s = MemoryStorage() + item = Item(u'BEGIN:VCARD\nUID:{}\nEND:VCARD'.format(uid)) diff --git a/python-vdirsyncer.changes b/python-vdirsyncer.changes index 605dcdd..b023558 100644 --- a/python-vdirsyncer.changes +++ b/python-vdirsyncer.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon May 6 13:36:29 UTC 2019 - pgajdos@suse.com + +- fix tests again https://github.com/pimutils/vdirsyncer/issues/793 +- modified patches + % python-vdirsyncer-fix-tests.patch (extended) + ------------------------------------------------------------------- Sat Apr 6 22:18:22 UTC 2019 - Jan Engelhardt diff --git a/python-vdirsyncer.spec b/python-vdirsyncer.spec index e8c46cc..21338a4 100644 --- a/python-vdirsyncer.spec +++ b/python-vdirsyncer.spec @@ -29,6 +29,7 @@ Source0: https://files.pythonhosted.org/packages/source/v/vdirsyncer/vdir Source1: vdirsyncer.service Source2: vdirsyncer.timer # https://github.com/pimutils/vdirsyncer/pull/779 +# https://github.com/pimutils/vdirsyncer/issues/793 Patch0: python-vdirsyncer-fix-tests.patch BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes From 5c342cdb88895d1ebf6c7823a36383179b4d873168b43f67e479c065724f1134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 May 2019 10:11:51 +0000 Subject: [PATCH 3/3] Accepting request 701268 from home:pgajdos - added patches default deadline (200ms) is too short for obs + python-vdirsyncer-shift-deadline.patch OBS-URL: https://build.opensuse.org/request/show/701268 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vdirsyncer?expand=0&rev=12 --- python-vdirsyncer-fix-tests.patch | 4 ++-- python-vdirsyncer-shift-deadline.patch | 25 +++++++++++++++++++++++++ python-vdirsyncer.changes | 7 +++++++ python-vdirsyncer.spec | 6 +++++- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 python-vdirsyncer-shift-deadline.patch diff --git a/python-vdirsyncer-fix-tests.patch b/python-vdirsyncer-fix-tests.patch index c23443f..67c070b 100644 --- a/python-vdirsyncer-fix-tests.patch +++ b/python-vdirsyncer-fix-tests.patch @@ -1,7 +1,7 @@ Index: vdirsyncer-0.16.7/tests/conftest.py =================================================================== --- vdirsyncer-0.16.7.orig/tests/conftest.py 2018-02-16 19:48:40.000000000 +0100 -+++ vdirsyncer-0.16.7/tests/conftest.py 2019-05-06 15:24:28.233806166 +0200 ++++ vdirsyncer-0.16.7/tests/conftest.py 2019-05-07 07:42:51.601117380 +0200 @@ -7,7 +7,7 @@ import os import click_log @@ -30,7 +30,7 @@ Index: vdirsyncer-0.16.7/tests/conftest.py Index: vdirsyncer-0.16.7/tests/unit/test_repair.py =================================================================== --- vdirsyncer-0.16.7.orig/tests/unit/test_repair.py 2018-07-19 21:07:31.000000000 +0200 -+++ vdirsyncer-0.16.7/tests/unit/test_repair.py 2019-05-06 15:24:59.781963794 +0200 ++++ vdirsyncer-0.16.7/tests/unit/test_repair.py 2019-05-07 07:37:15.015521334 +0200 @@ -11,7 +11,6 @@ from vdirsyncer.vobject import Item diff --git a/python-vdirsyncer-shift-deadline.patch b/python-vdirsyncer-shift-deadline.patch new file mode 100644 index 0000000..3932bd2 --- /dev/null +++ b/python-vdirsyncer-shift-deadline.patch @@ -0,0 +1,25 @@ +Index: vdirsyncer-0.16.7/tests/system/cli/test_sync.py +=================================================================== +--- vdirsyncer-0.16.7.orig/tests/system/cli/test_sync.py 2018-07-19 21:07:31.000000000 +0200 ++++ vdirsyncer-0.16.7/tests/system/cli/test_sync.py 2019-05-07 08:59:40.114934546 +0200 +@@ -5,11 +5,10 @@ import sys + from textwrap import dedent + + import hypothesis.strategies as st +-from hypothesis import example, given ++from hypothesis import example, given, settings + + import pytest + +- + def test_simple_run(tmpdir, runner): + runner.write_with_general(dedent(''' + [pair my_pair] +@@ -273,6 +272,7 @@ def test_multiple_pairs(tmpdir, runner): + # XXX: https://github.com/pimutils/vdirsyncer/issues/617 + @pytest.mark.skipif(sys.platform == 'darwin', + reason='This test inexplicably fails') ++@settings(deadline=1000.0) + @given(collections=st.sets( + st.text( + st.characters( diff --git a/python-vdirsyncer.changes b/python-vdirsyncer.changes index b023558..b2d83df 100644 --- a/python-vdirsyncer.changes +++ b/python-vdirsyncer.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 7 05:47:52 UTC 2019 - pgajdos@suse.com + +- added patches + default deadline (200ms) is too short for obs + + python-vdirsyncer-shift-deadline.patch + ------------------------------------------------------------------- Mon May 6 13:36:29 UTC 2019 - pgajdos@suse.com diff --git a/python-vdirsyncer.spec b/python-vdirsyncer.spec index 21338a4..65c6a9b 100644 --- a/python-vdirsyncer.spec +++ b/python-vdirsyncer.spec @@ -31,6 +31,8 @@ Source2: vdirsyncer.timer # https://github.com/pimutils/vdirsyncer/pull/779 # https://github.com/pimutils/vdirsyncer/issues/793 Patch0: python-vdirsyncer-fix-tests.patch +# default deadline (200ms) is too short for obs +Patch1: python-vdirsyncer-shift-deadline.patch BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -74,6 +76,7 @@ what OfflineIMAP is for IMAP. %prep %setup -q -n vdirsyncer-%{version} %patch0 -p1 +%patch1 -p1 rm -rf vdirsyncer.egg-info %build @@ -88,7 +91,8 @@ install -Dpm 0644 %{SOURCE0} %{buildroot}%{_userunitdir}/vdirsyncer.service install -Dpm 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/vdirsyncer.timer %check -%python_exec -m pytest -k 'not test_open_graphical_browser' +export DETERMINISTIC_TESTS=true +%pytest -k 'not test_open_graphical_browser' %files %{python_files} %doc README.rst