deps: use optional dependency rfc3987-syntax2 instead of rfc3987-syntax#1521
deps: use optional dependency rfc3987-syntax2 instead of rfc3987-syntax#1521jkowalleck wants to merge 2 commits into
rfc3987-syntax2 instead of rfc3987-syntax#1521Conversation
Documentation build overview
|
…yntax` Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
d5eb20d to
8b08766
Compare
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
|
@Julian I think we should switch to this library |
|
@kdeldycke could you check whether this also requires your downstream mod like in Nuitka/Nuitka#3578 |
|
I'm not looking to add external dependencies for format at this time, by which I mean that even though previously I pushed back on maintaining format dependencies "ourselves" here in the jsonschema org, these days for better or worse this is something LLMs are quite adept at. So my preference, if indeed the library is abandoned, would be to grow a format validator here ourselves in the org rather than adopt an otherwise-unused fork. |
Great point, and I understand the preference to eventually own this in-org. That said, this PR is not introducing a new dependency category — it replaces an already-existing dependency ( The practical benefit is immediate:
I’m very supportive of moving to a first-party validator later. But providing an improved, fixed, and performant version today is better than waiting for an unknown future timeline. If helpful, I can add a follow-up issue/milestone to track first-party implementation + dependency removal, so this remains explicitly temporary. P.S. On "otherwise-unused fork": I think that’s a bit speculative. While |
|
(Your comment seems LLM-written. Apologies if that isn't the case, but it's the sensation it gives.) There's no such thing as bitrotting really, so there's no specific disadvantage I'm aware of in inherently being on an "abandoned" library for this specific use case. On the other hand, it seems you work in supply chain security, so surely you understand the downside that adding a dependency which isn't widely used means I need to judge whether you're trustworthy -- the older library wouldn't go away for backwards compatibility, so each time a dependency is added an additional person gets an exploitable vector into all jsonschema's users. So there's certainly downside. If you're saying there are bugs which lead to incorrect behavior that's certainly more motivation (though I don't think we fail any of the JSON Schema test suite cases in this area, so if that is the case, improving the upstream test suite is another good thing to do). Again, I'm not saying categorically no, though I am leaning towards it, but I'm not seeing urgency here unless I'm missing something -- a user who wants to use your library for format validation can equally do so today without this PR. |
It sure is, I am a bit in a rush between many tasks, so I had a LLM flush out my phrasing and fix spelling and and such based on a keyword-based input I provided. Since English is not my mother tongue, I use it a lot to make my texts more readable for others.
That's because your current test suite is incomplete regarding RFC3987. PS: I'll have a LLM work on incorporating my test suite into yours. PR coming soon-ish |
|
(Please don't communicate via LLMs with humans -- I fully understand the difficulty in communicating outside one's mother tongue. I would much rather ignore occasional mistakes than be talking to a robot.)
The sentence just after what you quoted encouraged you to contribute those improvements to the upstream test suite. |
|
regarding supply chain risks: |
|
That certainly would help get us down the "first party" path. |
Fantastic. |
in #1388 a non-gpl library for validating IRI was introduced.
Unfortunately, the library
rfc3987-syntax(https://pypi.org/project/rfc3987-syntax/) is no longer maintained.Therefore, a maintained fork
rfc3987-syntax2(https://pypi.org/project/rfc3987-syntax2/) exists, which is used here.rfc3987-syntax2v1.3.0 has various improvements over the oldrfc3987-syntaxv1.1.0lazy-loading - improving import times tremendously
is RFC 3987 syntax complete (old lib had blind-spots)
various bug fixes
proper typing and API docs