Skip to content

Support the new (still-private) cu.many() API in Hypothesis 6.170.10+ - #119

Merged
Zac-HD merged 9 commits into
python-jsonschema:masterfrom
Zac-HD:claude/bold-curie-s75m0q
Oct 27, 2026
Merged

Zac-HD merged 9 commits into
python-jsonschema:masterfrom
Zac-HD:claude/bold-curie-s75m0q

Conversation

@Zac-HD

@Zac-HD Zac-HD commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Hypothesis replaced the private many.more() interface with a context manager which is iterated over, so generating objects raised AttributeError. We now use the new still-private API and require hypothesis>=6.170.10.

Also stop after the first reject() for an element, which the new API enforces and which previously would have raised KeyError on the second out.pop(key).

Fixes #118

Hypothesis replaced `many.more()` with a context manager which is
iterated over, so generating objects raised AttributeError.  We now
use the new API and require hypothesis>=6.170.10.

Also stop after the first reject() for an element, which the new API
enforces and which previously would have raised KeyError on the second
`out.pop(key)`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Match the Python versions tested by Hypothesis, which itself requires
3.11+ as of the versions we now depend on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Both currently fail due to rpds-py issues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Canonicalisation converts e.g. multipleOf: 99.0 to an int, so we
generated exact multiples of any size - but jsonschema checks float
multipleOf with float division, which is inexact beyond 2**53 and
rejected some of these values.  Clamp otherwise-unbounded sides to
2**53 when the multiplier is an integer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Fixes installing rpds-py on Python 3.15 and PyPy 3.12, and brings in
newer linters and pytest - so wrap an implicit string concatenation
for ruff, and pass lists rather than generators to parametrize.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpH3gRk19SczSDZWkCm948
@Zac-HD
Zac-HD merged commit 3c1fe8f into python-jsonschema:master Oct 27, 2026
15 checks passed
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.

AttributeError: 'many' object has no attribute 'more' with hypothesis >= 6.170.10

2 participants