add URL validator implementation & tests#256
Open
bieli wants to merge 1 commit into
Open
Conversation
mildebrandt
reviewed
Nov 15, 2024
| @@ -1 +1,2 @@ | |||
| tox==4.13.0 | |||
| validators==0.34.0 | |||
There was a problem hiding this comment.
Hi! I have a few concerns about using the validators package:
- It's still pre 1.0, so things can break between minor versions. Why isn't
http://localhost:PORTa valid URL? python-validators/validators#285 (comment) - It doesn't support
http://localhostby default. url validator rejects some local URLs as invalid even though they should be valid python-validators/validators#392 - It doesn't support query strings without values. [Question]: Are URL query strings containing keys without values invalid on purpose? python-validators/validators#363
- The supported schemes are hard coded. https://github.com/python-validators/validators/blob/c9585e91f8b409029b059df148da4dc52bd951e3/src/validators/url.py#L42
And that's what I found in just 10 minutes. I'm sure this could work for a subset of users....but it's not a generic solution for all valid URLs.
Author
There was a problem hiding this comment.
Sure. Thanks for this feedback. I'll find something more universal.
There was a problem hiding this comment.
Cool. FYI, currently Yamale has only one dependency....pyyaml. Anything you add will double the number of dependencies. I don't know how the current maintainers feel about that, but just something to keep in mind.
A couple other things:
- Don't update the version of Yamale in your PR. That's done during the release process.
- Add any new dependencies in the setup.py file.
Good luck!
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.
Feature request #213 implementation.