[pypy-commit] pypy release-pypy3.6-7.x: Crashes with too-old versions of hypothesis. Turn crashes into warnings

arigo pypy.commits at gmail.com
Fri Feb 8 05:35:41 EST 2019


Author: Armin Rigo <arigo at tunes.org>
Branch: release-pypy3.6-7.x
Changeset: r95894:fb40f7a5524c
Date: 2019-02-08 00:54 +0100
http://bitbucket.org/pypy/pypy/changeset/fb40f7a5524c/

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

diff --git a/rpython/conftest.py b/rpython/conftest.py
--- a/rpython/conftest.py
+++ b/rpython/conftest.py
@@ -6,15 +6,16 @@
 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):


More information about the pypy-commit mailing list