Skip to content

Commit 576db1a

Browse files
committed
Merge branch 'master' into observability-choice-nodes
2 parents cba20ce + 8c1180f commit 576db1a

File tree

5 files changed

+37
-18
lines changed

5 files changed

+37
-18
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ their individual contributions.
120120
* `Louis Taylor <https://github.com/kragniz>`_
121121
* `Luke Barone-Adesi <https://github.com/baluke>`_
122122
* `Lundy Bernard <https://github.com/lundybernard>`_
123+
* `Marco Ricci <https://github.com/the-13th-letter>`_
123124
* `Marco Sirabella <https://www.github.com/mjsir911>`_
124125
* `marekventur <https://www.github.com/marekventur>`_
125126
* `Marius Gedminas <https://www.github.com/mgedmin>`_ ([email protected])

hypothesis-python/RELEASE.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

hypothesis-python/docs/changelog.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@ Hypothesis 6.x
1818

1919
.. include:: ../RELEASE.rst
2020

21+
.. _v6.132.0:
22+
23+
--------------------
24+
6.132.0 - 2025-05-31
25+
--------------------
26+
27+
Add |PrimitiveProvider.on_observation| to the internal :ref:`alternative backends <alternative-backends-internals>` interface.
28+
29+
.. _v6.131.33:
30+
31+
---------------------
32+
6.131.33 - 2025-05-31
33+
---------------------
34+
35+
This patch restores compatibility when using `the legacy Python 3.9 LL(1)
36+
parser <https://docs.python.org/3/whatsnew/3.9.html#new-parser>`__, which
37+
was accidentally broken since :ref:`version 6.130.13 <v6.130.13>`.
38+
39+
Thanks to Marco Ricci for this fix!
40+
2141
.. _v6.131.32:
2242

2343
---------------------

hypothesis-python/src/hypothesis/core.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,20 +1104,21 @@ def run(data: ConjectureData) -> None:
11041104

11051105
# self.test_runner can include the execute_example method, or setup/teardown
11061106
# _example, so it's important to get the PRNG and build context in place first.
1107-
with (
1108-
local_settings(self.settings),
1109-
deterministic_PRNG(),
1110-
BuildContext(
1111-
data, is_final=is_final, wrapped_test=self.wrapped_test
1112-
) as context,
1113-
):
1114-
# providers may throw in per_case_context_fn, and we'd like
1115-
# `result` to still be set in these cases.
1116-
result = None
1117-
with data.provider.per_test_case_context_manager():
1118-
# Run the test function once, via the executor hook.
1119-
# In most cases this will delegate straight to `run(data)`.
1120-
result = self.test_runner(data, run)
1107+
#
1108+
# NOTE: For compatibility with Python 3.9's LL(1) parser, this is written as
1109+
# three nested with-statements, instead of one compound statement.
1110+
with local_settings(self.settings):
1111+
with deterministic_PRNG():
1112+
with BuildContext(
1113+
data, is_final=is_final, wrapped_test=self.wrapped_test
1114+
) as context:
1115+
# providers may throw in per_case_context_fn, and we'd like
1116+
# `result` to still be set in these cases.
1117+
result = None
1118+
with data.provider.per_test_case_context_manager():
1119+
# Run the test function once, via the executor hook.
1120+
# In most cases this will delegate straight to `run(data)`.
1121+
result = self.test_runner(data, run)
11211122

11221123
# If a failure was expected, it should have been raised already, so
11231124
# instead raise an appropriate diagnostic error.

hypothesis-python/src/hypothesis/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
99
# obtain one at https://mozilla.org/MPL/2.0/.
1010

11-
__version_info__ = (6, 131, 32)
11+
__version_info__ = (6, 132, 0)
1212
__version__ = ".".join(map(str, __version_info__))

0 commit comments

Comments
 (0)