Context
In 2.0, plone.registryfromenviron.patch._originals is the source of truth for "is the patch currently applied?" — but it's underscore-prefixed, i.e. private API.
registry.py currently notes in its docstring:
Use `bool(plone.registryfromenviron.patch._originals)` if that distinction matters.
…which is a workaround, not a public API.
Use case
Operators / downstream code that wants to branch on "is env-var override active?" (e.g. in a /manage view, a health probe, or a subscriber).
v1.x let users write isinstance(reg, EnvOverrideRegistry). The 2.0 alias makes that check always return True, so anyone who relied on it needs a replacement.
Suggested API
# in plone.registryfromenviron.patch
def is_patched() -> bool:
\"\"\"Return True iff the env-var override patch is currently active.\"\"\"
return bool(_originals)
Update the registry.py docstring to recommend the public helper instead of the private dict.
Scope
Trivial — one function, one docstring tweak, one test. Good first issue.
Context
In 2.0,
plone.registryfromenviron.patch._originalsis the source of truth for "is the patch currently applied?" — but it's underscore-prefixed, i.e. private API.registry.pycurrently notes in its docstring:…which is a workaround, not a public API.
Use case
Operators / downstream code that wants to branch on "is env-var override active?" (e.g. in a
/manageview, a health probe, or a subscriber).v1.x let users write
isinstance(reg, EnvOverrideRegistry). The 2.0 alias makes that check always returnTrue, so anyone who relied on it needs a replacement.Suggested API
Update the
registry.pydocstring to recommend the public helper instead of the private dict.Scope
Trivial — one function, one docstring tweak, one test. Good first issue.