Repository navigation
Conversation
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.
Follow-up to #755, tightening
has_absolute_iri_syntax()without adding third-party dependencies.Changes
has_absolute_iri_syntax()(validation/validate.py):< 0x20,0x7F–0x9F), lone surrogates (0xD800–0xDFFF), whitespace, and RFC 3987 disallowed ASCII delimiters (< > " { } | \ ^ \``) beforeurlsplit()` (which strips ASCII control whitespace).urllib.parse.urlsplitandparts.port(catching invalid IPv6 literals and non-numeric/out-of-range ports).hostnamewhenevernetlocis present (rejecting e.g.https://user@/ns#andhttps://:8080/ns#), and require a non-emptynetlocorpath(rejecting bare schemes likehttp:,https://, andhttps://#frag).validate_ontology()docstring invalidation/validate.pyto document prefix IRI validation alongside the other ontology checks.validation/tests/test_validate.py:\u-escaped), andfile://path IRIs as accepted values.Testing
uv run --no-project validation/test_validate.py: 59 tests passed.uv run --no-project --with pytest --with pyyaml --with jsonschema --with sqlglot -m pytest validation/tests/: 775 passed, 1 skipped.make validate spec-check: canonical examples and generated spec types passed.git diff --check: passed.