Skip to content

claude: remove stray debug print from dates() filter rewriting#4766

Open
Liam-DeVoe wants to merge 1 commit into
HypothesisWorks:masterfrom
Liam-DeVoe:remove-dates-filter-debug-print
Open

claude: remove stray debug print from dates() filter rewriting#4766
Liam-DeVoe wants to merge 1 commit into
HypothesisWorks:masterfrom
Liam-DeVoe:remove-dates-filter-debug-print

Conversation

@Liam-DeVoe

Copy link
Copy Markdown
Member
Claude-written description

Removes a stray debug print(lo, hi) from DateStrategy.filter, left over from the original filter-rewriting-for-dates change in 6.115.1. It printed to stdout from library code whenever a dates() strategy's .filter() was rewritten from a partial(op.lt/le/eq/ge/gt, <date>) predicate.

Also adds a |st.dates| substitution to docs/prolog.rst (used by the new changelog entry), and a RELEASE.rst with a patch changelog entry.

The existing test_dates_filter_rewriting already covers the rewrite path; the filter-rewriting test suite passes. (One unrelated pre-existing failure in test_regex_filter_rewriting — a BytesWarning in the internal cache under python -bb — reproduces on unmodified master.)

Self-review note: enabling ruff T20 (flake8-print) for hypothesis/src would guard against this class of bug systemically (only reporting.py and extra/cli.py print legitimately), but was left out to keep this PR minimal.

@Zac-HD Zac-HD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but we might as well add the lint rule and open an issue for the bytes warning (assuming it's larger than is convenient to fix here)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants