diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..3d56609f32 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,3 @@ +RELEASE_TYPE: patch + +This patch fixes a spurious warning about slow imports when ``HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY`` was set. diff --git a/hypothesis-python/src/hypothesis/internal/observability.py b/hypothesis-python/src/hypothesis/internal/observability.py index 284a2072d7..eb083f8be1 100644 --- a/hypothesis-python/src/hypothesis/internal/observability.py +++ b/hypothesis-python/src/hypothesis/internal/observability.py @@ -108,6 +108,6 @@ def _deliver_to_file(value): # pragma: no cover # Remove files more than a week old, to cap the size on disk max_age = (date.today() - timedelta(days=8)).isoformat() - for f in storage_directory("observed").glob("*.jsonl"): + for f in storage_directory("observed", intent_to_write=False).glob("*.jsonl"): if f.stem < max_age: # pragma: no branch f.unlink(missing_ok=True)