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
This release deprecates the use of min_size=None, setting the default min_size to 0 (1618).
This release deprecates the use of min_size=None, setting the default min_size to 0 (1618).
This patch makes some small internal changes to comply with a new lint setting in the build. There should be no user-visible change.
This patch makes some small internal changes to comply with a new lint setting in the build. There should be no user-visible change.
One column per quarter.
This patch fixes 1153, where time spent reifying a strategy was also counted in the time spent generating the first example. Strategies are now fully
This patch fixes 1153, where time spent reifying a strategy was also counted in the time spent generating the first example. Strategies are now fully constructed and validated before the timer is started.
This patch fixes some broken formatting and links in the documentation.
This patch fixes some broken formatting and links in the documentation.
Being able to specify a boolean value was not intended, and is now deprecated. In addition, specifying True will now cause the blob to always be print…
This release checks that the value of the ~hypothesis.settings.print_blob setting is a PrintSettings instance.
Being able to specify a boolean value was not intended, and is now deprecated. In addition, specifying True will now cause the blob to always be printed, instead of causing it to be suppressed.
Specifying any value that is not a PrintSettings or a boolean is now an error.
…names min_value and max_value instead of the deprecated names
Changes the documentation for hypothesis.strategies.datetimes, hypothesis.strategies.dates, hypothesis.strategies.times to use the new parameter names min_value and max_value instead of the deprecated names
This patch ensures that Hypothesis deprecation warnings display the code that emitted them when you're not running in -Werror mode (652).
This patch ensures that Hypothesis deprecation warnings display the code that emitted them when you're not running in -Werror mode (652).
Tracebacks involving @composite are now slightly shorter due to some internal refactoring.
Tracebacks involving @composite are now slightly shorter due to some internal refactoring.
This patch fixes errors in the internal comments for one of the shrinker passes. There is no user-visible change.
This patch fixes errors in the internal comments for one of the shrinker passes. There is no user-visible change.
This patch substantially improves the distribution of data generated with ~hypothesis.strategies.recursive, and fixes a rare internal error (1502).
This patch substantially improves the distribution of data generated with ~hypothesis.strategies.recursive, and fixes a rare internal error (1502).
This patch substantially improves the distribution of data generated with recursive() , and fixes a rare internal error ( issue #1502 ).
This release adds the ~hypothesis.extra.dpcontracts.fulfill function, which is designed for testing code that uses dpcontracts 0.4 or later for input
This release adds the ~hypothesis.extra.dpcontracts.fulfill function, which is designed for testing code that uses dpcontracts 0.4 or later for input validation. This provides some syntactic sugar around use of ~hypothesis.assume, to automatically filter out and retry calls that cause a precondition check to fail (1474).
This release makes setting attributes of the hypothesis.settings class an explicit error. This has never had any effect, but could mislead users who c
This release makes setting attributes of the hypothesis.settings class an explicit error. This has never had any effect, but could mislead users who confused it with the current settings instance hypothesis.settings.default (which is also immutable). You can change the global settings with |settings.register_profile|.
This patch factors out some common code in the shrinker for iterating over pairs of data blocks. There should be no user-visible change.
This patch factors out some common code in the shrinker for iterating over pairs of data blocks. There should be no user-visible change.
This patch allows ~hypothesis.strategies.from_type to handle the empty tuple type, typing.Tuple[()] .
This patch allows ~hypothesis.strategies.from_type to handle the empty tuple type, typing.Tuple[()].
This patch allows from_type() to handle the empty tuple type, typing.Tuple[()] .
This patch updates some internal comments for mypy. There is no user-visible effect, even for Mypy users.
This patch updates some internal comments for mypy. There is no user-visible effect, even for Mypy users.
This patch fixes a rare bug that would cause a particular shrinker pass to raise an IndexError, if a shrink improvement changed the underlying data in
This patch fixes a rare bug that would cause a particular shrinker pass to raise an IndexError, if a shrink improvement changed the underlying data in an unexpected way.
This release fixes the broken cross-references in our docs, and adds a CI check so we don't add new ones.
This release fixes the broken cross-references in our docs, and adds a CI check so we don't add new ones.
This patch fixes two bugs (944 and 1521), where messages about @seed did not check the current verbosity setting, and the wrong settings were active w
This patch fixes two bugs (944 and 1521), where messages about @seed did not check the current verbosity setting, and the wrong settings were active while executing explicit examples from |@example|.
This patch fixes a DeprecationWarning added in Python 3.8 (1576).
This patch fixes a DeprecationWarning added in Python 3.8 (1576).
Thanks to tirkarthi for this contribution!
This is a no-op release, which implements automatic DOI minting and code archival of Hypothesis via Zenodo _. Thanks to CERN and the EU *Horizon 2020*
This is a no-op release, which implements automatic DOI minting and code archival of Hypothesis via Zenodo. Thanks to CERN and the EU Horizon 2020 programme for providing this service!
Check our CITATION.cff file for details, or head right on over to doi.org/10.5281/zenodo.1412597
This release adds the test name to some deprecation warnings, for easier debugging.
This release adds the test name to some deprecation warnings, for easier debugging.
Thanks to Sanyam Khurana for the patch!
This release makes Hypothesis's memory usage substantially smaller for tests with many examples, by bounding the number of past examples it keeps arou
This release makes Hypothesis's memory usage substantially smaller for tests with many examples, by bounding the number of past examples it keeps around.
You will not see much difference unless you are running tests with ~hypothesis.settings.max_examples set to well over 1000, but if you do have such tests then you should see memory usage mostly plateau where previously it would have grown linearly with time.
This patch adds internal comments to some tree traversals in the core engine. There is no user-visible change.
This patch adds internal comments to some tree traversals in the core engine. There is no user-visible change.
This release deprecates the coverage-guided testing functionality, as it has proven brittle and does not really pull its weight.
This release deprecates the coverage-guided testing functionality, as it has proven brittle and does not really pull its weight.
We intend to replace it with something more useful in the future, but the feature in its current form does not seem to be worth the cost of using, and whatever replaces it will likely look very different.
This patch changes the behaviour of ~hypothesis.reproduce_failure so that blobs are only printed in quiet mode when the ~hypothesis.settings.print_blo
This patch changes the behaviour of ~hypothesis.reproduce_failure so that blobs are only printed in quiet mode when the ~hypothesis.settings.print_blob setting is set to ALWAYS.
Thanks to Cameron McGill for writing this patch at the PyCon Australia sprints!
This patch changes the behaviour of reproduce_failure() so that blobs are only printed in quiet mode when the print_blob setting is set to ALWAYS .
Thanks to Cameron McGill for writing this patch at the PyCon Australia sprints!
This patch removes some unnecessary code from the internals. There is no user-visible change.
This patch removes some unnecessary code from the internals. There is no user-visible change.
This patch fixes an internal bug where a corrupted argument to @reproduce_failure could raise the wrong type of error. Thanks again to Paweł T. Jochym
This patch fixes an internal bug where a corrupted argument to @reproduce_failure could raise the wrong type of error. Thanks again to Paweł T. Jochym, who maintains Hypothesis on conda-forge and consistently provides excellent bug reports including 1558.
This patch updates hypothesis to report its version and settings when run with pytest. (1223).
This patch updates hypothesis to report its version and settings when run with pytest. (1223).
Thanks to Jack Massey for this feature.
This release adds a fullmatch argument to ~hypothesis.strategies.from_regex. When fullmatch=True, the whole example will match the regex pattern as fo
This release adds a fullmatch argument to ~hypothesis.strategies.from_regex. When fullmatch=True, the whole example will match the regex pattern as for python:re.fullmatch.
Thanks to Jakub Nabaglo for writing this patch at the PyCon Australia sprints!
This release adds a fullmatch argument to from_regex() . When fullmatch=True , the whole example will match the regex pattern as for re.fullmatch() .
Thanks to Jakub Nabaglo for writing this patch at the PyCon Australia sprints!
This release reverts the changes to logging handling in 3.69.11, which broke test that use the pytest caplog fixture internally because all logging wa
This release reverts the changes to logging handling in 3.69.11, which broke test that use the pytest caplog fixture internally because all logging was disabled (1546).
This patch will hide all logging messages produced by test cases before the final, minimal, failing test case (356).
This patch will hide all logging messages produced by test cases before the final, minimal, failing test case (356).
Thanks to Gary Donovan for writing this patch at the PyCon Australia sprints!
This patch fixes a bug that prevents coverage from reporting unexecuted Python files (1085).
This patch fixes a bug that prevents coverage from reporting unexecuted Python files (1085).
Thanks to Gary Donovan for writing this patch at the PyCon Australia sprints!
This patch improves the packaging of the Python package by adding LICENSE.txt to the sdist (1311), clarifying the minimum supported versions of pytz a
This patch improves the packaging of the Python package by adding LICENSE.txt to the sdist (1311), clarifying the minimum supported versions of pytz and dateutil (1383), and adds keywords to the metadata (1520).
Thanks to Graham Williamson for writing this patch at the PyCon Australia sprints!
This is an internal change which replaces pickle with json to prevent possible security issues.
This is an internal change which replaces pickle with json to prevent possible security issues.
Thanks to Vidya Rani D G for writing this patch at the PyCon Australia sprints!
This patch ensures that ~hypothesis.note prints the note for every test case when the ~hypothesis.settings.verbosity setting is Verbosity.verbose. At
This patch ensures that ~hypothesis.note prints the note for every test case when the ~hypothesis.settings.verbosity setting is Verbosity.verbose. At normal verbosity it only prints from the final test case.
Thanks to Tom McDermott for writing this patch at the PyCon Australia sprints!
This patch improves the testing of some internal caching. It should have no user-visible effect.
This patch improves the testing of some internal caching. It should have no user-visible effect.
This change performs a small rename and refactoring in the core engine. There is no user-visible change.
This change performs a small rename and refactoring in the core engine. There is no user-visible change.
This change improves the core engine's ability to avoid unnecessary work, by consulting its cache of previously-tried inputs in more cases.
This change improves the core engine's ability to avoid unnecessary work, by consulting its cache of previously-tried inputs in more cases.
This patch handles passing an empty python:enum.Enum to ~hypothesis.strategies.from_type by returning ~hypothesis.strategies.nothing, instead of raisi
This patch handles passing an empty python:enum.Enum to ~hypothesis.strategies.from_type by returning ~hypothesis.strategies.nothing, instead of raising an internal python:AssertionError.
Thanks to Paul Amazona for writing this patch at the PyCon Australia sprints!
This patch handles passing an empty enum.Enum to from_type() by returning nothing() , instead of raising an internal AssertionError .
Thanks to Paul Amazona for writing this patch at the PyCon Australia sprints!
This patch fixes a small mistake in an internal comment. There is no user-visible change.
This patch fixes a small mistake in an internal comment. There is no user-visible change.
This change fixes a small bug in how the core engine consults its cache of previously-tried inputs. There is unlikely to be any user-visible change.
This change fixes a small bug in how the core engine consults its cache of previously-tried inputs. There is unlikely to be any user-visible change.
Passing both the target and targets arguments is deprecated - append the target bundle to the targets tuple of bundles instead.
This release improves argument validation for stateful testing.
If the target or targets of a ~hypothesis.stateful.rule are invalid, we now raise a useful validation error rather than an internal exception.
Passing both the target and targets arguments is deprecated - append the target bundle to the targets tuple of bundles instead.
Passing the name of a Bundle rather than the Bundle itself is also deprecated.
This is a docs-only patch, fixing some typos and formatting issues.
This is a docs-only patch, fixing some typos and formatting issues.
This change fixes a small bug in how the core engine caches the results of previously-tried inputs. The effect is unlikely to be noticeable, but it mi
This change fixes a small bug in how the core engine caches the results of previously-tried inputs. The effect is unlikely to be noticeable, but it might avoid unnecessary work in some cases.
This patch documents the ~hypothesis.extra.numpy.from_dtype function, which infers a strategy for numpy:numpy.dtype\ s. This is used in ~hypothesis.ex
This patch documents the ~hypothesis.extra.numpy.from_dtype function, which infers a strategy for numpy:numpy.dtypes. This is used in ~hypothesis.extra.numpy.arrays, but can also be used directly when creating e.g. Pandas objects.
This patch documents the from_dtype() function, which infers a strategy for numpy.dtype s. This is used in arrays() , but can also be used directly when creating e.g. Pandas objects.
~hypothesis.extra.numpy.arrays now checks that integer and float values drawn from elements and fill strategies can be safely cast to the dtype of the
~hypothesis.extra.numpy.arrays now checks that integer and float values drawn from elements and fill strategies can be safely cast to the dtype of the array, and emits a warning otherwise (1385).
Elements in the resulting array could previously violate constraints on the elements strategy due to floating-point overflow or truncation of integers to fit smaller types.
This release contains a tiny refactoring of the internals. There is no user-visible change.
This release contains a tiny refactoring of the internals. There is no user-visible change.
This release adds a width argument to ~hypothesis.strategies.floats, to generate lower-precision floating point numbers for e.g. Numpy arrays.
This release adds a width argument to ~hypothesis.strategies.floats, to generate lower-precision floating point numbers for e.g. Numpy arrays.
The generated examples are always instances of Python's native float type, which is 64bit, but passing width=32 will ensure that all values can be exactly represented as 32bit floats. This can be useful to avoid overflow (to +/- infinity), and for efficiency of generation and shrinking.
Half-precision floats (width=16) are also supported, but require Numpy if you are running Python 3.5 or earlier.
This release fixes a bug in ~hypothesis.strategies.floats, where setting allow_infinity=False and exactly one of min_value and max_value would allow i
This release fixes a bug in ~hypothesis.strategies.floats, where setting allow_infinity=False and exactly one of min_value and max_value would allow infinite values to be generated.
This release adds type hints to the @example() and ~hypothesis.seed decorators, and fixes the type hint on ~hypothesis.strategies.register_type_strate
This release adds type hints to the @example() and ~hypothesis.seed decorators, and fixes the type hint on ~hypothesis.strategies.register_type_strategy. The second argument to ~hypothesis.strategies.register_type_strategy must either be a SearchStrategy, or a callable which takes a type and returns a SearchStrategy.
This release adds type hints to the @example() and seed() decorators, and fixes the type hint on register_type_strategy() . The second argument to register_type_strategy() must either be a SearchStrategy , or a callable which takes a type and returns a SearchStrategy .
Another set of changes designed to improve the performance of shrinking on large examples. In particular the shrinker should now spend considerably le
Another set of changes designed to improve the performance of shrinking on large examples. In particular the shrinker should now spend considerably less time running useless shrinks.
"Bug fixes and performance improvements".
"Bug fixes and performance improvements".
This release is a fairly major overhaul of the shrinker designed to improve its behaviour on large examples, especially around stateful testing. You should hopefully see shrinking become much faster, with little to no quality degradation (in some cases quality may even improve).
This release fixes two very minor bugs in the core engine:
This release fixes two very minor bugs in the core engine:
it fixes a corner case that was missing in 3.66.28, which should cause shrinking to work slightly better.
it fixes some logic for how shrinking interacts with the database that was causing Hypothesis to be insufficiently aggressive about clearing out old keys.
This release improves how Hypothesis handles reducing the size of integers' representation. This change should mostly be invisible as it's purely abou
This release improves how Hypothesis handles reducing the size of integers' representation. This change should mostly be invisible as it's purely about the underlying representation and not the generated value, but it may result in some improvements to shrink performance.
This release changes the order in which Hypothesis chooses parts of the test case to shrink. For typical usage this should be a significant performanc
This release changes the order in which Hypothesis chooses parts of the test case to shrink. For typical usage this should be a significant performance improvement on large examples. It is unlikely to have a major impact on example quality, but where it does change the result it should usually be an improvement.
This release improves the debugging information that the shrinker emits about the operations it performs, giving better summary statistics about which
This release improves the debugging information that the shrinker emits about the operations it performs, giving better summary statistics about which passes resulted in test executions and whether they were successful.
This release fixes several bugs that were introduced to the shrinker in 3.66.24 which would have caused it to behave significantly less well than adve
This release fixes several bugs that were introduced to the shrinker in 3.66.24 which would have caused it to behave significantly less well than advertised. With any luck you should actually see the promised benefits now.
This release changes how Hypothesis deletes data when shrinking in order to better handle deletion of large numbers of contiguous sequences. Most test
This release changes how Hypothesis deletes data when shrinking in order to better handle deletion of large numbers of contiguous sequences. Most tests should see little change, but this will hopefully provide a significant speed up for stateful testing.
This release makes some internal changes to enable further improvements to the shrinker. You may see some changes in the final shrunk examples, but th
This release makes some internal changes to enable further improvements to the shrinker. You may see some changes in the final shrunk examples, but they are unlikely to be significant.
This release adds some more internal caching to the shrinker. This should cause a significant speed up for shrinking, especially for stateful testing
This release adds some more internal caching to the shrinker. This should cause a significant speed up for shrinking, especially for stateful testing and large example sizes.
Your coding agent can read these notes before it upgrades. Set up the MCP server →