From f2c7a5a35d9ac5071b66745b6dc213f4857616e85aec59d2a9dd806067d00959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 15 Jan 2020 13:25:19 +0000 Subject: [PATCH 1/2] - add healthcheck.patch to disarm too_slow healthcheck random fails OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hpack?expand=0&rev=13 --- healthcheck.patch | 21 +++++++++++++++++++++ python-hpack.changes | 5 +++++ python-hpack.spec | 5 +++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 healthcheck.patch diff --git a/healthcheck.patch b/healthcheck.patch new file mode 100644 index 0000000..8c64f2e --- /dev/null +++ b/healthcheck.patch @@ -0,0 +1,21 @@ +Index: hpack-3.0.0/test/test_hpack.py +=================================================================== +--- hpack-3.0.0.orig/test/test_hpack.py ++++ hpack-3.0.0/test/test_hpack.py +@@ -8,7 +8,7 @@ from hpack.struct import HeaderTuple, Ne + import itertools + import pytest + +-from hypothesis import given ++from hypothesis import given, settings, HealthCheck + from hypothesis.strategies import text, binary, sets, one_of + + try: +@@ -786,6 +786,7 @@ class TestDictToIterable(object): + assert special_keys == received_special + assert boring_keys == received_boring + ++ @settings(suppress_health_check=[HealthCheck.too_slow]) + @given( + special_keys=sets(keys), + boring_keys=sets(keys), diff --git a/python-hpack.changes b/python-hpack.changes index 684df2f..394cdef 100644 --- a/python-hpack.changes +++ b/python-hpack.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 15 13:24:22 UTC 2020 - Ondřej Súkup + +- add healthcheck.patch to disarm too_slow healthcheck random fails + ------------------------------------------------------------------- Fri Jul 19 09:49:33 UTC 2019 - Tomáš Chvátal diff --git a/python-hpack.spec b/python-hpack.spec index 8610045..393e087 100644 --- a/python-hpack.spec +++ b/python-hpack.spec @@ -1,7 +1,7 @@ # # spec file for package python-hpack # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,9 +22,9 @@ Version: 3.0.0 Release: 0 Summary: Pure-Python HPACK header compression License: MIT -Group: Development/Languages/Python URL: https://github.com/python-hyper/hpack Source: https://files.pythonhosted.org/packages/source/h/hpack/hpack-%{version}.tar.gz +Patch0: healthcheck.patch BuildRequires: %{python_module hypothesis} # https://github.com/python-hyper/hpack/issues/168 BuildRequires: %{python_module pytest < 5.0} @@ -41,6 +41,7 @@ automatically enables the use of nghttp2 if it’s available. %prep %setup -q -n hpack-%{version} +%patch0 -p1 %build export LC_ALL="en_US.UTF-8" From 5d572379d43c081ec3a8bab7b98db2546c0651e4e3ce42de89e82fb3b14fe44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 15 Jan 2020 14:07:53 +0000 Subject: [PATCH 2/2] add OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hpack?expand=0&rev=14 --- healthcheck.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/healthcheck.patch b/healthcheck.patch index 8c64f2e..b0ec0eb 100644 --- a/healthcheck.patch +++ b/healthcheck.patch @@ -11,7 +11,15 @@ Index: hpack-3.0.0/test/test_hpack.py from hypothesis.strategies import text, binary, sets, one_of try: -@@ -786,6 +786,7 @@ class TestDictToIterable(object): +@@ -749,6 +749,7 @@ class TestDictToIterable(object): + binary().filter(lambda k: k and not k.startswith(b':')) + ) + ++ @settings(suppress_health_check=[HealthCheck.too_slow]) + @given( + special_keys=sets(keys), + boring_keys=sets(keys), +@@ -786,6 +787,7 @@ class TestDictToIterable(object): assert special_keys == received_special assert boring_keys == received_boring