-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DecodedURL #54
Merged
Merged
DecodedURL #54
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
98edfc6
WIP DecodedURL with path and replace
mahmoud dce971b
DecodedURL.replace(query) and DecodedURL.query working. Fix up userin…
mahmoud 2162c67
DecodedURL userinfo now working
mahmoud d1bfc68
add new arguments to _percent_decode and use them in the DecodedURL
mahmoud adc7370
added DecodedURL to the public API, started on tests, added DecodedUR…
mahmoud fc28ee3
add host and port to DecodedURL
mahmoud 358402f
add DecodedURL.scheme property, plus some more tests
mahmoud 34d4212
add and test a bunch of DecodedURL passthrough methods
mahmoud 161e93a
test DecodedURL userinfo-related properties. Add generic percent enco…
mahmoud 95ea9ea
add, test, and slightly refactor query manipulation methods. still pr…
mahmoud 976c083
fix and test the aforementioned issue with query parameters which are…
mahmoud 02a841c
bit of housekeeping on DecodedURL, rearranging and adding a couple mi…
mahmoud 9a0438e
DecodedURL: made .query a tuple. more obvious errors on attempted mut…
mahmoud 662ec79
DecodedURL.replace() now fixed and tested working for roundtripping U…
mahmoud 3aa4b61
add some Twisted-style methods to DecodedURL for consistency with URL…
mahmoud 82deb29
some notes and docs on DecodedURL
mahmoud 0b311d7
split out host decoding to its own function, remove duplicated code
mahmoud 30e19a6
fix delimiter typo in docstring, thanks alex!
mahmoud 696e8fd
add parse convenience function and EncodedURL alias for URL to top-le…
mahmoud 67ab0ec
add lazy keyword to DecodedURL methods where appropriate. Add some co…
mahmoud 6a90f4a
DecodedURL pretty much fully covered by tests
mahmoud ad63b9b
docstrings for all DecodedURL members
mahmoud afc907b
cover another line in _percent_decode
mahmoud 9f3212b
Merge branch 'master' into i44_decoded_url
mahmoud ac3be79
fixing test coverage for parse
mahmoud dd8248c
Merge branch 'i44_decoded_url' of github.com:python-hyper/hyperlink i…
mahmoud 6dd3272
DecodedURL: address most of the comments about docstrings
mahmoud e8616fa
add a few more DecodedURL/parse tests and a couple comments
mahmoud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
|
||
from ._url import URL, URLParseError, register_scheme, parse_host | ||
from ._url import (URL, | ||
parse, | ||
EncodedURL, | ||
DecodedURL, | ||
URLParseError, | ||
register_scheme) | ||
|
||
__all__ = [ | ||
"URL", | ||
"parse", | ||
"EncodedURL", | ||
"DecodedURL", | ||
"URLParseError", | ||
"register_scheme", | ||
"parse_host" | ||
] |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to say that we should just avoid exposing this entirely, but it probably needs to be exposed for type annotations.
However, as per #44, could we have a "decoded" property on
URL
that provides an interface to this, and an "encoded" property onDecodedURL
that maps back to aURL
?(At this point I think I'm in favor of adding an
EncodedURL
alias forURL
, then maybe adding a top-level entry point likehyperlink.parse()
which takes adecoded
kwarg flag which defaults to true, to make it easier to get started withDecodedURL
which is what I think we all want most of the time. That can definitely be deferred to a separate ticket though.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am pretty much in favor of all those conveniences :) And I also agree that this probably needs to be exposed.