Skip to content

Commit

Permalink
minor fixes, reword release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed May 27, 2024
1 parent 866256e commit 66f2464
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RELEASE_TYPE: minor

This release migrates the shrinker to our new internal representation, called the IR layer (:pull:`3962`). This greatly improves the shrinker's performance in the majority of cases. For example, on the Hypothesis test suite, shrinking is a median of 2.12x faster.
This release migrates the shrinker to our new internal representation, called the IR layer (:pull:`3962`). This improves the shrinker's performance in the majority of cases. For example, on the Hypothesis test suite, shrinking is a median of 1.38x faster.

It is possible this release regresses performance while shrinking certain strategies. If you encounter strategies where shrinking is slower than it used to be (or is slow at all), please open an issue!
It is possible this release regresses performance while shrinking certain strategies. If you encounter strategies which reliably shrink more slowly than they used to (or shrink slowly at all), please open an issue!

You can read more about the IR layer at :issue:`3921`.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def _cache_key_ir(
for node in nodes + extension
)

def _cache(self, data: Union[ConjectureData, ConjectureResult]) -> None:
def _cache(self, data: ConjectureData) -> None:
result = data.as_result()
# when we shrink, we try out of bounds things, which can lead to the same
# data.buffer having multiple outcomes. eg data.buffer=b'' is Status.OVERRUN
Expand Down
4 changes: 2 additions & 2 deletions hypothesis-python/tests/cover/test_stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,8 @@ def fail(self, source):

result = "\n".join(err.value.__notes__)
for m in ["create", "transfer", "fail"]:
# TODO_BETTER_SHRINK: minimal here has 1 state each, not <= 2.
assert result.count("state." + m) <= 2
# TODO_BETTER_SHRINK: minimal here has 1 state each.
assert result.count("state." + m) <= 3
assert "b1_0 = state.create()" in result
# TODO_BETTER_SHRINK: should only be the source=b1_0 case, but sometimes we can't
# discover that. (related to the above better_shrink comment).
Expand Down

0 comments on commit 66f2464

Please sign in to comment.