NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #539 most downloaded on PyPI
The property-based testing library for Python
Last release 4 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
Makes the deprecation warning for using the global random instance thread-safe, as part of our work towards thread safety (issue #4451).
Makes the deprecation warning for using the global random instance thread-safe, as part of our work towards thread safety (issue #4451).
The canonical version of these notes (with links) is on readthedocs.
Makes the deprecation warning for using the global random instance thread-safe, as part of our work towards thread safety (4451).
In order to de-flake "RecursionError" failures, Hypothesis sets a deterministic limit on "sys.setrecursionlimit". This patch makes the setting of this
One column per quarter.
In order to de-flake "RecursionError" failures, Hypothesis sets a deterministic limit on "sys.setrecursionlimit". This patch makes the setting of this limit aware of uses by Hypothesis from multiple threads, so it does not produce spurious warnings in multithreaded environments.
The canonical version of these notes (with links) is on readthedocs.
Improves the thread safety of caching strategy definitions, as well as usage of strategy transformations like ".map()" and ".filter()".
Improves the thread safety of caching strategy definitions, as well as usage of strategy transformations like ".map()" and ".filter()".
The canonical version of these notes (with links) is on readthedocs.
Improves the thread safety of caching strategy definitions, as well as usage of strategy transformations like |.map| and |.filter|.
Fix the thread safety of "@rule" definitions in "RuleBasedStateMachine".
Fix the thread safety of "@rule" definitions in "RuleBasedStateMachine".
The canonical version of these notes (with links) is on readthedocs.
Fix the thread safety of |@rule| definitions in |RuleBasedStateMachine|.
Fixes "reproduction_decorator" being missing under hypothesis-specific metadata in many observability observations, when it should have been present.
Fixes "reproduction_decorator" being missing under hypothesis-specific metadata in many observability observations, when it should have been present.
The canonical version of these notes (with links) is on readthedocs.
Fixes reproduction_decorator being missing under hypothesis-specific metadata in many observability observations, when it should have been present.
Improve threading compatibility of an internal helper for managing deterministic rng seeding.
Improve threading compatibility of an internal helper for managing deterministic rng seeding.
The canonical version of these notes (with links) is on readthedocs.
Improve threading compatibility of an internal helper for managing deterministic rng seeding.
Remove an internal assertion which could trigger if (1) a lambda was present in the source code of a test, (2) and the source code file was edited on
Remove an internal assertion which could trigger if (1) a lambda was present in the source code of a test, (2) and the source code file was edited on disk between the start of the python process and when Hypothesis runs the property.
The canonical version of these notes (with links) is on readthedocs.
Refactor some internals related to the shrinker for better compatibility with free-threading (issue #4451).
Refactor some internals related to the shrinker for better compatibility with free-threading (issue #4451).
The canonical version of these notes (with links) is on readthedocs.
Refactor some internals related to the shrinker for better compatibility with free-threading (4451).
Fixes an error when the "_pytest" module is present in "sys.modules", but *not* the "_pytest.outcomes" or "_pytest.fixtures" modules. This can happen
Fixes an error when the "_pytest" module is present in "sys.modules", but not the "_pytest.outcomes" or "_pytest.fixtures" modules. This can happen with code that imports just "_pytest", without importing "pytest".
The canonical version of these notes (with links) is on readthedocs.
Temporarily disable the warning when "shared()" strategies with the same "key" draw from different base strategies, due to false alarms. Once we fix t
Temporarily disable the warning when "shared()" strategies with the same "key" draw from different base strategies, due to false alarms. Once we fix the false alarms in a future release, the warning will be re-enabled.
The canonical version of these notes (with links) is on readthedocs.
Temporarily disable the warning when |st.shared| strategies with the same key draw from different base strategies, due to false alarms. Once we fix the false alarms in a future release, the warning will be re-enabled.
Speed up usages of "sampled_from()" by deferring evaluation of its repr, and truncating its repr for large collections (over 512 elements). This is es
Speed up usages of "sampled_from()" by deferring evaluation of its repr, and truncating its repr for large collections (over 512 elements). This is especially noticeable when using "sampled_from()" with large collections. The repr of "sampled_from()" strategies involving sequence classes with custom reprs may change as a result of this release.
The canonical version of these notes (with links) is on readthedocs.
Speed up usages of |st.sampled_from| by deferring evaluation of its repr, and truncating its repr for large collections (over 512 elements). This is especially noticeable when using |st.sampled_from| with large collections. The repr of |st.sampled_from| strategies involving sequence classes with custom reprs may change as a result of this release.
Fixes a substantial performance regression in stateful tests from computing string representations, present since version 6.131.20.
Fixes a substantial performance regression in stateful tests from computing string representations, present since version 6.131.20.
The canonical version of these notes (with links) is on readthedocs.
Fixes a substantial performance regression in stateful tests from computing string representations, present since version 6.131.20.
Fix a rare race condition in internal cache eviction logic.
Fix a rare race condition in internal cache eviction logic.
The canonical version of these notes (with links) is on readthedocs.
This patch fixes an error when importing our django extra (via "hypothesis.extra.django") if "django.contrib.auth" was not in "INSTALLED_APPS" (issue
This patch fixes an error when importing our django extra (via "hypothesis.extra.django") if "django.contrib.auth" was not in "INSTALLED_APPS" (issue #3716).
Thanks to Chris Wesseling for this fix!
The canonical version of these notes (with links) is on readthedocs.
Fix a rare race condition in "fetch()", where we might have read from a non-existent directory.
Fix a rare race condition in "fetch()", where we might have read from a non-existent directory.
The canonical version of these notes (with links) is on readthedocs.
Fix a rare race condition in |ExampleDatabase.fetch|, where we might have read from a non-existent directory.
Refactor some internal code related to patches to make it easier to test.
Refactor some internal code related to patches to make it easier to test.
The canonical version of these notes (with links) is on readthedocs.
Refactor some internal code related to patches to make it easier to test.
Add type hints to internal code for patching.
Add type hints to internal code for patching.
The canonical version of these notes (with links) is on readthedocs.
Fixes a race condition in "add_listener()" for "DirectoryBasedExampleDatabase" after version 6.135.1 where the listener might have tried to read a fil
Fixes a race condition in "add_listener()" for "DirectoryBasedExampleDatabase" after version 6.135.1 where the listener might have tried to read a file that doesn't exist.
The canonical version of these notes (with links) is on readthedocs.
Fixes a race condition in |ExampleDatabase.add_listener| for |DirectoryBasedExampleDatabase| after version 6.135.1 where the listener might have tried to read a file that doesn't exist.
This patch corrects the f-string formatting of a few array-related error messages.
This patch corrects the f-string formatting of a few array-related error messages.
The canonical version of these notes (with links) is on readthedocs.
This patch corrects the f-string formatting of a few array-related error messages.
Improve the error message when applying "@given" to a pytest fixture with pytest 8.4.0.
Improve the error message when applying "@given" to a pytest fixture with pytest 8.4.0.
The canonical version of these notes (with links) is on readthedocs.
Improve the error message when applying |@given| to a pytest fixture with pytest 8.4.0.
Further improve the performance of the constants-collection feature introduced in version 6.131.1, by ignoring large files and files with many constan
Further improve the performance of the constants-collection feature introduced in version 6.131.1, by ignoring large files and files with many constants.
The canonical version of these notes (with links) is on readthedocs.
Further improve the performance of the constants-collection feature introduced in version 6.131.1, by ignoring large files and files with many constants.
This release adds the experimental and unstable "OBSERVABILITY_CHOICES" option for observability. If set, the choice sequence is included in "metadata
This release adds the experimental and unstable "OBSERVABILITY_CHOICES" option for observability. If set, the choice sequence is included in "metadata.choice_nodes", and choice sequence spans are included in "metadata.choice_spans".
These are relatively low-level implementation detail of Hypothesis, and are exposed in observability for users building tools or research on top of Hypothesis. See "PrimitiveProvider" for more details about the choice sequence and choice spans.
We are actively working towards a better interface for this. Feel free to use "OBSERVABILITY_CHOICES" to experiment, but don't rely on it yet!
The canonical version of these notes (with links) is on readthedocs.
This patch restores compatibility when using the legacy Python 3.9 LL(1) parser yet again, because the fix in version 6.131.33 was too brittle.
This patch restores compatibility when using the legacy Python 3.9 LL(1) parser yet again, because the fix in version 6.131.33 was too brittle.
Thanks to Marco Ricci for this fix!
The canonical version of these notes (with links) is on readthedocs.
"DirectoryBasedExampleDatabase" now removes empty directories after "delete()" is called.
"DirectoryBasedExampleDatabase" now removes empty directories after "delete()" is called.
The canonical version of these notes (with links) is on readthedocs.
|DirectoryBasedExampleDatabase| now removes empty directories after |ExampleDatabase.delete| is called.
This release adds "run_conformance_test()", for use in testing implementations of alternative backends.
This release adds "run_conformance_test()", for use in testing implementations of alternative backends.
The canonical version of these notes (with links) is on readthedocs.
This release adds ~hypothesis.internal.conjecture.provider_conformance.run_conformance_test, for use in testing implementations of alternative backends.
This patch adds "hypothesis.extra.django.SimpleTestCase" (issue #4117)
This patch adds "hypothesis.extra.django.SimpleTestCase" (issue #4117)
Thanks to Chris Wesseling for this contribution!
The canonical version of these notes (with links) is on readthedocs.
This patch adds hypothesis.extra.django.SimpleTestCase (4117)
Thanks to Chris Wesseling for this contribution!
Internal changes to support hypofuzz.
Internal changes to support hypofuzz.
The canonical version of these notes (with links) is on readthedocs.
The "to_json" hook used internally when writing observability reports is now supported on nested dataclasses (in addition to outermost dataclasses).
The "to_json" hook used internally when writing observability reports is now supported on nested dataclasses (in addition to outermost dataclasses).
The canonical version of these notes (with links) is on readthedocs.
The to_json hook used internally when writing observability reports is now supported on nested dataclasses (in addition to outermost dataclasses).
Warn when "shared()" strategies with the same "key" draw from different base strategies. This could lead to subtle failures or lower-than-expected exa
Warn when "shared()" strategies with the same "key" draw from different base strategies. This could lead to subtle failures or lower-than-expected example coverage.
The canonical version of these notes (with links) is on readthedocs.
Warn when ~hypothesis.strategies.shared strategies with the same key draw from different base strategies. This could lead to subtle failures or lower-than-expected example coverage.
Add "on_observation()" to the internal alternative backends interface.
Add "on_observation()" to the internal alternative backends interface.
The canonical version of these notes (with links) is on readthedocs.
Add |PrimitiveProvider.on_observation| to the internal alternative backends interface.
This patch restores compatibility when using the legacy Python 3.9 LL(1) parser, which was accidentally broken since version 6.130.13.
This patch restores compatibility when using the legacy Python 3.9 LL(1) parser, which was accidentally broken since version 6.130.13.
Thanks to Marco Ricci for this fix!
The canonical version of these notes (with links) is on readthedocs.
fuzz_one_input now writes observability reports if observability is enabled, bringing it in line with the behavior of other standard ways to invoke a
fuzz_one_input now writes observability reports if observability is enabled, bringing it in line with the behavior of other standard ways to invoke a Hypothesis test.
The canonical version of these notes (with links) is on readthedocs.
fuzz_one_input now writes observability reports if observability is enabled, bringing it in line with the behavior of other standard ways to invoke a Hypothesis test.
Improve documentation of "@example".
Improve documentation of "@example".
The canonical version of these notes (with links) is on readthedocs.
This patch resolves a Pandas FutureWarning (issue #4400) caused by indexing with an integer key.
This patch resolves a Pandas FutureWarning (issue #4400) caused by indexing with an integer key.
The canonical version of these notes (with links) is on readthedocs.
This patch resolves a Pandas FutureWarning (4400) caused by indexing with an integer key.
The observations passed to "TESTCASE_CALLBACKS" are now dataclasses, rather than dictionaries. The content written to ".hypothesis/observed" under "HY
The observations passed to "TESTCASE_CALLBACKS" are now dataclasses, rather than dictionaries. The content written to ".hypothesis/observed" under "HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY" remains the same.
The canonical version of these notes (with links) is on readthedocs.
The observations passed to |TESTCASE_CALLBACKS| are now dataclasses, rather than dictionaries. The content written to .hypothesis/observed under HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY remains the same.
Add documentation to some internal APIs.
Add documentation to some internal APIs.
The canonical version of these notes (with links) is on readthedocs.
Add "PrimitiveProvider.replay_choices" to the alternative backends interface, to support warm-starting e.g. hypothesis-crosshair from hypofuzz.
Add "PrimitiveProvider.replay_choices" to the alternative backends interface, to support warm-starting e.g. hypothesis-crosshair from hypofuzz.
The canonical version of these notes (with links) is on readthedocs.
Add PrimitiveProvider.replay_choices to the alternative backends interface, to support warm-starting e.g. hypothesis-crosshair from hypofuzz.
Improve "ExampleDatabase" documentation.
Improve "ExampleDatabase" documentation.
The canonical version of these notes (with links) is on readthedocs.
*The canonical version of these notes (with links) is on readthedocs.*
Add some internal type hints.
The canonical version of these notes (with links) is on readthedocs.
Improve "@settings" documentation.
Improve "@settings" documentation.
The canonical version of these notes (with links) is on readthedocs.
This patch adds "GITLAB_CI" to the environment variables checked when enabling the default CI settings profile.
This patch adds "GITLAB_CI" to the environment variables checked when enabling the default CI settings profile.
Thanks to Genevieve Mendoza for this contribution!
The canonical version of these notes (with links) is on readthedocs.
This patch adds GITLAB_CI to the environment variables checked when enabling the default CI |settings| profile.
Thanks to Genevieve Mendoza for this contribution!
Include "note()" and "Phase.explain" output in the "representation" field of observability reports for failing examples, to more closely match the out
Include "note()" and "Phase.explain" output in the "representation" field of observability reports for failing examples, to more closely match the output produced by Hypothesis.
The canonical version of these notes (with links) is on readthedocs.
Include |note| and |Phase.explain| output in the "representation" field of observability reports for failing examples, to more closely match the output produced by Hypothesis.
"BackgroundWriteDatabase" instances now defer creating and starting a thread until first use.
"BackgroundWriteDatabase" instances now defer creating and starting a thread until first use.
The canonical version of these notes (with links) is on readthedocs.
|BackgroundWriteDatabase| instances now defer creating and starting a thread until first use.
Improve the string representation of "characters()" in some cases.
Improve the string representation of "characters()" in some cases.
The canonical version of these notes (with links) is on readthedocs.
Cap the length of bytestrings collected as part of the constants- collection feature introduced in version 6.131.1, as long bytestrings are unlikely t
Cap the length of bytestrings collected as part of the constants- collection feature introduced in version 6.131.1, as long bytestrings are unlikely to be useful.
The canonical version of these notes (with links) is on readthedocs.
Cap the length of bytestrings collected as part of the constants-collection feature introduced in version 6.131.1, as long bytestrings are unlikely to be useful.
All "ExampleDatabase" implementations in Hypothesis now implement "__eq__".
All "ExampleDatabase" implementations in Hypothesis now implement "eq".
The canonical version of these notes (with links) is on readthedocs.
All |ExampleDatabase| implementations in Hypothesis now implement __eq__.
Further improve the performance of the new features introduced in version 6.131.1, by improving unions of large sets.
Further improve the performance of the new features introduced in version 6.131.1, by improving unions of large sets.
The canonical version of these notes (with links) is on readthedocs.
Further improve the performance of the new features introduced in version 6.131.1, by improving unions of large sets.
Improve performance of an internal method to count possible choices.
Improve performance of an internal method to count possible choices.
The canonical version of these notes (with links) is on readthedocs.
Improves output when assigning values to multiple target bundles in a stateful rule (issue #4361).
Improves output when assigning values to multiple target bundles in a stateful rule (issue #4361).
The canonical version of these notes (with links) is on readthedocs.
Improves output when assigning values to multiple target bundles in a stateful rule (4361).
Internal optimization to reduce redundant choice sequence spans.
Internal optimization to reduce redundant choice sequence spans.
The canonical version of these notes (with links) is on readthedocs.
Add a "for_failure: bool = False" parameter to "provider.realize" in alternative backends, so that symbolic-based backends can increase their timeouts
Add a "for_failure: bool = False" parameter to "provider.realize" in alternative backends, so that symbolic-based backends can increase their timeouts when realizing failures, which are more important than regular examples.
The canonical version of these notes (with links) is on readthedocs.
Improve type hints for the single-argument form of "one_of()". "st.one_of(strategies)" now matches the type of "st.one_of(*strategies)". For instance,
Improve type hints for the single-argument form of "one_of()". "st.one_of(strategies)" now matches the type of "st.one_of(*strategies)". For instance, "st.one_of([st.integers(), st.none()])" now has the correct type of "SearchStrategy[int | None]" instead of "SearchStrategy[Any]".
The canonical version of these notes (with links) is on readthedocs.
Fix incorrectly reporting alternative backends as unsound in some cases.
Fix incorrectly reporting alternative backends as unsound in some cases.
The canonical version of these notes (with links) is on readthedocs.
Fix incorrectly reporting alternative backends as unsound in some cases.
Remove more false-positive locations from "Phase.explain" output, and add a new "metadata.reproduction_decorator" field in observability reports for f
Remove more false-positive locations from "Phase.explain" output, and add a new "metadata.reproduction_decorator" field in observability reports for failing examples.
The canonical version of these notes (with links) is on readthedocs.
Remove more false-positive locations from |Phase.explain| output, and add a new metadata.reproduction_decorator field in observability reports for failing examples.
Fix a "BytesWarning" after version 6.131.1 if the source code used the same value in both a normal and binary string.
Fix a "BytesWarning" after version 6.131.1 if the source code used the same value in both a normal and binary string.
The canonical version of these notes (with links) is on readthedocs.
Fix a BytesWarning after version 6.131.1 if the source code used the same value in both a normal and binary string.
"DirectoryBasedExampleDatabase" will now fall back to (potentially non-atomic) copies rather than renames, if the temporary directory used for atomic
"DirectoryBasedExampleDatabase" will now fall back to (potentially non-atomic) copies rather than renames, if the temporary directory used for atomic write-and-rename is on a different filesystem to the configured database location (issue #4335).
The canonical version of these notes (with links) is on readthedocs.
Further improve the performance of the new features introduced in version 6.131.1.
Further improve the performance of the new features introduced in version 6.131.1.
The canonical version of these notes (with links) is on readthedocs.
Further improve the performance of the new features introduced in version 6.131.1.
This patch makes the new features introduced in version 6.131.1 much faster, and fixes an internal "RecursionError" when working with deeply-nested co
This patch makes the new features introduced in version 6.131.1 much faster, and fixes an internal "RecursionError" when working with deeply-nested code.
The canonical version of these notes (with links) is on readthedocs.
This patch makes the new features introduced in version 6.131.1 much faster, and fixes an internal RecursionError when working with deeply-nested code.
Fix a rare case where database entries were kept after they were no longer needed when using "Phase.target".
Fix a rare case where database entries were kept after they were no longer needed when using "Phase.target".
The canonical version of these notes (with links) is on readthedocs.
Fix a rare case where database entries were kept after they were no longer needed when using |Phase.target|.
Internal refactoring of the "@settings" object, with no user-visible change.
Internal refactoring of the "@settings" object, with no user-visible change.
The canonical version of these notes (with links) is on readthedocs.
Internal refactoring of the |@settings| object, with no user-visible change.
Your coding agent can read these notes before it upgrades. Set up the MCP server →