Skip to content

Commit 23db996

Browse files
committed
address review
1 parent d684a2b commit 23db996

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

hypothesis-python/docs/reference/internals.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Hypothesis internals
1212
Alternative backends
1313
--------------------
1414

15+
.. seealso::
16+
17+
See also the user-facing :ref:`alternative-backends` documentation.
18+
1519
.. autoclass:: hypothesis.internal.conjecture.providers.PrimitiveProvider
1620
:members:
1721

hypothesis-python/src/hypothesis/internal/conjecture/providers.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
#: Though, as ``backend="hypothesis"`` is the default setting, the above would
102102
#: typically not have any effect.
103103
#:
104-
#: See also :ref:`alternative-backends`.
104+
#: The purpose of mapping to an absolute importable path, rather than the actual
105+
#: |PrimitiveProvider| class, is to avoid slowing down Hypothesis startup times
106+
#: by only importing alternative backends when required.
105107
AVAILABLE_PROVIDERS = {
106108
"hypothesis": "hypothesis.internal.conjecture.providers.HypothesisProvider",
107109
"hypothesis-urandom": "hypothesis.internal.conjecture.providers.URandomProvider",
@@ -448,9 +450,9 @@ def draw_string(
448450
intervals : IntervalSet
449451
The set of codepoints to sample from.
450452
min_size : int
451-
(inclusive) lower bound on the string length.
453+
(Inclusive) lower bound on the string length.
452454
max_size : int
453-
(inclusive) upper bound on the string length.
455+
(Inclusive) upper bound on the string length.
454456
"""
455457
raise NotImplementedError
456458

@@ -466,9 +468,9 @@ def draw_bytes(
466468
Parameters
467469
----------
468470
min_size : int
469-
(inclusive) lower bound on the bytes length.
471+
(Inclusive) lower bound on the bytes length.
470472
max_size : int
471-
(inclusive) upper bound on the bytes length.
473+
(Inclusive) upper bound on the bytes length.
472474
"""
473475
raise NotImplementedError
474476

hypothesis-python/src/hypothesis/internal/observability.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ def _system_metadata():
132132

133133
#: If ``False``, do not collect coverage information when observability is enabled.
134134
#:
135-
#: This is exposed for performance, as coverage collection can be slow on Python
136-
#: 3.11 and earlier. On Python 3.12+, there should be no need to set this.
135+
#: This is exposed both for performance (as coverage collection can be slow on
136+
#: Python 3.11 and earlier) and size (if you do not use coverage information,
137+
#: you may not want to store it in-memory).
137138
OBSERVABILITY_COLLECT_COVERAGE = (
138139
"HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY_NOCOVER" not in os.environ
139140
)

0 commit comments

Comments
 (0)