NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #407 most downloaded on PyPI
The property-based testing library for Python
Last release 7 days ago
28 Sep 2026
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
1571 releases · first in 2013
One column per quarter.
Add better error message for ~python:typing.TypeIs types in ~hypothesis.strategies.from_type.
Add better error message for ~python:typing.TypeIs types in ~hypothesis.strategies.from_type.
Support ~python:typing.LiteralString in ~hypothesis.strategies.from_type.
Support ~python:typing.LiteralString in ~hypothesis.strategies.from_type.
This patch makes progress towards adding type hints to our internal conjecture engine (3074).
This patch makes progress towards adding type hints to our internal conjecture engine (3074).
This release allows using ~python:typing.Annotated and !ReadOnly types for ~python:typing.TypedDict value types with ~hypothesis.strategies.from_type.
This release allows using ~python:typing.Annotated and !ReadOnly types for ~python:typing.TypedDict value types with ~hypothesis.strategies.from_type.
This release allows using Annotated and ReadOnly types for TypedDict value types with from_type() .
This patch fixes compatibility with attrs==24.1.0 on the nightly build of CPython, 3.14.0 pre-alpha (4067).
This patch fixes compatibility with attrs==24.1.0 on the nightly build of CPython, 3.14.0 pre-alpha (4067).
This patch removes an assertion which was in fact possible in rare circumstances involving a small number of very large draws.
This patch removes an assertion which was in fact possible in rare circumstances involving a small number of very large draws.
This patch improves our example generation performance by adjusting our internal cache implementation.
This patch improves our example generation performance by adjusting our internal cache implementation.
This patch improves our pretty-printer for unusual numbers.
This patch improves our pretty-printer for unusual numbers.
Signalling NaNs are now represented by using the struct module to show the exact value by converting from a hexadecimal integer
CPython limits integer-to-string conversions to mitigate DDOS attacks. We now use hexadecimal for very large integers, and include underscore separators for integers with ten or more digits.
This patch improves generation speed in some cases by avoiding pretty-printing overhead for non-failing examples.
This patch improves generation speed in some cases by avoiding pretty-printing overhead for non-failing examples.
This patch fixes a rare internal error when using ~hypothesis.strategies.integers with a high number of examples and certain {min, max}_value paramete
This patch fixes a rare internal error when using ~hypothesis.strategies.integers with a high number of examples and certain {min, max}_value parameters (4059).
This patch addresses the issue of hypothesis potentially accessing mocked time.perf_counter during test execution (4051).
This patch addresses the issue of hypothesis potentially accessing mocked time.perf_counter during test execution (4051).
Minor internal-only cleanups to some error-handling and reporting code.
Minor internal-only cleanups to some error-handling and reporting code.
This patch disables hypothesis.target on alternative backends where it would not work.
This patch disables hypothesis.target on alternative backends where it would not work.
This patch updates our vendored list of top-level domains __, which is used by the provisional ~hypothesis.provisional.domains strategy.
This patch updates our vendored list of top-level domains, which is used by the provisional ~hypothesis.provisional.domains strategy.
This patch changes most Flaky errors to use an ExceptionGroup, which makes the representation of these errors easier to understand.
This patch changes most Flaky errors to use an ExceptionGroup, which makes the representation of these errors easier to understand.
The alphabet= argument to ~hypothesis.strategies.from_regex now accepts unions of ~hypothesis.strategies.characters and ~hypothesis.strategies.sampled
The alphabet= argument to ~hypothesis.strategies.from_regex now accepts unions of ~hypothesis.strategies.characters and ~hypothesis.strategies.sampled_from strategies, in addition to accepting each individually.
This patch also fixes a bug where text(...).filter(re.compile(...).match) could generate non-matching instances if the regex pattern contained | (4008).
The alphabet= argument to from_regex() now accepts unions of characters() and sampled_from() strategies, in addition to accepting each individually.
This patch also fixes a bug where text(...).filter(re.compile(...).match) could generate non-matching instances if the regex pattern contained | ( issue #4008 ).
This patch improves our pretty-printer (4037).
This patch improves our pretty-printer (4037).
It also fixes the codemod for HealthCheck.all() from version 6.72, which was instead trying to fix Healthcheck.all() - note the lower-case c! Since our tests had the same typo, it all looked good... until 4030.
This release improves support for unions of numpy dtypes such as np.float64 | np.complex128 in ~hypothesis.strategies.from_type and ~hypothesis.extra.
This release improves support for unions of numpy dtypes such as np.float64 | np.complex128 in ~hypothesis.strategies.from_type and ~hypothesis.extra.numpy.arrays (4041).
This release improves support for unions of numpy dtypes such as np.float64 | np.complex128 in from_type() and arrays() ( issue #4041 ).
This patch improves the reporting of certain flaky errors.
This patch improves the reporting of certain flaky errors.
This patch iterates on our experimental support for alternative backends (alternative-backends). See 4029 for details.
This patch iterates on our experimental support for alternative backends (alternative-backends). See 4029 for details.
This patch iterates on our experimental support for alternative backends ( Alternative backends for Hypothesis ). See pull request #4029 for details.
This release improves support for Django 5.0, and drops support for end-of-life Django versions (< 4.2).
This release improves support for Django 5.0, and drops support for end-of-life Django versions (< 4.2).
Thanks to Joshua Munn for this contribution.
Clean up internal cache implementation.
Clean up internal cache implementation.
This patch updates our autoformatting tools, improving our code style without any API changes.
This patch updates our autoformatting tools, improving our code style without any API changes.
This patch fixes an issue when realizing symbolics with our experimental ~hypothesis.settings.backend setting.
This patch fixes an issue when realizing symbolics with our experimental ~hypothesis.settings.backend setting.
This patch fixes an issue when realizing symbolics with our experimental backend setting.
Improves internal test coverage.
Improves internal test coverage.
This release adds strategies for Django's ModelChoiceField and ModelMultipleChoiceField (4010).
This release adds strategies for Django's ModelChoiceField and ModelMultipleChoiceField (4010).
Thanks to Joshua Munn for this contribution.
Fixes and reinstates full coverage of internal tests, which was accidentally disabled in 3935 (4003).
Fixes and reinstates full coverage of internal tests, which was accidentally disabled in 3935 (4003).
This release prevents a race condition inside internal cache implementation.
This release prevents a race condition inside internal cache implementation.
This patch updates our vendored list of top-level domains __, which is used by the provisional ~hypothesis.provisional.domains strategy.
This patch updates our vendored list of top-level domains, which is used by the provisional ~hypothesis.provisional.domains strategy.
This patch improves our deduplication tracking across all strategies (4007). Hypothesis is now less likely to generate the same input twice.
This patch improves our deduplication tracking across all strategies (4007). Hypothesis is now less likely to generate the same input twice.
Account for time spent in garbage collection during tests, to avoid flaky DeadlineExceeded errors as seen in 3975.
Account for time spent in garbage collection during tests, to avoid flaky DeadlineExceeded errors as seen in 3975.
Also fixes overcounting of stateful run times, a minor observability bug dating to version 6.98.9 (3890).
This release migrates the shrinker to our new internal representation, called the IR layer (3962). This improves the shrinker's performance in the maj
This release migrates the shrinker to our new internal representation, called the IR layer (3962). This improves the shrinker's performance in the majority of cases. For example, on the Hypothesis test suite, shrinking is a median of 1.38x faster.
It is possible this release regresses performance while shrinking certain strategies. If you encounter strategies which reliably shrink more slowly than they used to (or shrink slowly at all), please open an issue!
You can read more about the IR layer at 3921.
This patch fixes one of our shrinking passes getting into a rare O(n) case instead of O(log(n)).
This patch fixes one of our shrinking passes getting into a rare O(n) case instead of O(log(n)).
This patch fixes some introspection errors new in Python 3.11.9 and 3.13.0b1, for the Ghostwriter and ~hypothesis.strategies.from_type.
This patch fixes some introspection errors new in Python 3.11.9 and 3.13.0b1, for the Ghostwriter and ~hypothesis.strategies.from_type.
Internal developer documentation, no user-visible changes.
Internal developer documentation, no user-visible changes.
This patch improves our shrinking of unique collections, such as ~hypothesis.strategies.dictionaries, ~hypothesis.strategies.sets, and ~hypothesis.str
This patch improves our shrinking of unique collections, such as ~hypothesis.strategies.dictionaries, ~hypothesis.strategies.sets, and ~hypothesis.strategies.lists with unique=True.
This patch improves our shrinking of unique collections, such as dictionaries() , sets() , and lists() with unique=True .
This patch fixes a rare internal error when generating very large elements from strategies (3874).
This patch fixes a rare internal error when generating very large elements from strategies (3874).
This patch fixes an overly strict internal type assertion.
This patch fixes an overly strict internal type assertion.
This release improves our support for the annotated-types iterable GroupedMetadata protocol. In order to treat the elements "as if they had been unpac
This release improves our support for the annotated-types iterable GroupedMetadata protocol. In order to treat the elements "as if they had been unpacked", if one such element is a ~hypothesis.strategies.SearchStrategy we now resolve to that strategy. Previously, we treated this as an unknown filter predicate.
We expect this to be useful for libraries implementing custom metadata - instead of requiring downstream integration, they can implement the protocol and yield a lazily-created strategy. Doing so only if Hypothesis is in sys.modules gives powerful integration with no runtime overhead or extra dependencies.
The ~hypothesis.extra.django.from_model function currently tries to create a strategy for ~django:django.db.models.AutoField fields if they don't have
The ~hypothesis.extra.django.from_model function currently tries to create a strategy for ~django:django.db.models.AutoField fields if they don't have ~django:django.db.models.Field.auto_created set to True. The docs say it's supposed to skip all ~django:django.db.models.AutoField fields, so this patch updates the code to do what the docs say (3978).
The from_model() function currently tries to create a strategy for AutoField fields if they don’t have auto_created set to True . The docs say it’s supposed to skip all AutoField fields, so this patch updates the code to do what the docs say ( issue #3978 ).
This patch adds some internal type annotations (3074). Thanks to Andrew Sansom for his contribution!
This patch adds some internal type annotations (3074). Thanks to Andrew Sansom for his contribution!
This patch fixes a rare internal error when using ~hypothesis.strategies.integers with a high max_examples setting (3974).
This patch fixes a rare internal error when using ~hypothesis.strategies.integers with a high max_examples setting (3974).
This patch fixes a rare internal error when using integers() with a high max_examples setting ( issue #3974 ).
This patch improves our internal caching logic. We don't expect it to result in any performance improvements (yet!).
This patch improves our internal caching logic. We don't expect it to result in any performance improvements (yet!).
This patch turns off a check in ~hypothesis.register_random for possibly unreferenced RNG instances on the free-threaded build of CPython 3.13 because
This patch turns off a check in ~hypothesis.register_random for possibly unreferenced RNG instances on the free-threaded build of CPython 3.13 because this check has a much higher false positive rate in the free-threaded build (3965).
Thanks to Nathan Goldbaum for this patch.
This patch turns off a warning for functions decorated with typing.overload and then ~hypothesis.strategies.composite, although only in that order (39
This patch turns off a warning for functions decorated with typing.overload and then ~hypothesis.strategies.composite, although only in that order (3970).
This patch turns off a warning for functions decorated with typing.overload() and then composite() , although only in that order ( issue #3970 ).
This patch fixes a significant slowdown when using the ~hypothesis.stateful.precondition decorator in some cases, due to expensive repr formatting int
This patch fixes a significant slowdown when using the ~hypothesis.stateful.precondition decorator in some cases, due to expensive repr formatting internally (3963).
This patch fixes a significant slowdown when using the precondition() decorator in some cases, due to expensive repr formatting internally ( issue #3963 ).
Explicitly cast numpy.finfo.smallest_normal to builtin float in preparation for the numpy==2.0 release (3950)
Explicitly cast numpy.finfo.smallest_normal to builtin float in preparation for the numpy==2.0 release (3950)
This patch improve a rare error message for flaky tests (3940).
This patch improve a rare error message for flaky tests (3940).
The ~hypothesis.extra.numpy.from_dtype function no longer generates NaT ("not-a-time") values for the datetime64 or timedelta64 dtypes if passed allow
The ~hypothesis.extra.numpy.from_dtype function no longer generates NaT ("not-a-time") values for the datetime64 or timedelta64 dtypes if passed allow_nan=False (3943).
This patch includes the ~hypothesis.settings.backend setting in the how_generated field of our observability output .
This patch includes the ~hypothesis.settings.backend setting in the how_generated field of our observability output.
This patch includes the backend setting in the how_generated field of our observability output .
If you were running Python 3.13 (currently in alpha) with pytest-xdist and then attempted to pretty-print a lambda functions which was created using t
If you were running Python 3.13 (currently in alpha) with pytest-xdist and then attempted to pretty-print a lambda functions which was created using the eval builtin, it would have raised an AssertionError. Now you'll get "lambda ...: <unknown>", as expected.
This release improves an internal invariant.
This release improves an internal invariant.
This patch fixes Hypothesis sometimes raising a Flaky error when generating collections of unique floats containing nan. See 3926 for more details.
This patch fixes Hypothesis sometimes raising a Flaky error when generating collections of unique floats containing nan. See 3926 for more details.
This patch continues our work on refactoring the shrinker (3921).
This patch continues our work on refactoring the shrinker (3921).
This patch continues our work on refactoring shrinker internals (3921).
This patch continues our work on refactoring shrinker internals (3921).
This release resolves exc:PermissionError that come from creating databases on inaccessible paths.
This release resolves PermissionError that come from creating databases on inaccessible paths.
This patch starts work on refactoring our shrinker internals. There is no user-visible change.
This patch starts work on refactoring our shrinker internals. There is no user-visible change.
This patch fixes a longstanding performance problem in stateful testing (3618), where state machines which generated a substantial amount of input for
This patch fixes a longstanding performance problem in stateful testing (3618), where state machines which generated a substantial amount of input for each step would hit the maximum amount of entropy and then fail with an Unsatisfiable error.
We now stop taking additional steps when we're approaching the entropy limit, which neatly resolves the problem without touching unaffected tests.
Fix regression caused by using 696 default in TypeVar with Python 3.13.0a3.
Fix regression caused by using 696 default in TypeVar with Python 3.13.0a3.
Fix regression caused by using PEP 696 default in TypeVar with Python 3.13.0a3.
This patch further improves the type annotations in hypothesis.extra.numpy.
This patch further improves the type annotations in hypothesis.extra.numpy.
Your coding agent can read these notes before it upgrades. Set up the MCP server →