Repository navigation
DecodedURL #54
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
Merged
Merged
DecodedURL #54
Changes from 1 commit
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
add lazy keyword to DecodedURL methods where appropriate. Add some co…
…verage-oriented tests. Remove the password attributes of DecodedURL pending future discussion.
- Loading branch information
commit 67ab0ec2c2f05ed8c0b003cbbd1a3b6528949682
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1519,9 +1519,9 @@ def __init__(self, url, lazy=False): | |
| return | ||
|
|
||
| @classmethod | ||
| def from_text(cls, text): | ||
| def from_text(cls, text, lazy=False): | ||
| _url = URL.from_text(text) | ||
| return cls(_url) | ||
| return cls(_url, lazy=lazy) | ||
|
|
||
| @property | ||
| def encoded_url(self): | ||
|
|
@@ -1622,13 +1622,6 @@ def userinfo(self): | |
| def user(self): | ||
| return self.userinfo[0] | ||
|
|
||
| @property | ||
| def password(self): | ||
| try: | ||
| return self.userinfo[1] | ||
| except IndexError: | ||
| return None | ||
|
|
||
| @property | ||
| def uses_netloc(self): | ||
| return self._url.uses_netloc | ||
|
|
@@ -1711,8 +1704,8 @@ def __hash__(self): | |
| asIRI = to_iri | ||
|
|
||
| @classmethod | ||
| def fromText(cls, s): | ||
| return cls.from_text(s) | ||
| def fromText(cls, s, lazy=False): | ||
| return cls.from_text(s, lazy=lazy) | ||
|
|
||
| def asText(self, includeSecrets=False): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Twisted-style camelCase argument name. |
||
| return self.to_text(with_password=includeSecrets) | ||
|
|
||
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
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.
Why is this its own
classmethodwhen the instance methods are aliased?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.
Twisted-style single character argument name copied for consistency with URL.