From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 8 Feb 2019 14:12:25 +0200
Subject: Handle older hypothesis better, in tests

Crashes with too-old versions of hypothesis.  Turn crashes into
warnings.

Author: Armin Rigo <arigo@tunes.org>
Origin: upstream, https://bitbucket.org/pypy/pypy/commits/928a4f70d3de7d17449456946154c5da6e600162
---
 rpython/conftest.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/rpython/conftest.py b/rpython/conftest.py
index 26905af..c080730 100644
--- a/rpython/conftest.py
+++ b/rpython/conftest.py
@@ -6,15 +6,16 @@ pytest_plugins = 'rpython.tool.pytest.expecttest'
 option = None
 
 try:
-    from hypothesis import settings, __version__
+    from hypothesis import settings
 except ImportError:
     pass
 else:
-    if __version__[:2] < '3.6':
-        s = settings(deadline=None)
-        settings.register_profile('default', s)
-    else:
+    try:
         settings.register_profile('default', deadline=None)
+    except Exception:
+        import warnings
+        warnings.warn("Version of hypothesis too old, "
+                      "cannot set the deadline to None")
     settings.load_profile('default')
 
 def braindead_deindent(self):
