We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87f9f75 + 6b758e0 commit 9d7d515Copy full SHA for 9d7d515
hypothesis-python/RELEASE.rst
@@ -0,0 +1,4 @@
1
+RELEASE_TYPE: patch
2
+
3
+This patch fixes ``hypothesis.strategies._internal.types.is_a_new_type``.
4
+It was failing on Python ``3.10.0b4``, where ``NewType`` is a function.
hypothesis-python/src/hypothesis/strategies/_internal/types.py
@@ -98,7 +98,7 @@ def try_issubclass(thing, superclass):
98
99
100
def is_a_new_type(thing):
101
- if sys.version_info[:2] < (3, 10):
+ if not isinstance(typing.NewType, type):
102
# At runtime, `typing.NewType` returns an identity function rather
103
# than an actual type, but we can check whether that thing matches.
104
return (
0 commit comments