Upgrading hypothesis 5 to 6
Breaking5.49.0 → 6.170.14Breaking11Platform6Deprecated6New42Changed146Fixed128Other190
Fetching 801 releases from GitHub…487 / 801
BreakingUpgrade verdict
11 breaking changes and 6 platform requirement changes.
In plain terms
- When using an alternative backend (such as hypothesis-crosshair), Hypothesis no longer emits a "test_case" observation for an iteration that the backend aborts via "BackendCannotProceed" before the…
- This patch improves the "Phase.explain" phase so that simple cases like "assert n1 == n2" no longer get a misleading "# or any other generated value" comment (issue ). Before falling back to random…
- If you do want to check ".hypothesis" into git, you can remove the ".gitignore" file.
- Remove some old unused code.
Must act Top 5 of 23 that need code or config changes
Python requirement changed in 6.169.0: >=3.6 → >=3.11.
Drops attrs.
Installs 1 package in all (was 2).
What you must change
Breaking11
When using an alternative backend (such as hypothesis-crosshair), Hypothesis no longer emits a "test_case" observation for an iteration that the backend aborts via "BackendCannotProceed" before the…
This patch improves the "Phase.explain" phase so that simple cases like "assert n1 == n2" no longer get a misleading "# or any other generated value" comment (issue ). Before falling back to random…
If you do want to check ".hypothesis" into git, you can remove the ".gitignore" file.
Remove some old unused code.
".example" no longer emits "NonInteractiveExampleWarning" when running a python file directly.
Remove a case where Hypothesis would interact with the global "random.Random" instance if Hypothesis internals were used directly.
This patch re-enables the warning for incompatible "shared" strategies that was first enabled in v6.133.0 but disabled in v6.135.15.
Requires SearchStrategy subclasses to call super().__init__(), which was previously not required.
SearchStrategysuper().__init__()The observations passed to TESTCASE_CALLBACKS are now dataclasses instead of dictionaries.
TESTCASE_CALLBACKSHYPOTHESIS_EXPERIMENTAL_OBSERVABILITY.hypothesis/observedNesting @given inside @given is now a health check failure, since it causes quadratic generation and shrinking.
@givendata()nested_givenThe example database uses a new internal format that is incompatible with the previous format, so stored entries will not carry over.
Platform6
Adds support for Python 3.16, which is still in alpha.
Drops support for Python 3.10, which reached end of life in October 2026.
Adds support for Python 3.15.
Simplify some internal typing logic after dropping Python 3.9.
This release drops support for Python 3.9, which reached end of life in October 2025.
Adds support for Python 3.14, which is currently in release candidate 1.
Deprecations to plan for
Deprecated6
Now, the historical behavior is working-but-deprecated, or an error if you explicitly pass "min_leaves=".
Calling "register_profile" from within a test decorated with "@settings" is now deprecated, to avoid confusion about which settings are used as the baseline for the new profile.
Instantiating "Verbosity", "Phase", or "HealthCheck" with an integer, such as "Verbosity(0)", is now deprecated.
Bounding "decimals" with other values that cannot be exactly represented is now deprecated; previously the bounds could be off by one.
Deprecates the previous TESTCASE_CALLBACKS in favor of the new observability interface methods.
TESTCASE_CALLBACKSWarns that OBSERVABILITY_CHOICES is experimental and unstable and should not be relied on yet.
OBSERVABILITY_CHOICESAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
export is_hypothesis_test
- removed:
function mkdir_p(path) - changed:
function set_hypothesis_home_dir(directory) → function set_hypothesis_home_dir(directory: str | Path | None) -> None - changed:
function storage_directory(*names) → function storage_directory(*names: str, intent_to_write: bool=…) -> StorageDirectory - added:
class StorageDirectory - added:
constructor StorageDirectory(path: Path, *, home_directory: Path) -> None - added:
function check_sideeffect_during_initialization(what: str, *fmt_args: object, is_restart: bool=…) -> None - added:
function notice_initialization_restarted(*, warn: bool=…) -> None - added:
method StorageDirectory.create_if_missing() -> None
- removed:
method BuildContext.close() - changed:
constructor BuildContext(data, is_final=…, close_on_capture=…) → constructor BuildContext(data: ConjectureData, *, is_final: bool=…, wrapped_test: Callable) -> None - changed:
function assume(condition: object) -> bool → function assume(condition: Literal[False] | None) -> NoReturn | (condition: object) -> Literal[True] - changed:
function cleanup(teardown) → function cleanup(teardown: Callable[[], Any]) -> None - changed:
function current_build_context() → function current_build_context() -> BuildContext - changed:
function event(value: str) -> None → function event(value: str, payload: Any=…) -> None - changed:
function note(value: str) -> None → function note(value: object) -> None - changed:
function should_note() → function should_note() -> bool - changed:
function target(observation: Union[int, float], *, label: str=…) -> None → function target(observation: int | float, *, label: str=…) -> int | float - added:
function deprecate_random_in_strategy(fmt: str, *args: Any) -> Generator[None, None, None] - added:
method BuildContext.prep_args_kwargs_from_strategies(kwarg_strategies: dict[str, Any]) -> tuple[dict[str, Any], ArgLabelsT] - added:
method BuildContext.record_call(obj: object, func: object, *, args: Sequence[object], kwargs: dict[str, object], arg_labels: ArgLabelsT | None=…) -> None
- removed:
class ArtificialDataForExample(ConjectureData) - removed:
class WithRunner(MappedSearchStrategy) - removed:
constructor ArtificialDataForExample(kwargs) - removed:
constructor WithRunner(base, runner) - removed:
function example(*args: Any, **kwargs: Any) -> Callable[[TestFunc], TestFunc] - removed:
function new_given_argspec(original_argspec, given_kwargs) - removed:
method ArtificialDataForExample.draw(strategy) - removed:
method ArtificialDataForExample.draw_bits(n) - removed:
method WithRunner.do_draw(data) - removed:
property HypothesisHandle.fuzz_one_input -> Callable[[Union[bytes, bytearray, memoryview, BinaryIO]], Optional[bytes]] - changed:
constructor StateForActualGivenExecution(test_runner, search_strategy, test, settings, random, wrapped_test) → constructor StateForActualGivenExecution(stuff: Stuff, test: Callable[..., Any], settings: Settings, random: Random, wrapped_test: Any, *, thread_overlap: dict[int, bool] | None=…) - changed:
field Example.args → field Example.args: Any - changed:
field Example.kwargs → field Example.kwargs: Any - changed:
field HypothesisHandle.inner_test → field HypothesisHandle.inner_test: Any - changed:
function decode_failure(blob) → function decode_failure(blob: bytes) -> Sequence[ChoiceT] - changed:
function encode_failure(buffer) → function encode_failure(choices: Iterable[ChoiceT]) -> bytes - changed:
function execute_explicit_examples(state, wrapped_test, arguments, kwargs) → function execute_explicit_examples(state, wrapped_test, arguments, kwargs, original_sig) - changed:
function failure_exceptions_to_catch() → function failure_exceptions_to_catch() -> tuple[type[BaseException], ...] - changed:
function find(specifier: SearchStrategy[Ex], condition: Callable[[Any], bool], *, settings: Optional[Settings]=…, random: Optional[Random]=…, database_key: Optional[bytes]=…) -> Ex → function find(specifier: SearchStrategy[Ex], condition: Callable[[Any], bool], *, settings: Settings | None=…, random: Random | None=…, database_key: bytes | None=…) -> Ex - changed:
function given(*_given_arguments: Union[SearchStrategy, InferType], **_given_kwargs: Union[SearchStrategy, InferType]) -> Callable[[Callable[..., None]], Callable[..., None]] → function given(_: EllipsisType, /) -> Callable[[Callable[..., Coroutine[Any, Any, None] | None]], Callable[[], None]] | (*_given_arguments: SearchStrategy[Any]) -> Callable[[Callable[..., Coroutine[Any, Any, None] | None]], Callable[..., None]] | (**_given_kwargs: SearchStrategy[Any] | EllipsisType) -> Callable[[Callable[..., Coroutine[Any, Any, None] | None]], Callable[..., None]] - changed:
function is_invalid_test(name, original_argspec, given_arguments, given_kwargs) → function is_invalid_test(test, original_sig, given_arguments, given_kwargs) - changed:
function process_arguments_to_given(wrapped_test, arguments, kwargs, given_kwargs, argspec) → function process_arguments_to_given(wrapped_test: Any, arguments: Sequence[object], kwargs: dict[str, object], given_kwargs: dict[str, SearchStrategy], params: dict[str, Parameter]) -> tuple[Sequence[object], dict[str, object], Stuff] - changed:
method StateForActualGivenExecution.execute_once(data, print_example=…, is_final=…, expected_failure=…) → method StateForActualGivenExecution.execute_once(data, *, print_test_case=…, is_final=…, expected_failure=…, example_kwargs=…) - added:
class ReportableError - added:
class Stuff - added:
class example - added:
constructor example(*args: Any, **kwargs: Any) -> None - added:
field Example.raises: Any - added:
field Example.reason: Any - added:
field ReportableError.exception: BaseException - added:
field ReportableError.fragments: list[str] - added:
field Stuff.args: tuple - added:
field Stuff.given_kwargs: dict - added:
field Stuff.kwargs: dict - added:
field Stuff.selfy: Any - added:
function default_executor(data, function) - added:
function get_executor(runner) - added:
function new_given_signature(original_sig, given_kwargs) - added:
function reproduction_decorator(choices: Iterable[ChoiceT]) -> str - added:
function unwrap_markers_from_group() -> Generator[None, None, None] - added:
method example.via(whence: str, /) -> example - added:
method example.xfail(condition: bool=…, *, reason: str=…, raises: type[BaseException] | tuple[type[BaseException], ...]=…) -> example - added:
property HypothesisHandle.fuzz_one_input -> Callable[[bytes | bytearray | memoryview | BinaryIO], bytes | None] - added:
property StateForActualGivenExecution.test_identifier -> str - added:
variable T - added:
variable pytest_shows_exceptiongroups - added:
variable threadlocal
- changed:
constructor DirectoryBasedExampleDatabase(path: str) -> None → constructor DirectoryBasedExampleDatabase(path: StrPathT) -> None - changed:
constructor InMemoryExampleDatabase() → constructor InMemoryExampleDatabase() -> None - added:
class GitHubArtifactDatabase(ExampleDatabase) - added:
constructor ExampleDatabase() -> None - added:
constructor GitHubArtifactDatabase(owner: str, repo: str, artifact_name: str=…, cache_timeout: timedelta=…, path: StrPathT | None=…) - added:
method ExampleDatabase.add_listener(f: ListenerT, /) -> None - added:
method ExampleDatabase.clear_listeners() -> None - added:
method ExampleDatabase.remove_listener(f: ListenerT, /) -> None - added:
method GitHubArtifactDatabase.delete(key: bytes, value: bytes) -> None - added:
method GitHubArtifactDatabase.fetch(key: bytes) -> Iterable[bytes] - added:
method GitHubArtifactDatabase.move(src: bytes, dest: bytes, value: bytes) -> None - added:
method GitHubArtifactDatabase.save(key: bytes, value: bytes) -> None
- removed:
function get_entry_points() - changed:
function run() → function run() -> None
- removed:
class CleanupFailed(HypothesisException) - removed:
class MultipleFailures(HypothesisException) - removed:
constructor FailedHealthCheck(message, check) - removed:
field Found.hypothesis_internal_never_escalate - changed:
class DeadlineExceeded(HypothesisException) → class DeadlineExceeded(_Trimmable) - changed:
class FailedHealthCheck(HypothesisWarning) → class FailedHealthCheck(_Trimmable) - changed:
class Flaky(HypothesisException) → class Flaky(_Trimmable) - changed:
class Found(Exception) → class Found(HypothesisException) - changed:
class InvalidArgument(HypothesisException, TypeError) → class InvalidArgument(_Trimmable, TypeError) - changed:
class InvalidDefinition(HypothesisException, TypeError) → class InvalidDefinition(_Trimmable, TypeError) - changed:
class Unsatisfiable(HypothesisException) → class Unsatisfiable(_Trimmable) - changed:
constructor DeadlineExceeded(runtime, deadline) → constructor DeadlineExceeded(runtime: timedelta, deadline: timedelta) -> None - changed:
constructor NoSuchExample(condition_string, extra=…) → constructor NoSuchExample(condition_string: str, extra: str=…) -> None - changed:
constructor StopTest(testcounter) → constructor StopTest(testcounter: int) -> None - added:
class BackendCannotProceed(HypothesisException) - added:
class CannotInvert(HypothesisException) - added:
class ChoiceTooLarge(HypothesisException) - added:
class FlakyBackendFailure(FlakyFailure) - added:
class FlakyFailure(ExceptionGroup, Flaky) - added:
class FlakyReplay(Flaky) - added:
class FlakyStrategyDefinition(Flaky) - added:
class HypothesisSideeffectWarning(HypothesisWarning) - added:
class NonRoundTrippableCharactersWarning(HypothesisWarning) - added:
class RewindRecursive(Exception) - added:
class SmallSearchSpaceWarning(HypothesisWarning) - added:
constructor BackendCannotProceed(scope: CannotProceedScopeT=…, /) -> None - added:
constructor FlakyReplay(reason, interesting_origins=…) - added:
constructor RewindRecursive(target: object) -> None - added:
constructor UnsatisfiedAssumption(reason: str | None=…, *, location: str | None=…) -> None - added:
method FlakyFailure.derive(excs) - added:
static method FlakyStrategyDefinition.from_mismatch(expected_type: str, expected_constraints: ChoiceConstraintsT, actual_type: str, actual_constraints: ChoiceConstraintsT) -> FlakyStrategyDefinition - added:
static method FlakyStrategyDefinition.with_detail(detail: str) -> FlakyStrategyDefinition - added:
variable CannotProceedScopeT - added:
variable ChoiceConstraintsT
- removed:
class ConjectureRunner - removed:
function default_executor(function) - removed:
function default_new_style_executor(data, function) - removed:
function executor(runner) - removed:
function new_style_executor(runner) - removed:
function setup_teardown_executor(setup, teardown) - removed:
method ConjectureRunner.hypothesis_execute_example_with_data(data, function)
- added:
function make_strategies_namespace(xp: Any, *, api_version: NominalVersion | None=…) -> SimpleNamespace
- changed:
function write(func, writer, except_, style) → function write(func, writer, except_, style, annotate) - added:
variable pytest
- added:
class HypothesisFixCharactersArguments(VisitorBasedCodemodCommand) - added:
class HypothesisFixHealthCheckAll(VisitorBasedCodemodCommand) - added:
field HypothesisFixCharactersArguments.DESCRIPTION - added:
field HypothesisFixCharactersArguments.METADATA_DEPENDENCIES - added:
field HypothesisFixHealthCheckAll.DESCRIPTION - added:
function get_fn(import_path) - added:
method HypothesisFixCharactersArguments.fn(original_node, updated_node) - added:
method HypothesisFixHealthCheckAll.replace_healthcheck(original_node, updated_node)
- added:
export LiveServerTestCase - added:
export SimpleTestCase - added:
export StaticLiveServerTestCase
- removed:
variable LOOK_FOR_UFUNCS_IN_MODULES - changed:
function binary_operation(func: Callable[[X, X], Y], *, associative: bool=…, commutative: bool=…, identity: Union[X, InferType, None]=…, distributes_over: Optional[Callable[[X, X], X]]=…, except_: Except=…, style: str=…) -> str → function binary_operation(func: Callable[[X, X], Y], *, associative: bool=…, commutative: bool=…, identity: X | EllipsisType | None=…, distributes_over: Callable[[X, X], X] | None=…, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function equivalent(*funcs: Callable, except_: Except=…, style: str=…) -> str → function equivalent(*funcs: Callable, allow_same_errors: bool=…, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function fuzz(func: Callable, *, except_: Except=…, style: str=…) -> str → function fuzz(func: Callable, *, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function idempotent(func: Callable, *, except_: Except=…, style: str=…) -> str → function idempotent(func: Callable, *, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function magic(*modules_or_functions: Union[Callable, types.ModuleType], except_: Except=…, style: str=…) -> str → function magic(*modules_or_functions: Callable | types.ModuleType, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function roundtrip(*funcs: Callable, except_: Except=…, style: str=…) -> str → function roundtrip(*funcs: Callable, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
function ufunc(func: Callable, *, except_: Except=…, style: str=…) -> str → function ufunc(func: Callable, *, except_: Except=…, style: str=…, annotate: bool | None=…) -> str - changed:
variable KNOWN_FUNCTION_LOCATIONS: Dict[object, str] → variable KNOWN_FUNCTION_LOCATIONS: dict[object, str] - added:
variable BOOL_NAMES - added:
variable EQUIV_CHECK_BLOCK - added:
variable EQUIV_FIRST_BLOCK - added:
variable FLOAT_NAMES - added:
variable ImportSet - added:
variable POSITIVE_INTEGER_NAMES - added:
variable STRING_NAMES
- changed:
function from_lark(grammar: lark.lark.Lark, *, start: Optional[str]=…, explicit: Optional[Dict[str, st.SearchStrategy[str]]]=…) -> st.SearchStrategy[str] → function from_lark(grammar: lark.lark.Lark, *, start: str | None=…, explicit: dict[str, st.SearchStrategy[str]] | None=…, alphabet: st.SearchStrategy[str]=…) -> st.SearchStrategy[str]
- removed:
class ArrayStrategy(SearchStrategy) - removed:
class BasicIndexStrategy(SearchStrategy) - removed:
class BroadcastableShapes(NamedTuple) - removed:
class MutuallyBroadcastableShapesStrategy(SearchStrategy) - removed:
constructor ArrayStrategy(element_strategy, shape, dtype, fill, unique) - removed:
constructor BasicIndexStrategy(shape, min_dims, max_dims, allow_ellipsis, allow_newaxis) - removed:
constructor MutuallyBroadcastableShapesStrategy(num_shapes, signature=…, base_shape=…, min_dims=…, max_dims=…, min_side=…, max_side=…) - removed:
field BroadcastableShapes.input_shapes: Tuple[Shape, ...] - removed:
field BroadcastableShapes.result_shape: Shape - removed:
function array_shapes(*, min_dims: int=…, max_dims: Optional[int]=…, min_side: int=…, max_side: Optional[int]=…) -> st.SearchStrategy[Shape] - removed:
function broadcastable_shapes(shape: Shape, *, min_dims: int=…, max_dims: Optional[int]=…, min_side: int=…, max_side: Optional[int]=…) -> st.SearchStrategy[Shape] - removed:
function check_argument(condition, fail_message, *f_args, **f_kwargs) - removed:
function defines_dtype_strategy(strat: T) -> T - removed:
function dtype_factory(kind, sizes, valid_sizes, endianness) - removed:
function fill_for(elements, unique, fill, name=…) - removed:
function order_check(name, floor, small, large) - removed:
function validate_time_slice(max_period, min_period) - removed:
method ArrayStrategy.do_draw(data) - removed:
method ArrayStrategy.set_element(data, result, idx, strategy=…) - removed:
method BasicIndexStrategy.do_draw(data) - removed:
method MutuallyBroadcastableShapesStrategy.do_draw(data) - removed:
variable BasicIndex - removed:
variable Shape - removed:
variable TIME_RESOLUTIONS - changed:
function arrays(dtype: Any, shape: Union[int, Shape, st.SearchStrategy[Shape]], *, elements: Optional[Union[SearchStrategy, Mapping[str, Any]]]=…, fill: Optional[st.SearchStrategy[Any]]=…, unique: bool=…) -> st.SearchStrategy[np.ndarray] → function arrays(dtype: Union[np.dtype[G], st.SearchStrategy[np.dtype[G]]], shape: int | st.SearchStrategy[int] | Shape | st.SearchStrategy[Shape], *, elements: st.SearchStrategy[Any] | Mapping[str, Any] | None=…, fill: st.SearchStrategy[Any] | None=…, unique: bool=…) -> st.SearchStrategy[NDArray[G]] | (dtype: D | st.SearchStrategy[D], shape: int | st.SearchStrategy[int] | Shape | st.SearchStrateg… - changed:
function basic_indices(shape: Shape, *, min_dims: int=…, max_dims: Optional[int]=…, allow_newaxis: bool=…, allow_ellipsis: bool=…) -> st.SearchStrategy[BasicIndex] → function basic_indices(shape: Shape, *, min_dims: int=…, max_dims: int | None=…, allow_newaxis: Literal[False]=…, allow_ellipsis: Literal[False]) -> st.SearchStrategy[_BIENoEllipsisNoNewaxis | tuple[_BIENoEllipsisNoNewaxis, ...]] | (shape: Shape, *, min_dims: int=…, max_dims: int | None=…, allow_newaxis: Literal[False]=…, allow_ellipsis: Literal[True]=…) -> st.SearchStrategy[_BIENoNewaxis | tuple… - changed:
function boolean_dtypes() -> st.SearchStrategy[np.dtype] → function boolean_dtypes() -> st.SearchStrategy[np.dtype[np.bool_]] - changed:
function byte_string_dtypes(*, endianness: str=…, min_len: int=…, max_len: int=…) -> st.SearchStrategy[np.dtype] → function byte_string_dtypes(*, endianness: str=…, min_len: int=…, max_len: int=…) -> st.SearchStrategy[np.dtype[np.bytes_]] - changed:
function complex_number_dtypes(*, endianness: str=…, sizes: Sequence[int]=…) -> st.SearchStrategy[np.dtype] → function complex_number_dtypes(*, endianness: str=…, sizes: Literal[64]) -> st.SearchStrategy[np.dtype[np.complex64]] | (*, endianness: str=…, sizes: Literal[128]) -> st.SearchStrategy[np.dtype[np.complex128]] | (*, endianness: str=…, sizes: Literal[256]) -> st.SearchStrategy[np.dtype[np.complex256]] | (*, endianness: str=…, sizes: Sequence[Literal[64, 128, 192, 256]]=…) -> st.SearchStrategy[np.d… - changed:
function datetime64_dtypes(*, max_period: str=…, min_period: str=…, endianness: str=…) -> st.SearchStrategy[np.dtype] → function datetime64_dtypes(*, max_period: str=…, min_period: str=…, endianness: str=…) -> st.SearchStrategy[np.dtype[np.datetime64]] - changed:
function floating_dtypes(*, endianness: str=…, sizes: Sequence[int]=…) -> st.SearchStrategy[np.dtype] → function floating_dtypes(*, endianness: str=…, sizes: Literal[16]) -> st.SearchStrategy[np.dtype[np.float16]] | (*, endianness: str=…, sizes: Literal[32]) -> st.SearchStrategy[np.dtype[np.float32]] | (*, endianness: str=…, sizes: Literal[64]) -> st.SearchStrategy[np.dtype[np.float64]] | (*, endianness: str=…, sizes: Literal[128]) -> st.SearchStrategy[np.dtype[np.float128]] | (*, endianness: str=…… - changed:
function from_dtype(dtype: np.dtype, *, alphabet: Optional[st.SearchStrategy[str]]=…, min_size: int=…, max_size: Optional[int]=…, min_value: Union[int, float, None]=…, max_value: Union[int, float, None]=…, allow_nan: Optional[bool]=…, allow_infinity: Optional[bool]=…, exclude_min: Optional[bool]=…, exclude_max: Optional[bool]=…) -> st.SearchStrategy[Any] → function from_dtype(dtype: np.dtype, *, alphabet: st.SearchStrategy[str] | None=…, min_size: int=…, max_size: int | None=…, min_value: int | float | None=…, max_value: int | float | None=…, allow_nan: bool | None=…, allow_infinity: bool | None=…, allow_subnormal: bool | None=…, exclude_min: bool | None=…, exclude_max: bool | None=…, min_magnitude: Real=…, max_magnitude: Real | None=…) -> st.Searc… - changed:
function integer_array_indices(shape: Shape, *, result_shape: SearchStrategy[Shape]=…, dtype: np.dtype=…) -> st.SearchStrategy[Tuple[np.ndarray, ...]] → function integer_array_indices(shape: Shape, *, result_shape: st.SearchStrategy[Shape]=…) -> st.SearchStrategy[tuple[NDArray[np.signedinteger[Any]], ...]] | (shape: Shape, *, result_shape: st.SearchStrategy[Shape]=…, dtype: np.dtype[I]) -> st.SearchStrategy[tuple[NDArray[I], ...]] - changed:
function integer_dtypes(*, endianness: str=…, sizes: Sequence[int]=…) -> st.SearchStrategy[np.dtype] → function integer_dtypes(*, endianness: str=…, sizes: Literal[8]) -> st.SearchStrategy[np.dtype[np.int8]] | (*, endianness: str=…, sizes: Literal[16]) -> st.SearchStrategy[np.dtype[np.int16]] | (*, endianness: str=…, sizes: Literal[32]) -> st.SearchStrategy[np.dtype[np.int32]] | (*, endianness: str=…, sizes: Literal[64]) -> st.SearchStrategy[np.dtype[np.int64]] | (*, endianness: str=…, sizes: Sequ… - changed:
function mutually_broadcastable_shapes(*, num_shapes: Union[UniqueIdentifier, int]=…, signature: Union[UniqueIdentifier, str]=…, base_shape: Shape=…, min_dims: int=…, max_dims: Optional[int]=…, min_side: int=…, max_side: Optional[int]=…) -> st.SearchStrategy[BroadcastableShapes] → function mutually_broadcastable_shapes(*args, **kwargs) - changed:
function nested_dtypes(subtype_strategy: st.SearchStrategy[np.dtype]=…, *, max_leaves: int=…, max_itemsize: Optional[int]=…) -> st.SearchStrategy[np.dtype] → function nested_dtypes(subtype_strategy: st.SearchStrategy[np.dtype]=…, *, max_leaves: int=…, max_itemsize: int | None=…) -> st.SearchStrategy[np.dtype] - changed:
function timedelta64_dtypes(*, max_period: str=…, min_period: str=…, endianness: str=…) -> st.SearchStrategy[np.dtype] → function timedelta64_dtypes(*, max_period: str=…, min_period: str=…, endianness: str=…) -> st.SearchStrategy[np.dtype[np.timedelta64]] - changed:
function unicode_string_dtypes(*, endianness: str=…, min_len: int=…, max_len: int=…) -> st.SearchStrategy[np.dtype] → function unicode_string_dtypes(*, endianness: str=…, min_len: int=…, max_len: int=…) -> st.SearchStrategy[np.dtype[np.str_]] - changed:
function unsigned_integer_dtypes(*, endianness: str=…, sizes: Sequence[int]=…) -> st.SearchStrategy[np.dtype] → function unsigned_integer_dtypes(*, endianness: str=…, sizes: Literal[8]) -> st.SearchStrategy[np.dtype[np.uint8]] | (*, endianness: str=…, sizes: Literal[16]) -> st.SearchStrategy[np.dtype[np.uint16]] | (*, endianness: str=…, sizes: Literal[32]) -> st.SearchStrategy[np.dtype[np.uint32]] | (*, endianness: str=…, sizes: Literal[64]) -> st.SearchStrategy[np.dtype[np.uint64]] | (*, endianness: str=…… - changed:
function valid_tuple_axes(ndim: int, *, min_size: int=…, max_size: Optional[int]=…) -> st.SearchStrategy[Shape] → function valid_tuple_axes(*args, **kwargs) - added:
export BroadcastableShapes - added:
export array_shapes - added:
export broadcastable_shapes
- removed:
function is_categorical_dtype(dt) - changed:
class column → class column(Generic[Ex]) - changed:
constructor ValueIndexStrategy(elements, dtype, min_size, max_size, unique) → constructor ValueIndexStrategy(elements, dtype, min_size, max_size, unique, name) - changed:
field column.dtype → field column.dtype: Any - changed:
field column.elements → field column.elements: st.SearchStrategy[Ex] | None - changed:
field column.fill → field column.fill: st.SearchStrategy[Ex] | None - changed:
field column.name → field column.name: str | int | None - changed:
field column.unique → field column.unique: bool - changed:
function columns(names_or_number: Union[int, Sequence[str]], *, dtype: Any=…, elements: Optional[st.SearchStrategy[Ex]]=…, fill: Optional[st.SearchStrategy[Ex]]=…, unique: bool=…) -> List[column] → function columns(names_or_number: int | Sequence[str], *, dtype: Any=…, elements: st.SearchStrategy[Ex] | None=…, fill: st.SearchStrategy[Ex] | None=…, unique: bool=…) -> list[column[Ex]] - changed:
function data_frames(columns: Optional[Sequence[column]]=…, *, rows: Optional[st.SearchStrategy[Union[dict, Sequence[Any]]]]=…, index: Optional[st.SearchStrategy[Ex]]=…) -> st.SearchStrategy[pandas.DataFrame] → function data_frames(columns: Sequence[column] | None=…, *, rows: st.SearchStrategy[dict | Sequence[Any]] | None=…, index: st.SearchStrategy[Ex] | None=…) -> st.SearchStrategy[pandas.DataFrame] - changed:
function indexes(*, elements: Optional[st.SearchStrategy[Ex]]=…, dtype: Any=…, min_size: int=…, max_size: Optional[int]=…, unique: bool=…) -> st.SearchStrategy[pandas.Index] → function indexes(*, elements: st.SearchStrategy[Ex] | None=…, dtype: Any=…, min_size: int=…, max_size: int | None=…, unique: bool=…, name: st.SearchStrategy[str | None]=…) -> st.SearchStrategy[pandas.Index] - changed:
function range_indexes(min_size: int=…, max_size: Optional[int]=…) -> st.SearchStrategy[pandas.RangeIndex] → function range_indexes(min_size: int=…, max_size: int | None=…, name: st.SearchStrategy[str | None]=…) -> st.SearchStrategy[pandas.RangeIndex] - changed:
function series(*, elements: Optional[st.SearchStrategy[Ex]]=…, dtype: Any=…, index: Optional[st.SearchStrategy[Union[Sequence, pandas.Index]]]=…, fill: Optional[st.SearchStrategy[Ex]]=…, unique: bool=…) -> st.SearchStrategy[pandas.Series] → function series(*, elements: st.SearchStrategy[Ex] | None=…, dtype: Any=…, index: st.SearchStrategy[Union[Sequence, pandas.Index]] | None=…, fill: st.SearchStrategy[Ex] | None=…, unique: bool=…, name: st.SearchStrategy[str | None]=…) -> st.SearchStrategy[pandas.Series] - added:
function attach_timezone(obj, tz) - added:
function datetime_tz_dtype(dtype) - added:
function has_constant_offset(tz) - added:
function naive_datetime64_dtype(tz_dtype) - added:
function tz_default_elements(tz_dtype) - added:
variable IntegerDtype - added:
variable PANDAS_GE_21
- removed:
class StoringReporter - removed:
constructor StoringReporter(config) - removed:
function load() - removed:
function pytest_addoption(parser) - removed:
function pytest_collection_modifyitems(items) - removed:
function pytest_configure(config) - removed:
function pytest_report_header(config) - removed:
function pytest_runtest_call(item) - removed:
function pytest_runtest_makereport(item, call) - removed:
function pytest_terminal_summary(terminalreporter) - removed:
variable LOAD_PROFILE_OPTION - removed:
variable PRINT_STATISTICS_OPTION - removed:
variable PYTEST_TOO_OLD_MESSAGE - removed:
variable SEED_OPTION - removed:
variable VERBOSITY_OPTION
- changed:
constructor RedisExampleDatabase(redis: Redis, *, expire_after: timedelta=…, key_prefix: bytes=…) → constructor RedisExampleDatabase(redis: Redis, *, expire_after: timedelta=…, key_prefix: bytes=…, listener_channel: str=…)
- removed:
property Entry.sort_key - changed:
class Entry → class Entry(Generic[K, V]) - changed:
class GenericCache → class GenericCache(Generic[K, V]) - changed:
class LRUReusedCache(GenericCache) → class LRUReusedCache(GenericCache[K, V]) - changed:
constructor GenericCache(max_size) → constructor GenericCache(max_size: int) - changed:
constructor LRUReusedCache(max_size) → constructor LRUReusedCache(max_size: int) - changed:
field Entry.key → field Entry.key: K - changed:
field Entry.pins → field Entry.pins: int - changed:
field Entry.score → field Entry.score: int - changed:
field Entry.value → field Entry.value: V - changed:
method GenericCache.check_valid() → method GenericCache.check_valid() -> None - changed:
method GenericCache.clear() → method GenericCache.clear() -> None - changed:
method GenericCache.is_pinned(key) → method GenericCache.is_pinned(key: K) -> bool - changed:
method GenericCache.new_entry(key, value) → method GenericCache.new_entry(key: K, value: V) -> int - changed:
method GenericCache.on_access(key, value, score) → method GenericCache.on_access(key: K, value: V, score: Any) -> Any - changed:
method GenericCache.on_evict(key, value, score) → method GenericCache.on_evict(key: K, value: V, score: Any) -> Any - changed:
method GenericCache.pin(key) → method GenericCache.pin(key: K, value: V) -> None - changed:
method GenericCache.unpin(key) → method GenericCache.unpin(key: K) -> None - changed:
method LRUReusedCache.new_entry(key, value) → method LRUReusedCache.new_entry(key: K, value: V) -> Any - changed:
method LRUReusedCache.on_access(key, value, score) → method LRUReusedCache.on_access(key: K, value: V, score: Any) -> Any - changed:
method LRUReusedCache.tick() → method LRUReusedCache.tick() -> int - added:
class LRUCache(Generic[K, V]) - added:
constructor LRUCache(max_size: int) -> None - added:
method LRUCache.check_valid() -> None - added:
property Entry.sort_key -> tuple[int, ...] - added:
property GenericCache.data -> list[Entry[K, V]] - added:
property GenericCache.keys_to_indices -> dict[K, int] - added:
property LRUCache.cache -> OrderedDict[K, V] - added:
variable K - added:
variable V
- removed:
function cathetus(h, a)
- removed:
variable cache_type - removed:
variable intervals - changed:
function as_general_categories(cats, name=…) → function as_general_categories(cats: Categories, name: str=…) -> CategoriesTuple - changed:
function categories() → function categories() -> CategoriesTuple - changed:
function charmap() → function charmap() -> dict[CategoryName, IntervalsT] - changed:
function charmap_file() → function charmap_file(fname: str=…) -> Path - changed:
function query(exclude_categories=…, include_categories=…, min_codepoint=…, max_codepoint=…, include_characters=…, exclude_characters=…) → function query(*, categories: Categories | None=…, min_codepoint: int | None=…, max_codepoint: int | None=…, include_characters: Collection[str]=…, exclude_characters: Collection[str]=…) -> IntervalSet - changed:
variable category_index_cache → variable category_index_cache: dict[frozenset[CategoryName], IntervalsT] - changed:
variable limited_category_index_cache → variable limited_category_index_cache: dict[tuple[CategoriesTuple, int, int, IntervalsT, IntervalsT], IntervalSet] - added:
function intervals_from_codec(codec_name: str) -> tuple[IntervalSet, IntervalSet] - added:
variable Categories: TypeAlias - added:
variable CategoriesTuple: TypeAlias - added:
variable CategoryName: TypeAlias
- removed:
function a_good_encoding() - removed:
function bit_length(n) - removed:
function cast_unicode(s, encoding=…) - removed:
function get_stream_enc(stream, default=…) - removed:
function qualname(f) - removed:
function str_to_bytes(s) - removed:
function to_unicode(x) - removed:
function update_code_location(code, newfile, newlineno) - removed:
variable ForwardRef - removed:
variable importlib_invalidate_caches - removed:
variable typing_root_type - changed:
function bad_django_TestCase(runner) → function bad_django_TestCase(runner: Optional[ConjectureRunner]) -> bool - changed:
function escape_unicode_characters(s) → function escape_unicode_characters(s: str) -> str - changed:
function get_type_hints(thing) → function get_type_hints(thing: object) -> dict[str, Any] - changed:
function int_from_bytes(data) → function int_from_bytes(data: bytes | bytearray) -> int - changed:
function int_to_byte(i) → function int_to_byte(i: int) -> bytes - changed:
function int_to_bytes(i, size) → function int_to_bytes(i: int, size: int) -> bytes - changed:
function is_typed_named_tuple(cls) → function is_typed_named_tuple(cls: type) -> bool - added:
function add_note(exc, note) - added:
function batched(iterable, n, *, strict=…) - added:
function dataclass_asdict(obj, *, dict_factory=…) - added:
function extract_bits(x: int, /, width: int | None=…) -> list[int] - added:
variable FREE_THREADED_CPYTHON - added:
variable GRAALPY - added:
variable batched - added:
variable dataclass_asdict - added:
variable override
- added:
class BooleanConstraints(TypedDict) - added:
class BytesConstraints(TypedDict) - added:
class ChoiceNode - added:
class ChoiceTemplate - added:
class FloatConstraints(TypedDict) - added:
class IntegerConstraints(TypedDict) - added:
class StringConstraints(TypedDict) - added:
class ValueHole - added:
field BooleanConstraints.p: float - added:
field BytesConstraints.max_size: int - added:
field BytesConstraints.min_size: int - added:
field ChoiceNode.constraints: ChoiceConstraintsT - added:
field ChoiceNode.index: int | None - added:
field ChoiceNode.type: ChoiceTypeT - added:
field ChoiceNode.value: ChoiceT - added:
field ChoiceNode.was_forced: bool - added:
field ChoiceTemplate.count: int | None - added:
field ChoiceTemplate.type: Literal['simplest'] - added:
field FloatConstraints.allow_nan: bool - added:
field FloatConstraints.max_value: float - added:
field FloatConstraints.min_value: float - added:
field FloatConstraints.smallest_nonzero_magnitude: float - added:
field IntegerConstraints.max_value: int | None - added:
field IntegerConstraints.min_value: int | None - added:
field IntegerConstraints.shrink_towards: int - added:
field IntegerConstraints.weights: dict[int, float] | None - added:
field StringConstraints.intervals: IntervalSet - added:
field StringConstraints.max_size: int - added:
field StringConstraints.min_size: int - added:
field ValueHole.value: object - added:
function choice_constraints_equal(choice_type: ChoiceTypeT, constraints1: ChoiceConstraintsT, constraints2: ChoiceConstraintsT) -> bool - added:
function choice_constraints_key(choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT) -> tuple[Hashable, ...] - added:
function choice_equal(choice1: ChoiceT, choice2: ChoiceT) -> bool - added:
function choice_from_index(index: int, choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT) -> ChoiceT - added:
function choice_key(choice: ChoiceT) -> ChoiceKeyT - added:
function choice_permitted(choice: ChoiceT, constraints: ChoiceConstraintsT) -> bool - added:
function choice_size(choice: ChoiceT) -> int - added:
function choice_to_index(choice: ChoiceT, constraints: ChoiceConstraintsT) -> int - added:
function choices_key(choices: Sequence[ChoiceT]) -> tuple[ChoiceKeyT, ...] - added:
function choices_size(choices: Iterable[ChoiceT]) -> int - added:
function collection_index(choice: Sequence[T], *, min_size: int, alphabet_size: int, to_order: Callable[[T], int]) -> int - added:
function collection_value(index: int, *, min_size: int, alphabet_size: int, from_order: Callable[[int], T]) -> list[T] - added:
function zigzag_index(value: int, *, shrink_towards: int) -> int - added:
function zigzag_value(index: int, *, shrink_towards: int) -> int - added:
method ChoiceNode.copy(*, with_value: ChoiceT | None=…, with_constraints: ChoiceConstraintsT | None=…) -> ChoiceNode - added:
property ChoiceNode.trivial -> bool - added:
variable ChoiceConstraintsT: TypeAlias - added:
variable ChoiceKeyT: TypeAlias - added:
variable ChoiceT: TypeAlias - added:
variable ChoiceTypeT: TypeAlias - added:
variable T
- removed:
class ChoiceTree - removed:
class Chooser - removed:
class DeadBranch(Exception) - removed:
class TreeNode - removed:
constructor ChoiceTree() - removed:
constructor Chooser(tree, selection_order) - removed:
constructor TreeNode() - removed:
function prefix_selection_order(prefix) - removed:
function random_selection_order(random) - removed:
method ChoiceTree.step(selection_order, f) - removed:
method Chooser.choose(values, condition=…) - removed:
method Chooser.finish() - removed:
property ChoiceTree.exhausted - removed:
property TreeNode.exhausted - removed:
variable DeadNode
- removed:
class Block - removed:
class Blocks - removed:
class Example - removed:
class ExampleProperty - removed:
class ExampleRecord - removed:
class Examples - removed:
class Examples.depths(ExampleProperty) - removed:
class Examples.discarded(ExampleProperty) - removed:
class Examples.label_indices(ExampleProperty) - removed:
class Examples.mutator_groups(ExampleProperty) - removed:
class Examples.parentage(ExampleProperty) - removed:
class Examples.starts_and_ends(ExampleProperty) - removed:
class Examples.trivial(ExampleProperty) - removed:
class ExtraInformation - removed:
constructor Blocks(owner) - removed:
constructor Example(owner, index) - removed:
constructor ExampleProperty(examples) - removed:
constructor ExampleRecord() - removed:
constructor Examples(record, blocks) - removed:
field Block.all_zero - removed:
field Block.end - removed:
field Block.forced - removed:
field Block.index - removed:
field Block.start - removed:
field ConjectureResult.blocks - removed:
field ConjectureResult.buffer - removed:
field ConjectureResult.examples - removed:
field ConjectureResult.extra_information - removed:
field ConjectureResult.forced_indices - removed:
field ConjectureResult.index - removed:
field ConjectureResult.output - removed:
function bits_to_bytes(n) - removed:
function calculated_example_property(cls) - removed:
method Blocks.add_endpoint(n) - removed:
method Blocks.all_bounds() - removed:
method Blocks.bounds(i) - removed:
method Blocks.end(i) - removed:
method Blocks.start(i) - removed:
method Blocks.transfer_ownership(new_owner) - removed:
method Blocks.trivial(i) - removed:
method ConjectureData.draw_bits(n, *, forced=…) - removed:
method ConjectureData.note_event(event) - removed:
method ConjectureData.start_example(label) - removed:
method ConjectureData.stop_example(discard=…) - removed:
method ConjectureData.write(string) - removed:
method DataObserver.draw_bits(n_bits, forced, value) - removed:
method ExampleProperty.begin() - removed:
method ExampleProperty.block(i) - removed:
method ExampleProperty.finish() - removed:
method ExampleProperty.run() - removed:
method ExampleProperty.start_example(i, label_index) - removed:
method ExampleProperty.stop_example(i, discarded) - removed:
method ExampleRecord.draw_bits(n, forced) - removed:
method ExampleRecord.freeze() - removed:
method ExampleRecord.start_example(label) - removed:
method ExampleRecord.stop_example(discard) - removed:
method Examples.depths.begin() - removed:
method Examples.depths.start_example(i, label_index) - removed:
method Examples.discarded.begin() - removed:
method Examples.discarded.finish() - removed:
method Examples.discarded.stop_example(i, discarded) - removed:
method Examples.label_indices.start_example(i, label_index) - removed:
method Examples.mutator_groups.begin() - removed:
method Examples.mutator_groups.finish() - removed:
method Examples.mutator_groups.start_example(i, label_index) - removed:
method Examples.parentage.stop_example(i, discarded) - removed:
method Examples.starts_and_ends.begin() - removed:
method Examples.starts_and_ends.finish() - removed:
method Examples.starts_and_ends.start_example(i, label_index) - removed:
method Examples.starts_and_ends.stop_example(i, label_index) - removed:
method Examples.trivial.begin() - removed:
method Examples.trivial.block(i) - removed:
method Examples.trivial.finish() - removed:
method Examples.trivial.stop_example(i, discarded) - removed:
method ExtraInformation.has_information() - removed:
property Block.bounds - removed:
property Block.length - removed:
property Block.trivial - removed:
property Blocks.last_block_length - removed:
property ConjectureData.examples - removed:
property Example.children - removed:
property Example.depth - removed:
property Example.discarded - removed:
property Example.end - removed:
property Example.label - removed:
property Example.length - removed:
property Example.parent - removed:
property Example.start - removed:
property Example.trivial - removed:
property Examples.children - removed:
property Examples.ends - removed:
property Examples.starts - removed:
static method ConjectureData.for_buffer(buffer, observer=…) - removed:
variable BYTE_MASKS - removed:
variable DRAW_BITS_RECORD - removed:
variable DRAW_BYTES_LABEL - removed:
variable START_EXAMPLE_RECORD - removed:
variable STOP_EXAMPLE_DISCARD_RECORD - removed:
variable STOP_EXAMPLE_NO_DISCARD_RECORD - removed:
variable global_test_counter - changed:
constructor ConjectureData(max_length, prefix, random, observer=…) → constructor ConjectureData(*, random: Random | None, observer: DataObserver | None=…, provider: PrimitiveProvider | type[PrimitiveProvider]=…, prefix: Sequence[ChoiceTemplate | ValueHole | ChoiceT] | None=…, max_choices: int | None=…, provider_kw: dict[str, Any] | None=…) -> None - changed:
field ConjectureResult.has_discards → field ConjectureResult.has_discards: bool - changed:
field ConjectureResult.interesting_origin → field ConjectureResult.interesting_origin: InterestingOrigin | None - changed:
field ConjectureResult.status → field ConjectureResult.status: Status - changed:
field ConjectureResult.tags → field ConjectureResult.tags: frozenset[StructuralCoverageTag] - changed:
field ConjectureResult.target_observations → field ConjectureResult.target_observations: TargetObservations - changed:
field StructuralCoverageTag.label → field StructuralCoverageTag.label: int - changed:
function structural_coverage(label) → function structural_coverage(label: int) -> StructuralCoverageTag - changed:
method ConjectureData.as_result() → method ConjectureData.as_result() -> ConjectureResult | _Overrun - changed:
method ConjectureData.conclude_test(status, interesting_origin=…) → method ConjectureData.conclude_test(status: Status, interesting_origin: InterestingOrigin | None=…) -> NoReturn - changed:
method ConjectureData.draw(strategy, label=…) → method ConjectureData.draw(strategy: SearchStrategy[Ex], label: int | None=…, observe_as: str | None=…) -> Ex - changed:
method ConjectureData.draw_bytes(n) → method ConjectureData.draw_bytes(min_size: int=…, max_size: int=…, *, forced: bytes | None=…, observe: bool=…) -> bytes - changed:
method ConjectureData.freeze() → method ConjectureData.freeze() -> None - changed:
method ConjectureData.mark_interesting(interesting_origin=…) → method ConjectureData.mark_interesting(interesting_origin: InterestingOrigin) -> NoReturn - changed:
method ConjectureData.mark_invalid() → method ConjectureData.mark_invalid(why: str | None=…, *, location: str | None=…) -> NoReturn - changed:
method ConjectureData.mark_overrun() → method ConjectureData.mark_overrun() -> NoReturn - changed:
method ConjectureData.note(value) → method ConjectureData.note(value: str) -> None - changed:
method ConjectureResult.as_result() → method ConjectureResult.as_result() -> ConjectureResult - changed:
method DataObserver.conclude_test(status, interesting_origin) → method DataObserver.conclude_test(status: Status, interesting_origin: InterestingOrigin | None) -> None - changed:
method DataObserver.kill_branch() → method DataObserver.kill_branch() -> None - changed:
variable STRUCTURAL_COVERAGE_CACHE → variable STRUCTURAL_COVERAGE_CACHE: dict[int, StructuralCoverageTag] - added:
class Span - added:
class SpanProperty - added:
class SpanRecord - added:
class Spans - added:
class TrailType(IntEnum) - added:
constructor Span(owner: Spans, index: int) -> None - added:
constructor SpanProperty(spans: Spans) - added:
constructor SpanRecord() -> None - added:
constructor Spans(record: SpanRecord) -> None - added:
field ConjectureResult.arg_spans: set[int] - added:
field ConjectureResult.cannot_proceed_scope: CannotProceedScopeT | None - added:
field ConjectureResult.expected_exception: BaseException | None - added:
field ConjectureResult.expected_traceback: str | None - added:
field ConjectureResult.length: int - added:
field ConjectureResult.misaligned_at: MisalignedAt | None - added:
field ConjectureResult.nodes: tuple[ChoiceNode, ...] - added:
field ConjectureResult.notes: list[str] - added:
field ConjectureResult.span_comments: dict[int | None, str] - added:
field ConjectureResult.spans: Spans - added:
field TrailType.CHOICE - added:
field TrailType.STOP_SPAN_DISCARD - added:
field TrailType.STOP_SPAN_NO_DISCARD - added:
function draw_choice(choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT, *, random: Random) -> ChoiceT - added:
method ConjectureData.choice(values: Sequence[T], *, forced: T | None=…, observe: bool=…) -> T - added:
method ConjectureData.draw_boolean(p: float=…, *, forced: bool | None=…, observe: bool=…) -> bool - added:
method ConjectureData.draw_float(min_value: float=…, max_value: float=…, *, allow_nan: bool=…, smallest_nonzero_magnitude: float=…, forced: float | None=…, observe: bool=…) -> float - added:
method ConjectureData.draw_integer(min_value: int | None=…, max_value: int | None=…, *, weights: dict[int, float] | None=…, shrink_towards: int=…, forced: int | None=…, observe: bool=…) -> int - added:
method ConjectureData.draw_string(intervals: IntervalSet, *, min_size: int=…, max_size: int=…, forced: str | None=…, observe: bool=…) -> str - added:
method ConjectureData.last_rejected_filter_location() -> str | None - added:
method ConjectureData.start_span(label: int) -> None - added:
method ConjectureData.stop_span(*, discard: bool=…) -> None - added:
method ConjectureData.track_arg_label(label: str) -> Generator[ArgLabelsT] - added:
method ConjectureData.track_arg_span() -> Generator[int] - added:
method DataObserver.draw_boolean(value: bool, *, constraints: BooleanConstraints, was_forced: bool) -> None - added:
method DataObserver.draw_bytes(value: bytes, *, constraints: BytesConstraints, was_forced: bool) -> None - added:
method DataObserver.draw_float(value: float, *, constraints: FloatConstraints, was_forced: bool) -> None - added:
method DataObserver.draw_integer(value: int, *, constraints: IntegerConstraints, was_forced: bool) -> None - added:
method DataObserver.draw_string(value: str, *, constraints: StringConstraints, was_forced: bool) -> None - added:
method SpanProperty.finish() -> Any - added:
method SpanProperty.run() -> Any - added:
method SpanProperty.start_span(i: int, label_index: int) -> None - added:
method SpanProperty.stop_span(i: int, *, discarded: bool) -> None - added:
method SpanRecord.freeze() -> None - added:
method SpanRecord.record_choice() -> None - added:
method SpanRecord.record_value_for_span(span_index: int, value: Any) -> None - added:
method SpanRecord.start_span(label: int) -> None - added:
method SpanRecord.stop_span(*, discard: bool) -> None - added:
property ConjectureData.choices -> tuple[ChoiceT, ...] - added:
property ConjectureData.next_span_index -> int - added:
property ConjectureData.nodes -> tuple[ChoiceNode, ...] - added:
property ConjectureData.spans -> Spans - added:
property ConjectureResult.choices -> tuple[ChoiceT, ...] - added:
property Span.children -> list[Span] - added:
property Span.choice_count -> int - added:
property Span.depth -> int - added:
property Span.discarded -> bool - added:
property Span.end -> int - added:
property Span.label -> int - added:
property Span.parent -> int | None - added:
property Span.recorded_value -> Any - added:
property Span.start -> int - added:
property Spans.children -> list[Sequence[int]] - added:
property Spans.depths -> IntList - added:
property Spans.discarded -> frozenset[int] - added:
property Spans.ends -> IntList - added:
property Spans.label_indices -> IntList - added:
property Spans.mutator_groups -> list[set[tuple[int, int]]] - added:
property Spans.parentage -> IntList - added:
property Spans.starts -> IntList - added:
property Spans.starts_and_ends -> tuple[IntList, IntList] - added:
static method ConjectureData.for_choices(choices: Sequence[ChoiceTemplate | ValueHole | ChoiceT], *, observer: DataObserver | None=…, provider: PrimitiveProvider | type[PrimitiveProvider]=…, random: Random | None=…) -> ConjectureData - added:
variable MisalignedAt: TypeAlias - added:
variable POOLED_CONSTRAINTS_CACHE: LRUCache[tuple[Any, ...], ChoiceConstraintsT] - added:
variable T - added:
variable TargetObservations - added:
variable UNIQUE_COLLECTION_LABEL - added:
variable no_recorded_value - added:
variable threadlocal
- removed:
field Branch.bit_length - removed:
field TreeNode.bit_lengths - removed:
function conclusion(status, interesting_origin) - removed:
function inconsistent_generation() - removed:
method TreeRecordingObserver.draw_bits(n_bits, forced, value) - removed:
property Branch.max_children - removed:
property DataTree.is_exhausted - removed:
property TreeNode.forced - removed:
variable CONCLUSIONS - changed:
constructor DataTree() → constructor DataTree() -> None - changed:
constructor TreeRecordingObserver(tree) → constructor TreeRecordingObserver(tree: DataTree) - changed:
field Branch.children → field Branch.children: dict[ChoiceT, TreeNode] - changed:
field Conclusion.interesting_origin → field Conclusion.interesting_origin: InterestingOrigin | None - changed:
field Conclusion.status → field Conclusion.status: Status - changed:
field Killed.next_node → field Killed.next_node: TreeNode - changed:
field TreeNode.is_exhausted → field TreeNode.is_exhausted: bool - changed:
field TreeNode.transition → field TreeNode.transition: Branch | Conclusion | Killed | None - changed:
field TreeNode.values → field TreeNode.values: list[ChoiceT] - changed:
method DataTree.generate_novel_prefix(random) → method DataTree.generate_novel_prefix(random: Random) -> tuple[ChoiceT, ...] - changed:
method DataTree.rewrite(buffer) → method DataTree.rewrite(choices) - changed:
method DataTree.simulate_test_function(data) → method DataTree.simulate_test_function(data: ConjectureData) -> None - changed:
method TreeNode.check_exhausted() → method TreeNode.check_exhausted() -> bool - changed:
method TreeNode.mark_forced(i) → method TreeNode.mark_forced(i: int) -> None - changed:
method TreeNode.split_at(i) → method TreeNode.split_at(i: int, *, new_value: object=…) -> None - changed:
method TreeRecordingObserver.conclude_test(status, interesting_origin) → method TreeRecordingObserver.conclude_test(status: Status, interesting_origin: InterestingOrigin | None) -> None - changed:
method TreeRecordingObserver.kill_branch() → method TreeRecordingObserver.kill_branch() -> None - changed:
variable EMPTY → variable EMPTY: frozenset[int] - added:
field Branch.choice_type: ChoiceTypeT - added:
field Branch.constraints: ChoiceConstraintsT - added:
field TreeNode.choice_types: list[ChoiceTypeT] - added:
field TreeNode.constraints: list[ChoiceConstraintsT] - added:
function all_children(choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT) -> Generator[ChoiceT, None, None] - added:
function compute_max_children(choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT) -> int - added:
method TreeRecordingObserver.draw_boolean(value: bool, *, was_forced: bool, constraints: BooleanConstraints) -> None - added:
method TreeRecordingObserver.draw_bytes(value: bytes, *, was_forced: bool, constraints: BytesConstraints) -> None - added:
method TreeRecordingObserver.draw_float(value: float, *, was_forced: bool, constraints: FloatConstraints) -> None - added:
method TreeRecordingObserver.draw_integer(value: int, *, was_forced: bool, constraints: IntegerConstraints) -> None - added:
method TreeRecordingObserver.draw_string(value: str, *, was_forced: bool, constraints: StringConstraints) -> None - added:
method TreeRecordingObserver.draw_value(choice_type: ChoiceTypeT, value: ChoiceT, *, was_forced: bool, constraints: ChoiceConstraintsT) -> None - added:
property Branch.max_children -> int - added:
property DataTree.is_exhausted -> bool - added:
property TreeNode.forced -> Set[int] - added:
variable ChildrenCacheValueT: TypeAlias - added:
variable MAX_CHILDREN_EFFECTIVELY_INFINITE: Final[int]
- removed:
class ConcreteDFA(DFA) - removed:
class DFA - removed:
constructor ConcreteDFA(transitions, accepting, start=…) - removed:
constructor DFA() - removed:
export proxies - removed:
function cached(fn) - removed:
method ConcreteDFA.is_accepting(i) - removed:
method ConcreteDFA.raw_transitions(i) - removed:
method ConcreteDFA.transition(state, char) - removed:
method DFA.all_matching_regions(string) - removed:
method DFA.all_matching_strings(min_length=…) - removed:
method DFA.all_matching_strings_of_length(k) - removed:
method DFA.canonicalise() - removed:
method DFA.count_strings(state, length) - removed:
method DFA.equivalent(other) - removed:
method DFA.has_strings(state, length) - removed:
method DFA.is_accepting(i) - removed:
method DFA.is_dead(state) - removed:
method DFA.is_live(state) - removed:
method DFA.matches(s) - removed:
method DFA.max_length(i) - removed:
method DFA.raw_transitions(i) - removed:
method DFA.successor_states(state) - removed:
method DFA.transition(i, c) - removed:
method DFA.transition_counts(state) - removed:
method DFA.transitions(i) - removed:
property ConcreteDFA.start - removed:
property DFA.alphabet - removed:
property DFA.start - removed:
variable DEAD
- removed:
class DistinguishedState - removed:
class IntegerNormalizer - removed:
class LStar - removed:
class LearnedDFA(DFA) - removed:
constructor IntegerNormalizer() - removed:
constructor LStar(member) - removed:
constructor LearnedDFA(lstar) - removed:
field DistinguishedState.accepting - removed:
field DistinguishedState.experiments - removed:
field DistinguishedState.index - removed:
field DistinguishedState.label - removed:
field DistinguishedState.transitions - removed:
method IntegerNormalizer.distinguish(value, test) - removed:
method IntegerNormalizer.normalize(value) - removed:
method IntegerNormalizer.representatives() - removed:
method LStar.is_accepting(i) - removed:
method LStar.label(i) - removed:
method LStar.learn(string) - removed:
method LStar.member(s) - removed:
method LStar.transition(i, c) - removed:
method LearnedDFA.is_accepting(i) - removed:
method LearnedDFA.label(i) - removed:
method LearnedDFA.successor_states(state) - removed:
method LearnedDFA.transition(i, c) - removed:
property LStar.generation - removed:
property LearnedDFA.start
- removed:
field HealthCheckState.invalid_examples - removed:
field HealthCheckState.overrun_examples - removed:
field HealthCheckState.valid_examples - removed:
method ConjectureRunner.downgrade_buffer(buffer) - removed:
method ConjectureRunner.event_to_string(event) - removed:
method ConjectureRunner.generate_new_examples() - removed:
method ConjectureRunner.has_existing_examples() - removed:
method ConjectureRunner.new_conjecture_data_for_buffer(buffer) - removed:
method ConjectureRunner.reuse_existing_examples() - removed:
method ConjectureRunner.save_buffer(buffer, sub_key=…) - removed:
method ConjectureRunner.shrink_interesting_examples() - removed:
property ConjectureRunner.database - removed:
property ConjectureRunner.pareto_key - removed:
property ConjectureRunner.report_debug_info - removed:
property ConjectureRunner.secondary_key - removed:
property ConjectureRunner.should_optimise - removed:
variable MUTATION_POOL_SIZE - changed:
constructor ConjectureRunner(test_function, settings=…, random=…, database_key=…, ignore_limits=…) → constructor ConjectureRunner(test_function: Callable[[ConjectureData], None], *, settings: Settings | None=…, random: Random | None=…, database_key: bytes | None=…, ignore_limits: bool=…, thread_overlap: dict[int, bool] | None=…) -> None - changed:
field HealthCheckState.draw_times → field HealthCheckState.draw_times: defaultdict[str, list[float]] - changed:
method ConjectureRunner.cached_test_function(buffer, error_on_discard=…, extend=…) → method ConjectureRunner.cached_test_function(choices: Sequence[ChoiceT | ChoiceTemplate | ValueHole], *, error_on_discard: bool=…, extend: int | Literal['full']=…) -> ConjectureResult | _Overrun - changed:
method ConjectureRunner.clear_call_explanation() → method ConjectureRunner.clear_call_explanation() -> None - changed:
method ConjectureRunner.clear_secondary_key() → method ConjectureRunner.clear_secondary_key() -> None - changed:
method ConjectureRunner.debug(message) → method ConjectureRunner.debug(message: str) -> None - changed:
method ConjectureRunner.debug_data(data) → method ConjectureRunner.debug_data(data: ConjectureData | ConjectureResult) -> None - changed:
method ConjectureRunner.exit_with(reason) → method ConjectureRunner.exit_with(reason: ExitReason) -> None - changed:
method ConjectureRunner.explain_next_call_as(explanation) → method ConjectureRunner.explain_next_call_as(explanation: str) -> None - changed:
method ConjectureRunner.generate_mutations_from(data) → method ConjectureRunner.generate_mutations_from(data: ConjectureData | ConjectureResult) -> None - changed:
method ConjectureRunner.generate_novel_prefix() → method ConjectureRunner.generate_novel_prefix() -> tuple[ChoiceT, ...] - changed:
method ConjectureRunner.new_conjecture_data(prefix, max_length=…, observer=…) → method ConjectureRunner.new_conjecture_data(prefix: Sequence[ChoiceT | ChoiceTemplate | ValueHole], *, observer: DataObserver | None=…, max_choices: int | None=…) -> ConjectureData - changed:
method ConjectureRunner.new_shrinker(example, predicate=…, allow_transition=…) → method ConjectureRunner.new_shrinker(initial: ConjectureData | ConjectureResult, predicate: ShrinkPredicateT | None=…, allow_transition: Callable[[ConjectureData | ConjectureResult, ConjectureData], bool] | None=…) -> Shrinker - changed:
method ConjectureRunner.on_pareto_evict(data) → method ConjectureRunner.on_pareto_evict(data: ConjectureResult) -> None - changed:
method ConjectureRunner.optimise_targets() → method ConjectureRunner.optimise_targets(*, max_valid: int | None=…) -> bool - changed:
method ConjectureRunner.pareto_optimise() → method ConjectureRunner.pareto_optimise() -> None - changed:
method ConjectureRunner.record_for_health_check(data) → method ConjectureRunner.record_for_health_check(data: ConjectureData) -> None - changed:
method ConjectureRunner.run() → method ConjectureRunner.run() -> None - changed:
method ConjectureRunner.should_generate_more() → method ConjectureRunner.should_generate_more() -> bool - changed:
method ConjectureRunner.shrink(example, predicate=…, allow_transition=…) → method ConjectureRunner.shrink(initial: ConjectureData | ConjectureResult, predicate: ShrinkPredicateT | None=…, allow_transition: Callable[[ConjectureData | ConjectureResult, ConjectureData], bool] | None=…) -> ConjectureData | ConjectureResult - changed:
method ConjectureRunner.sub_key(sub_key) → method ConjectureRunner.sub_key(sub_key: bytes | None) -> bytes - changed:
method ConjectureRunner.test_function(data) → method ConjectureRunner.test_function(data: ConjectureData) -> None - changed:
method ExitReason.describe(settings) → method ExitReason.describe(settings: Settings) -> str - changed:
variable BUFFER_SIZE → variable BUFFER_SIZE: int - changed:
variable CACHE_SIZE → variable CACHE_SIZE: int - changed:
variable MAX_SHRINKS → variable MAX_SHRINKS: int - changed:
variable MIN_TEST_CALLS → variable MIN_TEST_CALLS: int - added:
class CallStats(TypedDict) - added:
class DiscardObserver(DataObserver) - added:
field CallStats.drawtime: float - added:
field CallStats.events: list[str] - added:
field CallStats.gctime: float - added:
field CallStats.runtime: float - added:
field CallStats.status: str - added:
field HealthCheckState.invalid_test_cases: int - added:
field HealthCheckState.overrun_test_cases: int - added:
field HealthCheckState.valid_test_cases: int - added:
function choice_count(choices: Sequence[ChoiceT | ChoiceTemplate | ValueHole]) -> int | None - added:
function realize_choices(data: ConjectureData, *, for_failure: bool) -> None - added:
function shortlex(s) - added:
method ConjectureRunner.downgrade_choices(choices: Sequence[ChoiceT]) -> None - added:
method ConjectureRunner.generate_new_test_cases() -> None - added:
method ConjectureRunner.has_existing_test_cases() -> bool - added:
method ConjectureRunner.observe_for_provider() -> AbstractContextManager - added:
method ConjectureRunner.passing_choice_sequences(prefix: Sequence[ChoiceNode]=…) -> frozenset[tuple[ChoiceNode, ...]] - added:
method ConjectureRunner.reuse_existing_test_cases() -> None - added:
method ConjectureRunner.save_choices(choices: Sequence[ChoiceT], sub_key: bytes | None=…) -> None - added:
method ConjectureRunner.shrink_interesting_test_cases() -> None - added:
method DiscardObserver.kill_branch() -> NoReturn - added:
method HealthCheckState.timing_report() -> str - added:
property ConjectureRunner.database -> ExampleDatabase | None - added:
property ConjectureRunner.pareto_key -> bytes - added:
property ConjectureRunner.report_debug_info -> bool - added:
property ConjectureRunner.secondary_key -> bytes - added:
property ConjectureRunner.should_optimise -> bool - added:
property ConjectureRunner.using_hypothesis_backend -> bool - added:
property HealthCheckState.total_draw_time -> float - added:
variable INVALID_PER_VALID - added:
variable INVALID_THRESHOLD_BASE - added:
variable MAX_SHRINKING_SECONDS: int - added:
variable PhaseStatistics - added:
variable StatisticsDict
- removed:
function draw_float(data) - removed:
function write_float(data, f) - removed:
variable DRAW_FLOAT_LABEL - removed:
variable SPECIAL_EXPONENTS - changed:
function base_float_to_lex(f) → function base_float_to_lex(f: float) -> int - changed:
function decode_exponent(e) → function decode_exponent(e: int) -> int - changed:
function encode_exponent(e) → function encode_exponent(e: int) -> int - changed:
function exponent_key(e) → function exponent_key(e: int) -> float - changed:
function float_to_lex(f) → function float_to_lex(f: float) -> int - changed:
function is_simple(f) → function is_simple(f: float) -> int - changed:
function lex_to_float(i) → function lex_to_float(i: int) -> float - changed:
function reverse64(v) → function reverse64(v: int) -> int - changed:
function reverse_bits(x, n) → function reverse_bits(x: int, n: int) -> int - changed:
function reverse_byte(b) → function reverse_byte(b: int) -> int - changed:
function update_mantissa(unbiased_exponent, mantissa) → function update_mantissa(unbiased_exponent: int, mantissa: int) -> int
- removed:
class NotFound(Exception) - removed:
class SelfOrganisingList - removed:
constructor SelfOrganisingList(values=…) - removed:
function array_or_list(code, contents) - removed:
function clamp(lower, value, upper) - removed:
function pop_random(random, seq) - removed:
function swap(ls, i, j) - removed:
function uniform(random, n) - removed:
method SelfOrganisingList.add(value) - removed:
method SelfOrganisingList.find(condition) - removed:
variable ARRAY_CODES - removed:
variable NEXT_ARRAY_CODE - changed:
class IntList → class IntList(Sequence[int]) - changed:
class LazySequenceCopy → class LazySequenceCopy(Generic[T]) - changed:
constructor IntList(values=…) → constructor IntList(values: Sequence[int]=…) - changed:
constructor LazySequenceCopy(values) → constructor LazySequenceCopy(values: Sequence[T]) - changed:
function binary_search(lo, hi, f) → function binary_search(lo: int, hi: int, f: Callable[[int], bool]) -> int - changed:
function find_integer(f) → function find_integer(f: Callable[[int], bool]) -> int - changed:
function replace_all(buffer, replacements) → function replace_all(ls: Sequence[T], replacements: Iterable[tuple[int, int, Sequence[T]]]) -> list[T] - changed:
function stack_depth_of_caller() → function stack_depth_of_caller() -> int - changed:
method IntList.append(n) → method IntList.append(n: int) -> None - changed:
method IntList.count(n) → method IntList.count(value: int) -> int - changed:
method IntList.extend(ls) → method IntList.extend(ls: Iterable[int]) -> None - changed:
method IntList.insert(i, v) → method IntList.insert(i: int, v: int) -> None - changed:
method LazySequenceCopy.pop() → method LazySequenceCopy.pop(i: int=…) -> T - changed:
static method IntList.of_length(n) → static method IntList.of_length(n: int) -> IntList - added:
class StackframeLimiter - added:
class ensure_free_stackframes - added:
constructor StackframeLimiter() - added:
field IntList.ARRAY_CODES: ClassVar[list[str]] - added:
field IntList.NEXT_ARRAY_CODE: ClassVar[dict[str, str]] - added:
function bits_to_bytes(n: int) -> int - added:
function endswith(l1: Sequence[T], l2: Sequence[T]) -> bool - added:
function equal_values(a: Any, b: Any) -> bool - added:
function gc_cumulative_time() -> float - added:
function startswith(l1: Sequence[T], l2: Sequence[T]) -> bool - added:
method LazySequenceCopy.swap(i: int, j: int) -> None - added:
method StackframeLimiter.enter_context(new_limit: int, *, current_limit: int) -> None - added:
method StackframeLimiter.exit_context(new_limit: int, *, check: bool=…) -> None - added:
variable T
- removed:
method Optimiser.consider_new_test_data(data) - removed:
property Optimiser.current_score - changed:
constructor Optimiser(engine, data, target, max_improvements=…) → constructor Optimiser(engine: ConjectureRunner, data: ConjectureResult, target: str, max_improvements: int=…) -> None - changed:
method Optimiser.hill_climb() → method Optimiser.hill_climb() -> None - changed:
method Optimiser.run() → method Optimiser.run() -> None - changed:
method Optimiser.score_function(data) → method Optimiser.score_function(data: ConjectureResult) -> float - added:
method Optimiser.consider_new_data(data: ConjectureResult | _Overrun) -> bool - added:
property Optimiser.current_score -> float
- changed:
constructor ParetoFront(random) → constructor ParetoFront(random: Random) -> None - changed:
constructor ParetoOptimiser(engine) → constructor ParetoOptimiser(engine: ConjectureRunner) -> None - changed:
function dominance(left, right) → function dominance(left: ConjectureResult, right: ConjectureResult) -> DominanceRelation - changed:
method ParetoFront.add(data) → method ParetoFront.add(data: ConjectureData | ConjectureResult | _Overrun) -> bool - changed:
method ParetoFront.on_evict(f) → method ParetoFront.on_evict(f: Callable[[ConjectureResult], None]) -> None - changed:
method ParetoOptimiser.run() → method ParetoOptimiser.run() -> None
- added:
function boolean_constraints(draw: DrawFn, *, use_forced: bool=…) -> Any - added:
function build_intervals(intervals: list[int]) -> list[tuple[int, int]] - added:
function bytes_constraints(draw: DrawFn, *, use_min_size: bool | None=…, use_max_size: bool | None=…, use_forced: bool=…) -> Any - added:
function choice_types_constraints(strategy_constraints=…, *, use_forced=…) - added:
function constraints_strategy(choice_type, strategy_constraints=…, *, use_forced=…) - added:
function float_constraints(draw, *, use_min_value=…, use_max_value=…, use_forced=…) - added:
function integer_constraints(draw, *, use_min_value=…, use_max_value=…, use_shrink_towards=…, use_weights=…, use_forced=…) - added:
function integer_weights(draw: DrawFn, min_value: int | None=…, max_value: int | None=…) -> dict[int, float] - added:
function interval_lists(*, min_codepoint: int=…, max_codepoint: int=…, min_size: int=…) -> SearchStrategy[Iterable[Sequence[int]]] - added:
function intervals(*, min_codepoint: int=…, max_codepoint: int=…, min_size: int=…) -> SearchStrategy[IntervalSet] - added:
function run_conformance_test(Provider: type[PrimitiveProvider], *, provider_kw: dict[str, SearchStrategy[Any]] | None=…, context_manager_exceptions: Collection[type[BaseException]]=…, settings: Settings | None=…, check_findability: bool=…, _realize_objects: SearchStrategy[Any]=…) -> None - added:
function string_constraints(draw: DrawFn, *, use_min_size: bool | None=…, use_max_size: bool | None=…, use_forced: bool=…) -> Any
- added:
class BytestringProvider(PrimitiveProvider) - added:
class HypothesisProvider(PrimitiveProvider) - added:
class PrimitiveProvider(abc.ABC) - added:
class URandom(Random) - added:
class URandomProvider(HypothesisProvider) - added:
constructor BytestringProvider(conjecturedata: Optional[ConjectureData], /, *, bytestring: bytes) - added:
constructor HypothesisProvider(conjecturedata: Optional[ConjectureData], /) - added:
constructor PrimitiveProvider(conjecturedata: Optional[ConjectureData], /) -> None - added:
constructor URandomProvider(conjecturedata: Optional[ConjectureData], /) - added:
field BytestringProvider.lifetime - added:
field HypothesisProvider.lifetime - added:
field PrimitiveProvider.add_observability_callback: ClassVar[bool] - added:
field PrimitiveProvider.avoid_realization: ClassVar[bool] - added:
field PrimitiveProvider.lifetime: ClassVar[LifetimeT] - added:
function with_register_backend(name, provider_cls) - added:
method BytestringProvider.draw_boolean(p: float=…) -> bool - added:
method BytestringProvider.draw_bytes(min_size: int=…, max_size: int=…) -> bytes - added:
method BytestringProvider.draw_float(*, min_value: float=…, max_value: float=…, allow_nan: bool=…, smallest_nonzero_magnitude: float) -> float - added:
method BytestringProvider.draw_integer(min_value: int | None=…, max_value: int | None=…, *, weights: dict[int, float] | None=…, shrink_towards: int=…) -> int - added:
method BytestringProvider.draw_string(intervals: IntervalSet, *, min_size: int=…, max_size: int=…) -> str - added:
method HypothesisProvider.draw_boolean(p: float=…) -> bool - added:
method HypothesisProvider.draw_bytes(min_size: int=…, max_size: int=…) -> bytes - added:
method HypothesisProvider.draw_float(*, min_value: float=…, max_value: float=…, allow_nan: bool=…, smallest_nonzero_magnitude: float) -> float - added:
method HypothesisProvider.draw_integer(min_value: int | None=…, max_value: int | None=…, *, weights: dict[int, float] | None=…, shrink_towards: int=…) -> int - added:
method HypothesisProvider.draw_string(intervals: IntervalSet, *, min_size: int=…, max_size: int=…) -> str - added:
method PrimitiveProvider.draw_boolean(p: float=…) -> bool - added:
method PrimitiveProvider.draw_bytes(min_size: int=…, max_size: int=…) -> bytes - added:
method PrimitiveProvider.draw_float(*, min_value: float=…, max_value: float=…, allow_nan: bool=…, smallest_nonzero_magnitude: float) -> float - added:
method PrimitiveProvider.draw_integer(min_value: int | None=…, max_value: int | None=…, *, weights: dict[int, float] | None=…, shrink_towards: int=…) -> int - added:
method PrimitiveProvider.draw_string(intervals: IntervalSet, *, min_size: int=…, max_size: int=…) -> str - added:
method PrimitiveProvider.observe_information_messages(*, lifetime: LifetimeT) -> Iterable[_BackendInfoMsg] - added:
method PrimitiveProvider.observe_test_case() -> dict[str, Any] - added:
method PrimitiveProvider.on_observation(observation: TestCaseObservation) -> None - added:
method PrimitiveProvider.per_test_case_context_manager() -> AbstractContextManager - added:
method PrimitiveProvider.realize(value: T, *, for_failure: bool=…) -> T - added:
method PrimitiveProvider.replay_choices(choices: tuple[ChoiceT, ...]) -> None - added:
method PrimitiveProvider.span_end(discard: bool, /) -> None - added:
method PrimitiveProvider.span_start(label: int, /) -> None - added:
method URandom.getrandbits(k: int) -> int - added:
method URandom.random() -> float - added:
variable AVAILABLE_PROVIDERS: dict[str, str | type[PrimitiveProvider]] - added:
variable BYTE_MASKS - added:
variable COLLECTION_DEFAULT_MAX_SIZE - added:
variable CONSTANTS_CACHE: LRUCache[CacheKeyT, CacheValueT] - added:
variable CacheKeyT: TypeAlias - added:
variable CacheValueT: TypeAlias - added:
variable GLOBAL_CONSTANTS - added:
variable INTEGERS_DISTRIBUTION - added:
variable LifetimeT: TypeAlias - added:
variable T
- removed:
class ShrinkPassDefinition - removed:
field ShrinkPass.index - removed:
field ShrinkPass.run_with_chooser - removed:
field ShrinkPass.shrinker - removed:
field ShrinkPass.successes - removed:
field ShrinkPassDefinition.run_with_chooser - removed:
function block_program(self, chooser, description) - removed:
function defines_shrink_pass() - removed:
function dfa_replacement(self, chooser, dfa_name) - removed:
function non_zero_suffix(b) - removed:
function shrink_pass_family(f) - removed:
method ShrinkPass.step(random_order=…) - removed:
method Shrinker.add_new_pass(run) - removed:
method Shrinker.all_block_bounds() - removed:
method Shrinker.blocks_by_non_zero_suffix() - removed:
method Shrinker.consider_new_buffer(buffer) - removed:
method Shrinker.duplicated_block_suffixes() - removed:
method Shrinker.examples_by_label() - removed:
method Shrinker.incorporate_new_buffer(buffer) - removed:
method Shrinker.lower_blocks_together(chooser) - removed:
method Shrinker.lower_common_block_offset() - removed:
method Shrinker.match_cache() - removed:
method Shrinker.matching_regions(dfa) - removed:
method Shrinker.minimize_duplicated_blocks(chooser) - removed:
method Shrinker.minimize_floats(chooser) - removed:
method Shrinker.minimize_individual_blocks(chooser) - removed:
method Shrinker.redistribute_block_pairs(chooser) - removed:
method Shrinker.reorder_examples(chooser) - removed:
method Shrinker.run_block_program(i, description, original, repeats=…) - removed:
method Shrinker.shrink_pass(name) - removed:
method Shrinker.try_shrinking_blocks(blocks, b) - removed:
property ShrinkPass.name - removed:
property ShrinkPassDefinition.name - removed:
property Shrinker.blocks - removed:
property Shrinker.buffer - removed:
property Shrinker.calls - removed:
property Shrinker.examples - removed:
property Shrinker.random - removed:
variable SHRINK_PASS_DEFINITIONS - changed:
constructor Shrinker(engine, initial, predicate, allow_transition) → constructor Shrinker(engine: ConjectureRunner, initial: ConjectureData | ConjectureResult, predicate: ShrinkPredicateT | None, *, allow_transition: Callable[[ConjectureData | ConjectureResult, ConjectureData], bool] | None, explain: bool, in_target_phase: bool=…) - changed:
field ShrinkPass.calls → field ShrinkPass.calls: int - changed:
field ShrinkPass.deletions → field ShrinkPass.deletions: int - changed:
field ShrinkPass.last_prefix → field ShrinkPass.last_prefix: Any - changed:
field ShrinkPass.shrinks → field ShrinkPass.shrinks: int - changed:
function sort_key(buffer) → function sort_key(nodes: Sequence[ChoiceNode]) -> tuple[int, tuple[int, ...]] - changed:
method Shrinker.cached_test_function(buffer) → method Shrinker.cached_test_function(nodes: Sequence[ChoiceNode]) -> tuple[bool, ConjectureResult | _Overrun | None] - changed:
method Shrinker.debug(msg) → method Shrinker.debug(msg: str) -> None - changed:
method Shrinker.fixate_shrink_passes(passes) → method Shrinker.fixate_shrink_passes(passes: list[ShrinkPass]) -> None - changed:
method Shrinker.greedy_shrink() → method Shrinker.greedy_shrink() -> None - changed:
method Shrinker.shrink() → method Shrinker.shrink() -> None - changed:
method Shrinker.shrink_pass_choice_trees() → method Shrinker.shrink_pass_choice_trees() -> dict[Any, ChoiceTree] - added:
field ShrinkPass.function: Any - added:
field ShrinkPass.misaligned: int - added:
field ShrinkPass.name: str | None - added:
method Shrinker.check_calls() -> None - added:
method Shrinker.consider_new_nodes(nodes: Sequence[ChoiceNode]) -> bool - added:
method Shrinker.duplicated_nodes() - added:
method Shrinker.explain() -> None - added:
method Shrinker.initial_coarse_reduction() - added:
method Shrinker.lower_common_node_offset() - added:
method Shrinker.lower_duplicated_characters(chooser) - added:
method Shrinker.lower_integers_together(chooser) - added:
method Shrinker.minimize_duplicated_choices(chooser) - added:
method Shrinker.minimize_individual_choices(chooser) - added:
method Shrinker.minimize_nodes(nodes) - added:
method Shrinker.node_program(program: str) -> ShrinkPass - added:
method Shrinker.normalize_unicode_chars(chooser) - added:
method Shrinker.redistribute_numeric_pairs(chooser) - added:
method Shrinker.reduce_each_alternative() - added:
method Shrinker.reorder_spans(chooser) - added:
method Shrinker.run_node_program(i, program, original, repeats=…) - added:
method Shrinker.spans_by_label() - added:
method Shrinker.spans_starting_at() - added:
method Shrinker.step(shrink_pass: ShrinkPass, *, random_order: bool=…) -> bool - added:
method Shrinker.try_lower_node_as_alternative(i, v) - added:
method Shrinker.try_shrinking_nodes(nodes, n) - added:
method Shrinker.try_trivial_spans(chooser) - added:
method Shrinker.widen_to_span_with_recorded_value(chooser) - added:
property Shrinker.calls -> int - added:
property Shrinker.choices -> tuple[ChoiceT, ...] - added:
property Shrinker.misaligned -> int - added:
property Shrinker.nodes -> tuple[ChoiceNode, ...] - added:
property Shrinker.random -> Random - added:
property Shrinker.spans -> Spans - added:
variable ShrinkPredicateT: TypeAlias
- removed:
export Lexical - added:
export Bytes - added:
export Collection - added:
export String
- added:
class Bytes(Collection) - added:
constructor Bytes(initial, predicate, **kwargs)
- added:
class ChoiceTree - added:
class Chooser - added:
class DeadBranch(Exception) - added:
class TreeNode - added:
constructor ChoiceTree() -> None - added:
constructor Chooser(tree: ChoiceTree, selection_order: Callable[[int, int], Iterable[int]]) - added:
constructor TreeNode() -> None - added:
function prefix_selection_order(prefix: Sequence[int]) -> Callable[[int, int], Iterable[int]] - added:
function random_selection_order(random: Random) -> Callable[[int, int], Iterable[int]] - added:
method ChoiceTree.step(selection_order: Callable[[int, int], Iterable[int]], f: Callable[[Chooser], None]) -> Sequence[int] - added:
method Chooser.choose(values: Sequence[int], condition: Callable[[int], bool]=…) -> int - added:
method Chooser.finish() -> Sequence[int] - added:
property ChoiceTree.exhausted -> bool - added:
property TreeNode.exhausted -> bool - added:
variable DeadNode
- added:
class Collection(Shrinker) - added:
method Collection.left_is_better(left, right) - added:
method Collection.make_immutable(value) - added:
method Collection.run_step() - added:
method Collection.setup(*, ElementShrinker, min_size, to_order=…, from_order=…) - added:
method Collection.short_circuit()
- removed:
method Shrinker.incorporate(value) - removed:
property Shrinker.calls - changed:
constructor Shrinker(initial, predicate, random, full=…, debug=…, name=…, **kwargs) → constructor Shrinker(initial, predicate, *, full=…, debug=…, name=…, **kwargs) - changed:
method Shrinker.debug(*args) → method Shrinker.debug(*args: object) -> None - changed:
method Shrinker.setup(**kwargs) → method Shrinker.setup(*args, **kwargs) - changed:
method Shrinker.short_circuit() → method Shrinker.short_circuit() -> bool - added:
method Shrinker.make_canonical(value) - added:
property Shrinker.calls -> int
- removed:
class FailedToNormalise(HypothesisException) - removed:
function fully_shrink(runner, test_case, predicate) - removed:
function learn_a_new_dfa(runner, u, v, predicate) - removed:
function normalize(base_name, test_function, *, required_successes=…, allowed_to_update=…, max_dfas=…) - removed:
function update_learned_dfas()
- removed:
method Float.make_immutable(f) - removed:
variable MAX_PRECISE_INTEGER - added:
method Float.make_canonical(value)
- removed:
property Integer.size - added:
property Integer.size -> int
- removed:
variable SHRINKING_DFAS
- removed:
class Lexical(Shrinker) - removed:
method Lexical.check_invariants(value) - removed:
method Lexical.incorporate_int(i) - removed:
method Lexical.left_is_better(left, right) - removed:
method Lexical.make_immutable(value) - removed:
method Lexical.minimize_as_integer(full=…) - removed:
method Lexical.partial_sort() - removed:
method Lexical.run_step() - removed:
method Lexical.short_circuit() - removed:
property Lexical.current_int - removed:
property Lexical.size
- removed:
function identity(v)
- added:
class String(Collection) - added:
constructor String(initial, predicate, *, intervals, **kwargs)
- removed:
function biased_coin(data, p, *, forced=…) - removed:
function boolean(data) - removed:
function choice(data, values) - removed:
function fractional_float(data) - removed:
function integer_range(data, lower, upper, center=…) - removed:
method many.more() - removed:
variable BIASED_COIN_INNER_LABEL - removed:
variable BIASED_COIN_LABEL - removed:
variable FLOAT_PREFIX - removed:
variable FULL_FLOAT - removed:
variable INTEGER_RANGE_DRAW_LABEL - removed:
variable SAMPLE_IN_SAMPLER_LABLE - changed:
constructor Sampler(weights) → constructor Sampler(weights: Sequence[float], *, observe: bool=…) - changed:
constructor many(data, min_size, max_size, average_size) → constructor many(data: ConjectureData, min_size: int, max_size: int | float, average_size: int | float, *, forced: int | None=…, observe: bool=…) -> None - changed:
function calc_label_from_cls(cls) → function calc_label_from_cls(cls: type) -> int - changed:
function calc_label_from_name(name) → function calc_label_from_name(name: str) -> int - changed:
function check_sample(values, strategy_name) → function check_sample(values: type[enum.Enum] | Sequence[T], strategy_name: str) -> Sequence[T] - changed:
function combine_labels(*labels) → function combine_labels(*labels: int) -> int - changed:
method Sampler.sample(data) → method Sampler.sample(data: ConjectureData, *, forced: int | None=…) -> int - changed:
method many.reject() → method many.reject(why: str | None=…) -> None - added:
class invert_many - added:
constructor invert_many(min_size: int, max_size: int | float) -> None - added:
field Sampler.table: list[tuple[int, int, float]] - added:
function calc_label_from_callable(f: Callable) -> int - added:
function calc_label_from_hash(obj: object) -> int - added:
function compute_sampler_table(weights: tuple[float, ...]) -> list[tuple[int, int, float]] - added:
function fisher_yates_shuffle(data: ConjectureData, ls: list[T]) -> None - added:
function identity(v: T) -> T - added:
method invert_many.done() -> tuple[ChoiceT, ...] - added:
method invert_many.more() -> tuple[ChoiceT, ...] - added:
variable SAMPLE_IN_SAMPLER_LABEL - added:
variable SMALLEST_POSITIVE_FLOAT: float - added:
variable T
- added:
class ConstantVisitor(NodeVisitor) - added:
class Constants - added:
class TooManyConstants(Exception) - added:
constructor ConstantVisitor(*, limit: bool) - added:
constructor Constants(*, integers: MutableSet[int] | None=…, floats: MutableSet[float] | None=…, bytes: MutableSet[bytes] | None=…, strings: MutableSet[str] | None=…) - added:
field ConstantVisitor.CONSTANTS_LIMIT: int - added:
function constants_from_module(module: ModuleType, *, limit: bool=…) -> Constants - added:
function is_local_module_file(path: str) -> bool - added:
method ConstantVisitor.visit_Constant(node) - added:
method ConstantVisitor.visit_Expr(node: Expr) -> None - added:
method ConstantVisitor.visit_JoinedStr(node) - added:
method ConstantVisitor.visit_UnaryOp(node: UnaryOp) -> None - added:
method Constants.add(constant: ConstantT) -> None - added:
method Constants.set_for_type(constant_type: type[ConstantT] | ChoiceTypeT) -> MutableSet[int] | MutableSet[float] | MutableSet[bytes] | MutableSet[str] - added:
variable ConstantT: TypeAlias - added:
variable bytesT
- removed:
variable description_stack - changed:
function check_function(f) → function check_function(f: Func) -> Func - changed:
function pretty_file_name(f) → function pretty_file_name(f: str) -> str - changed:
variable pretty_file_name_cache → variable pretty_file_name_cache: dict[str, str] - changed:
variable written → variable written: set[tuple[str, bool]] - added:
variable Func
- changed:
function is_hypothesis_test(test) → function is_hypothesis_test(f: object) -> bool
- changed:
constructor NumpyRandomWrapper() → constructor NumpyRandomWrapper() -> None - changed:
function deterministic_PRNG(seed=…) → function deterministic_PRNG(seed: int=…) -> Generator[None, None, None] - changed:
function get_seeder_and_restorer(seed=…) → function get_seeder_and_restorer(seed: Hashable=…) -> tuple[Callable[[], None], Callable[[], None]] - changed:
function register_random(r: random.Random) -> None → function register_random(r: RandomLike) -> None - changed:
variable RANDOMS_TO_MANAGE → variable RANDOMS_TO_MANAGE: WeakValueDictionary[int, RandomLike] - added:
class RandomLike(Protocol) - added:
method RandomLike.getstate(*args: Any, **kwargs: Any) -> Any - added:
method RandomLike.seed(*args: Any, **kwargs: Any) -> Any - added:
method RandomLike.setstate(*args: Any, **kwargs: Any) -> Any - added:
variable NP_RANDOM: RandomLike | None - added:
variable RandomLike
- removed:
function escalate_hypothesis_internal_error() - removed:
variable HYPOTHESIS_CONTROL_EXCEPTIONS - removed:
variable PREVENT_ESCALATION - changed:
function belongs_to(package) → function belongs_to(package: ModuleType) -> Callable[[str], bool] - changed:
function get_trimmed_traceback() → function get_trimmed_traceback(exception: BaseException | None=…) -> TracebackType | None - changed:
variable FILE_CACHE → variable FILE_CACHE: dict[ModuleType, dict[str, bool]] - added:
class InterestingOrigin - added:
field InterestingOrigin.context: InterestingOrigin | tuple[()] - added:
field InterestingOrigin.exc_type: type[BaseException] - added:
field InterestingOrigin.filename: str | None - added:
field InterestingOrigin.group_elems: tuple[InterestingOrigin, ...] - added:
field InterestingOrigin.lineno: int | None - added:
function format_exception(err, tb) - added:
static method InterestingOrigin.from_exception(exception: BaseException, /, seen: tuple[BaseException, ...]=…) -> InterestingOrigin - added:
variable current_pytest_item
- added:
class ConstructivePredicate(NamedTuple) - added:
field ConstructivePredicate.constraints: dict[str, Any] - added:
field ConstructivePredicate.predicate: Predicate | None - added:
function comp_to_constraints(x: ast.AST, op: ast.AST, y: ast.AST, *, argname: str) -> dict - added:
function convert(node: ast.AST, argname: str) -> object - added:
function get_float_predicate_bounds(predicate: Predicate) -> ConstructivePredicate - added:
function get_integer_predicate_bounds(predicate: Predicate) -> ConstructivePredicate - added:
function get_numeric_predicate_bounds(predicate: Predicate) -> ConstructivePredicate - added:
function max_len(size: int, element: Collection[object]) -> bool - added:
function merge_preds(*con_predicates: ConstructivePredicate) -> ConstructivePredicate - added:
function min_len(size: int, element: Collection[object]) -> bool - added:
function numeric_bounds_from_ast(tree: ast.AST, argname: str, fallback: ConstructivePredicate) -> ConstructivePredicate - added:
static method ConstructivePredicate.unchanged(predicate: Predicate) -> ConstructivePredicate - added:
variable ARG - added:
variable Ex - added:
variable Placeholder - added:
variable Predicate
- removed:
function count_between_floats(x, y, width=…) - removed:
function float_of(x, width) - removed:
function float_to_int(value, width=…) - removed:
function int_to_float(value, width=…) - removed:
function is_negative(x) - removed:
function next_down(value, width=…) - removed:
function next_up(value, width=…) - removed:
function reinterpret_bits(x, from_, to) - removed:
function sign(x) - removed:
variable STRUCT_FORMATS - added:
function clamp(lower: int, value: int, upper: int) -> int | (lower: float, value: float, upper: float) -> float - added:
function make_float_clamper(min_value: float, max_value: float, *, allow_nan: bool, smallest_nonzero_magnitude: float) -> Callable[[float], float] - added:
function sign_aware_lte(x: float | int, y: float | int) -> bool - added:
variable MAX_PRECISE_INTEGER - added:
variable SIGNALING_NAN - added:
variable SMALLEST_SUBNORMAL - added:
variable mantissa_mask
- changed:
function fail_health_check(settings, message, label) → function fail_health_check(settings: Settings, message: str, health_check: HealthCheck) -> None
- changed:
constructor IntervalSet(intervals) → constructor IntervalSet(intervals: Iterable[Sequence[int]]=…) -> None - changed:
method IntervalSet.index(value) → method IntervalSet.index(value: int) -> int - changed:
method IntervalSet.index_above(value) → method IntervalSet.index_above(value: int) -> int - added:
method IntervalSet.char_in_shrink_order(i: int) -> str - added:
method IntervalSet.difference(other: Self) -> Self - added:
method IntervalSet.index_from_char_in_shrink_order(c: str) -> int - added:
method IntervalSet.intersection(other: Self) -> Self - added:
method IntervalSet.union(other: Self) -> Self - added:
static method IntervalSet.from_string(s: str) -> Self - added:
variable IntervalsT: TypeAlias
- added:
function extract_all_attributes(tree) - added:
function extract_all_lambdas(tree) - added:
function lambda_description(f) - added:
variable AST_LAMBDAS_CACHE: LRUCache[tuple[str], list[ast.Lambda]] - added:
variable LAMBDA_DESCRIPTION_CACHE: MutableMapping[Callable, str] - added:
variable LAMBDA_DIGEST_DESCRIPTION_CACHE: LRUCache[tuple[Any], str]
- removed:
class lazyformat - removed:
constructor lazyformat(format_string, *args)
- added:
class BaseObservation - added:
class InfoObservation(BaseObservation) - added:
class ObservationMetadata - added:
class PredicateCounts - added:
class TestCaseObservation(BaseObservation) - added:
field BaseObservation.property: str - added:
field BaseObservation.run_start: float - added:
field BaseObservation.type: Literal['test_case', 'info', 'alert', 'error'] - added:
field InfoObservation.content: str | dict - added:
field InfoObservation.title: str - added:
field InfoObservation.type: InfoObservationType - added:
field ObservationMetadata.backend: dict[str, Any] - added:
field ObservationMetadata.choice_nodes: tuple[ChoiceNode, ...] | None - added:
field ObservationMetadata.choice_spans: Optional[Spans] - added:
field ObservationMetadata.data_status: Status - added:
field ObservationMetadata.imported_at: float - added:
field ObservationMetadata.interesting_origin: InterestingOrigin | None - added:
field ObservationMetadata.notes: list[str] - added:
field ObservationMetadata.os_getpid: int - added:
field ObservationMetadata.phase: str - added:
field ObservationMetadata.predicates: dict[str, PredicateCounts] - added:
field ObservationMetadata.reproduction_decorator: str | None - added:
field ObservationMetadata.status_reason_location: str | None - added:
field ObservationMetadata.sys_argv: list[str] - added:
field ObservationMetadata.traceback: str | None - added:
field PredicateCounts.satisfied: int - added:
field PredicateCounts.unsatisfied: int - added:
field TestCaseObservation.arguments: dict - added:
field TestCaseObservation.coverage: dict[str, list[int]] | None - added:
field TestCaseObservation.features: dict - added:
field TestCaseObservation.how_generated: str - added:
field TestCaseObservation.metadata: ObservationMetadata - added:
field TestCaseObservation.representation: str - added:
field TestCaseObservation.status: TestCaseStatus - added:
field TestCaseObservation.status_reason: str - added:
field TestCaseObservation.timing: dict[str, float] - added:
field TestCaseObservation.type: Literal['test_case'] - added:
function add_observability_callback(f: CallbackT, /, *, all_threads: bool=…) -> None - added:
function choices_to_json(choices: tuple[ChoiceT, ...]) -> list[Any] - added:
function deliver_observation(observation: Observation) -> None - added:
function make_testcase(*, run_start: float, property: str, data: ConjectureData, how_generated: str, representation: str=…, timing: dict[str, float], arguments: dict | None=…, coverage: dict[str, list[int]] | None=…, phase: str | None=…, backend_metadata: dict[str, Any] | None=…, status: Union[TestCaseStatus, Status] | None=…, status_reason: str | None=…, metadata: dict[str, Any] | None=…) -> Tes… - added:
function nodes_to_json(nodes: tuple[ChoiceNode, ...]) -> list[dict[str, Any]] - added:
function observability_enabled() -> bool - added:
function remove_observability_callback(f: CallbackT, /) -> None - added:
function with_observability_callback(f: Callable[[Observation], None], /, *, all_threads: bool=…) -> Generator[None, None, None] - added:
method ObservationMetadata.to_json() -> dict[str, Any] - added:
method PredicateCounts.update_count(*, condition: bool) -> None - added:
variable CallbackAllThreadsT: TypeAlias - added:
variable CallbackT: TypeAlias - added:
variable CallbackThreadT: TypeAlias - added:
variable InfoObservationType - added:
variable OBSERVABILITY_CHOICES - added:
variable OBSERVABILITY_COLLECT_COVERAGE - added:
variable Observation: TypeAlias - added:
variable TESTCASE_CALLBACKS - added:
variable TestCaseStatus
- removed:
function arg_string(f, args, kwargs, reorder=…) - removed:
function args_for_lambda_ast(l) - removed:
function deprecated_posargs(func: C) -> C - removed:
function extract_all_lambdas(tree) - removed:
function extract_lambda_source(f) - removed:
function fully_qualified_name(f) - removed:
function unbind_method(f) - removed:
variable C - removed:
variable COPY_ARGSPEC_SCRIPT - removed:
variable LINE_CONTINUATION - removed:
variable PROBABLY_A_COMMENT - removed:
variable READTHEDOCS - removed:
variable SPACE_FOLLOWS_OPEN_BRACKET - removed:
variable SPACE_PRECEDES_CLOSE_BRACKET - removed:
variable WHITESPACE - changed:
function check_valid_identifier(identifier) → function check_valid_identifier(identifier: str) -> None - changed:
function convert_keyword_arguments(function, args, kwargs) → function convert_keyword_arguments(function: Any, args: Sequence[object], kwargs: dict[str, object]) -> tuple[tuple[object, ...], dict[str, object]] - changed:
function convert_positional_arguments(function, args, kwargs) → function convert_positional_arguments(function: Any, args: Sequence[object], kwargs: dict[str, object]) -> tuple[tuple[object, ...], dict[str, object]] - changed:
function define_function_signature(name, docstring, argspec) → function define_function_signature(name, docstring, signature) - changed:
function function_digest(function) → function function_digest(function: Any) -> bytes - changed:
function get_pretty_function_description(f) → function get_pretty_function_description(f: object) -> str - changed:
function is_mock(obj) → function is_mock(obj: object) -> bool - changed:
function nicerepr(v) → function nicerepr(v: Any) -> str - changed:
function proxies(target) → function proxies(target: T) -> Callable[[Callable], T] - changed:
function required_args(target, args=…, kwargs=…) → function required_args(target: Callable[..., Any], args: tuple[SearchStrategy[Any], ...]=…, kwargs: dict[str, Union[SearchStrategy[Any], EllipsisType]] | None=…) -> set[str] - changed:
function source_exec_as_module(source) → function source_exec_as_module(source: str) -> ModuleType - changed:
variable eval_cache → variable eval_cache: dict[str, ModuleType] - added:
function arg_is_required(param: Parameter) -> bool - added:
function ast_arguments_matches_signature(args: ast.arguments, sig: Signature) -> bool - added:
function function_location(f: object) -> str | None - added:
function get_signature(target: Any, *, follow_wrapped: bool=…, eval_str: bool=…) -> Signature - added:
function get_varargs(sig: Signature, kind: int=…) -> Parameter | None - added:
function is_first_param_referenced_in_function(f: Any) -> bool - added:
function is_identity_function(f: Callable) -> bool - added:
function repr_call(f: Any, args: Sequence[object], kwargs: dict[str, object], *, reorder: bool=…) -> str - added:
variable COPY_SIGNATURE_SCRIPT - added:
variable T
- added:
class ModuleLocation(IntEnum) - added:
class Tracer - added:
constructor Tracer(*, should_trace: bool) -> None - added:
field ModuleLocation.LOCAL - added:
field ModuleLocation.SITE_PACKAGES - added:
field ModuleLocation.STDLIB - added:
function explanatory_lines(traces, settings) - added:
function get_explaining_locations(traces) - added:
function make_report(explanations, *, cap_lines_at=…) - added:
function should_trace_file(fname: str) -> bool - added:
function tractable_coverage_report(trace: Trace) -> dict[str, list[int]] - added:
method Tracer.trace(frame, event, arg) - added:
method Tracer.trace_line(code: types.CodeType, line_number: int) -> None - added:
property Tracer.branches -> Trace - added:
static method ModuleLocation.from_path(path: str) -> ModuleLocation - added:
static method Tracer.can_trace() -> bool - added:
variable Branch: TypeAlias - added:
variable EXPLANATION_STUB - added:
variable Location: TypeAlias - added:
variable MONITORING_EVENTS - added:
variable MONITORING_TOOL_ID - added:
variable SITE_PACKAGES_DIRS - added:
variable STDLIB_DIRS - added:
variable Trace: TypeAlias - added:
variable UNHELPFUL_LOCATIONS
- added:
class LogStudentTDistribution(_Distribution) - added:
class PiecewiseDistribution - added:
class UniformDistribution(_Distribution) - added:
constructor LogStudentTDistribution(*, scale_bits: float, df: int) -> None - added:
constructor PiecewiseDistribution(*, inner: _Distribution, outer: _Distribution, switchover: float) -> None - added:
constructor UniformDistribution(*, half_width: float) -> None - added:
field LogStudentTDistribution.LN2 - added:
function stdtr(df: int, t: float) -> float - added:
function stdtrit(df: int, p: float, *, eps: float=…, max_iter: int=…) -> float - added:
method LogStudentTDistribution.cdf(x: float) -> float - added:
method LogStudentTDistribution.inverse_cdf(u: float) -> float - added:
method LogStudentTDistribution.pdf(x: float) -> float - added:
method PiecewiseDistribution.cdf(x: float) -> float - added:
method PiecewiseDistribution.inverse_cdf(u: float) -> float - added:
method UniformDistribution.cdf(x: float) -> float - added:
method UniformDistribution.inverse_cdf(u: float) -> float - added:
method UniformDistribution.pdf(x: float) -> float
- changed:
function check_type(typ, arg, name) → function check_type(typ: type | tuple[type, ...], arg: object, name: str) -> None
- removed:
function ip4_addr_strings() -> SearchStrategy[str] - removed:
function ip6_addr_strings() -> SearchStrategy[str] - removed:
variable TOP_LEVEL_DOMAINS - removed:
variable f - changed:
class DomainNameStrategy(SearchStrategy) → class DomainNameStrategy(st.SearchStrategy[str]) - changed:
constructor DomainNameStrategy(max_length=…, max_element_length=…) → constructor DomainNameStrategy(max_length: int | None=…, max_element_length: int | None=…) -> None - changed:
function domains(*, max_length: int=…, max_element_length: int=…) -> SearchStrategy[str] → function domains(*, max_length: int=…, max_element_length: int=…) -> st.SearchStrategy[str] - changed:
function urls() -> SearchStrategy[str] → function urls() -> st.SearchStrategy[str] - changed:
method DomainNameStrategy.do_draw(data) → method DomainNameStrategy.do_draw(data: ConjectureData) -> str - changed:
static method DomainNameStrategy.clean_inputs(minimum, maximum, value, variable_name) → static method DomainNameStrategy.clean_inputs(minimum: int, maximum: int, value: int | None, variable_name: str) -> int - added:
function get_top_level_domains() -> tuple[str, ...] - added:
variable FRAGMENT_SAFE_CHARACTERS
- removed:
function silent(value) - removed:
function to_text(textish) - changed:
function base_report(text) → function base_report(text: str) -> None - changed:
function current_reporter() → function current_reporter() -> ReporterT - changed:
function current_verbosity() → function current_verbosity() -> Verbosity - changed:
function debug_report(text) → function debug_report(text: str) -> None - changed:
function default(value) → function default(value: object) -> None - changed:
function report(text) → function report(text: str) -> None - changed:
function verbose_report(text) → function verbose_report(text: str) -> None - changed:
function with_reporter(new_reporter) → function with_reporter(new_reporter: ReporterT) -> AbstractContextManager[None] - added:
variable ReporterT: TypeAlias
- removed:
class BundleConsumer(Bundle) - removed:
class BundleReferenceStrategy(SearchStrategy) - removed:
constructor BundleConsumer(bundle) - removed:
constructor BundleReferenceStrategy(name, consume=…) - removed:
field Invariant.precondition - removed:
field Rule.precondition - removed:
method Bundle.available(data) - removed:
method BundleReferenceStrategy.do_draw(data) - removed:
static method RuleBasedStateMachine.define_initialize_rule(targets, function, arguments, precondition=…) - removed:
static method RuleBasedStateMachine.define_rule(targets, function, arguments, precondition=…) - removed:
static method RuleBasedStateMachine.initialize_rules() - removed:
static method RuleBasedStateMachine.invariants() - removed:
static method RuleBasedStateMachine.rules() - removed:
variable LOOP_LABEL - removed:
variable PRECONDITION_MARKER - removed:
variable SHOULD_CONTINUE_LABEL - changed:
class Bundle(SearchStrategy) → class Bundle(SearchStrategy[Ex]) - changed:
class MultipleResults(Iterable) → class MultipleResults(Iterable[Ex]) - changed:
constructor Bundle(name, consume=…) → constructor Bundle(name: str, *, consume: bool=…, draw_references: Literal[True], transformations: tuple[tuple[Literal['filter', 'map'], Callable[[Any], Any], str | None], ...]=…) -> None | (name: str, *, consume: bool=…, draw_references: Literal[False]=…, transformations: tuple[tuple[Literal['filter', 'map'], Callable[[Ex], Any], str | None], ...]=…) -> None - changed:
constructor RuleBasedStateMachine() → constructor RuleBasedStateMachine() -> None - changed:
constructor RuleStrategy(machine) → constructor RuleStrategy(machine: RuleBasedStateMachine) -> None - changed:
field Invariant.function → field Invariant.function: Any - changed:
field MultipleResults.values → field MultipleResults.values: tuple[Ex, ...] - changed:
field Rule.arguments → field Rule.arguments: Any - changed:
field Rule.bundles → field Rule.bundles: tuple[Bundle, ...] - changed:
field Rule.function → field Rule.function: Any - changed:
field Rule.targets → field Rule.targets: Any - changed:
field VarReference.name → field VarReference.name: str - changed:
function consumes(bundle) → function consumes(bundle: Bundle[Ex]) -> SearchStrategy[Ex] - changed:
function initialize(*, targets=…, target=…, **kwargs) → function initialize(*, targets: Sequence[Bundle[Ex]], target: None=…, **kwargs: SearchStrategy) -> _RuleWrapper[Ex] | (*, target: Bundle[Ex], targets: _OmittedArgument=…, **kwargs: SearchStrategy) -> _RuleWrapper[Ex] | (*, target: None=…, targets: _OmittedArgument=…, **kwargs: SearchStrategy) -> Callable[[Callable[..., None]], Callable[..., None]] - changed:
function invariant() → function invariant(*, check_during_init: bool=…) -> Callable[[TestFunc], TestFunc] - changed:
function multiple(*args) → function multiple(*args: T) -> MultipleResults[T] - changed:
function precondition(precond) → function precondition(precond: Callable[[Any], bool]) -> Callable[[TestFunc], TestFunc] - changed:
function rule(*, targets=…, target=…, **kwargs) → function rule(*, targets: Sequence[Bundle[Ex]], target: None=…, **kwargs: SearchStrategy) -> _RuleWrapper[Ex] | (*, target: Bundle[Ex], targets: _OmittedArgument=…, **kwargs: SearchStrategy) -> _RuleWrapper[Ex] | (*, target: None=…, targets: _OmittedArgument=…, **kwargs: SearchStrategy) -> Callable[[Callable[..., None]], Callable[..., None]] - changed:
function run_state_machine_as_test(state_machine_factory, *, settings=…) → function run_state_machine_as_test(state_machine_factory: type[RuleBasedStateMachine], *, settings: Settings | None=…, _min_steps: int=…) -> None - changed:
method Bundle.calc_is_empty(recur) → method Bundle.calc_is_empty(recur: Callable[[Any], bool]) -> Literal[False] - changed:
method Bundle.do_draw(data) → method Bundle.do_draw(data: ConjectureData) -> Ex - changed:
method RuleBasedStateMachine.bundle(name) → method RuleBasedStateMachine.bundle(name: str) -> list[VarReference] - changed:
method RuleBasedStateMachine.check_invariants() → method RuleBasedStateMachine.check_invariants(settings: Settings, output: Callable[[str], object], runtimes: dict[str, float]) -> None - changed:
method RuleBasedStateMachine.teardown() → method RuleBasedStateMachine.teardown() -> None - changed:
method RuleStrategy.do_draw(data) → method RuleStrategy.do_draw(data: ConjectureData) -> tuple[Rule, dict[Any, Any]] - changed:
method RuleStrategy.is_valid(rule) → method RuleStrategy.is_valid(rule: Rule) -> bool - changed:
variable STATE_MACHINE_RUN_LABEL → variable STATE_MACHINE_RUN_LABEL: Final[int] - changed:
variable self_strategy → variable self_strategy: Final[SearchStrategy[Any]] - added:
field Bundle.consume: bool - added:
field Bundle.draw_references: bool - added:
field Bundle.name: str - added:
field Invariant.check_during_init: bool - added:
field Invariant.preconditions: Any - added:
field Rule.arguments_strategies: dict[Any, Any] - added:
field Rule.preconditions: Any - added:
field RuleBasedStateMachine.bundles: dict[str, list[VarReference]] - added:
field RuleBasedStateMachine.invariants: list[Invariant] - added:
field RuleBasedStateMachine.names_counters: collections.Counter[str] - added:
field RuleBasedStateMachine.names_list: list[str] - added:
field RuleBasedStateMachine.names_to_values: dict[str, Any] - added:
field RuleBasedStateMachine.rules: list[Rule] - added:
field RuleStrategy.enabled_rules_strategy: SearchStrategy[FeatureFlags] - added:
field RuleStrategy.machine: RuleBasedStateMachine - added:
field RuleStrategy.rule_names: frozenset[str] - added:
field RuleStrategy.rules: list[Rule] - added:
field RuleStrategy.rules_strategy: SearchStrategy[Rule] - added:
function get_state_machine_test(state_machine_factory: type[RuleBasedStateMachine], *, settings: Settings | None=…, _min_steps: int=…, _flaky_state: dict[str, bool] | None=…) -> Callable[..., None] - added:
method Bundle.filter(condition: Callable[[Any], Any]) -> Bundle[VarReference] | (condition: Callable[[Ex], TypeGuard[T]]) -> Bundle[T] | (condition: Callable[[Ex], Any]) -> Bundle[Ex] - added:
method Bundle.is_currently_empty(data: ConjectureData) -> bool - added:
method Bundle.map(pack: Callable[[Any], Any]) -> Bundle[VarReference] | (pack: Callable[[Ex], T]) -> Bundle[T] - added:
static method RuleBasedStateMachine.setup_state() -> _SetupState - added:
variable PRECONDITIONS_MARKER - added:
variable T
- changed:
function describe_statistics(stats_dict) → function describe_statistics(stats_dict: StatisticsDict) -> str - changed:
function describe_targets(best_targets) → function describe_targets(best_targets: dict[str, float]) -> list[str] - changed:
function note_statistics(stats_dict) → function note_statistics(stats_dict: StatisticsDict) -> None - added:
function format_ms(times: Iterable[float]) -> str
- added:
export DrawFn
- removed:
class InferType(UniqueIdentifier) - changed:
constructor UniqueIdentifier(identifier) → constructor UniqueIdentifier(identifier: str) -> None
- added:
function note_deprecation(message: str, *, since: str, has_codemod: bool, stacklevel: int=…) -> None
- removed:
property DynamicVariable.value - changed:
class DynamicVariable → class DynamicVariable(Generic[T]) - changed:
constructor DynamicVariable(default) → constructor DynamicVariable(default: T) -> None - changed:
method DynamicVariable.with_value(value) → method DynamicVariable.with_value(value: T) -> Generator[None, None, None] - added:
property DynamicVariable.value -> T - added:
variable T
- added:
function guess_background_color() -> Literal['light', 'dark', 'unknown']
- added:
class ThreadLocal - added:
constructor ThreadLocal(**kwargs: Callable) -> None
- removed:
class PrettyPrinter(_PrettyPrinterBase) - removed:
constructor PrettyPrinter(output, max_width=…, newline=…, max_seq_length=…) - removed:
function for_type_by_name(type_module, type_name, func) - removed:
function pprint(obj, verbose=…, max_width=…, newline=…, max_seq_length=…) - removed:
method PrettyPrinter.begin_group(indent=…, open=…) - removed:
method PrettyPrinter.break_() - removed:
method PrettyPrinter.breakable(sep=…) - removed:
method PrettyPrinter.end_group(dedent=…, close=…) - removed:
method PrettyPrinter.flush() - removed:
method PrettyPrinter.text(obj) - changed:
class RepresentationPrinter(PrettyPrinter) → class RepresentationPrinter - changed:
constructor RepresentationPrinter(output, verbose=…, max_width=…, newline=…, singleton_pprinters=…, type_pprinters=…, deferred_pprinters=…, max_seq_length=…) → constructor RepresentationPrinter(output: TextIOBase | None=…, *, context: Optional[BuildContext]=…) -> None - changed:
function pretty(obj, verbose=…, max_width=…, newline=…, max_seq_length=…) → function pretty(obj: object, *, cycle: bool=…) -> str - changed:
method RepresentationPrinter.pretty(obj) → method RepresentationPrinter.pretty(obj: object, *, cycle: bool=…) -> None - added:
class IDKey - added:
constructor IDKey(value: object) - added:
function _fixeddict_pprinter(arg_labels: ArgLabelsT) -> PrettyPrintFunction - added:
function _tuple_pprinter(arg_labels: ArgLabelsT) -> PrettyPrintFunction - added:
method RepresentationPrinter.begin_group(indent: int=…, open: str=…) -> None - added:
method RepresentationPrinter.break_() -> None - added:
method RepresentationPrinter.breakable(sep: str=…) -> None - added:
method RepresentationPrinter.end_group(dedent: int=…, close: str=…) -> None - added:
method RepresentationPrinter.flush() -> None - added:
method RepresentationPrinter.getvalue() -> str - added:
method RepresentationPrinter.group(indent: int=…, open: str=…, close: str=…) -> Generator[None, None, None] - added:
method RepresentationPrinter.indent(indent: int) -> Generator[None, None, None] - added:
method RepresentationPrinter.maybe_repr_known_object_as_call(obj: object, cycle: bool, name: str, args: Sequence[object], kwargs: dict[str, object], arg_labels: ArgLabelsT | None=…) -> None - added:
method RepresentationPrinter.repr_call(func_name: str, args: Sequence[object], kwargs: dict[str, object], *, force_split: bool | None=…, arg_labels: ArgLabelsT | None=…, leading_comment: str | None=…, avoid_realization: bool=…, known_safe_to_repr: Collection[str]=…) -> None - added:
method RepresentationPrinter.text(obj: str) -> None