Repository navigation
Preserve valid composite inputs in global raise mode - #550
Open
rupayon123 wants to merge 1 commit into
Open
rupayon123 wants to merge 1 commit into
rupayon123 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
RAISE_VALIDATION_ERROR=True,hostname("127.0.0.1")andurl("http://10.0.0.1")raise a domain error before their IP alternatives can run. Those inputs already pass with the documentedr_ve=Truecall flag.Apply the environment setting at the outermost validation call, so nested checks can return false validation errors and try alternatives. Explicit
r_ve=Truestill raises inside nested calls. A context-local scope tracks the outer call’s lifetime, thread and current task; copied contexts cannot suppress later independent calls or calls in another thread/task. The scope is always expired and reset on exit. This keeps the existing synchronous decorator contract.Regression coverage includes valid/invalid composite inputs, public error metadata, explicit nested flags, copied contexts after returns and exceptions, real worker threads, and normal/eager task inheritance. The full project tox list passes on macOS arm64: Ruff lint/format, strict Pyright, Bandit, 1,599 tests plus one feature-availability skip on Python 3.11.15, and all 1,600 tests on Python 3.12.15, 3.13.14 and 3.14.6. The project lockfile is unchanged. Other operating systems and release-only documentation/manpage exports were not run.