feat: allow custom URL scheme validation by e3krisztian · Pull Request #409 · python-validators/validators
The only issue I see is that I could pass something as dumb as:
url('httpx://crazy.example', validate_scheme=lambda x: True)This then resolves to: #396 (comment)
I do not understand what is the issue mentioned above, and what part of the linked comment is relevant.
Users want to have control over the accepted url schemes, because their problems define the schemes to work with which are not universal (e.g. only svn+ssh://... URLs makes sense in their problem domain).
Now some potential users can not use the functionality in the library, because the scheme check is too strict for them.
The example always succeeding the scheme check is something, that these people may love to have. Having the remaining checks might be valuable enough for them to implement custom scheme validation if needed.
In the end, doing something dumb is the users responsibility - maybe what they end up with is a novel, but valid use :)