-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG, ENH: Read Data From Password-Protected URL's and allow self signed SSL certs #16910
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
Changes from 1 commit
8b6e426 145c7f4 9473316 9c7524d 598cf7b 3b454dd d359b2d eb03fd3 cbe3f49 437e0a2 7b034b8 0a4607a 209dd58 f520f7b File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -191,19 +191,19 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None, | |
| filepath_or_buffer : a url, filepath (str, py.path.local or pathlib.Path), | ||
| or buffer | ||
| now supports 'https://<user>:<password>@<host>:<port>/<url-path>' | ||
| | ||
| .. versionadded:: 0.21.0 | ||
| | ||
| encoding : the encoding to use to decode py3 bytes, default is 'utf-8' | ||
| | ||
| compression : string, default None | ||
| | ||
| .. versionadded:: 0.18.1 | ||
| auth : tuple, default None | ||
| A tuple of string with (username, password) string for | ||
| | ||
| Contributor 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. no blank lines in the doc-strings. Indent 4 spaces on the 2nd and other lines | ||
| auth : tuple, default None | ||
| A tuple of string with (username, password) string for | ||
| HTTP(s) basic auth: eg auth= ('roberto', 'panda$4life') | ||
| | ||
| .. versionadded:: 0.21.0 | ||
| | ||
| verify_ssl : boolean, Default True | ||
| Contributor 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. why is this default True? shouldn't the onus be on the user to pass this 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. I think this is an attempt to mirror what | ||
| | @@ -282,20 +282,20 @@ def split_auth_from_url(url_with_uname): | |
| a url that may or may not contain username and password | ||
| ||
| see section 3.1 RFC 1738 https://www.ietf.org/rfc/rfc1738.txt | ||
| //<user>:<password>@<host>:<port>/<url-path> | ||
| | ||
| .. versionadded:: 0.21.0 | ||
| | ||
| Returns | ||
| ------- | ||
| (username, password), url_no_usrpwd : tuple, string Default ('', '') url | ||
| A tuple with (username, pwd) pair and | ||
| A tuple with (username, pwd) pair and | ||
| url without username or password (if it contained it ) | ||
| | ||
| Raises | ||
| ------ | ||
| ValueError for empty url | ||
| """ | ||
| Contributor 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. show what this Raises 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.
However, in this case, it would be preferable to describe the returned object without any naming, since this is a nested | ||
| if not url_with_uname: | ||
| if not url_with_uname: | ||
| msg = "Empty url: {_type}" | ||
| raise ValueError(msg.format(_type=type(url_with_uname))) | ||
| o = parse_url(url_with_uname) | ||
| | @@ -320,13 +320,13 @@ def get_urlopen_args(url_with_uname, auth=None, verify_ssl=True): | |
| a url that may or may not contain username and password | ||
| see section 3.1 RFC 1738 https://www.ietf.org/rfc/rfc1738.txt | ||
| //<user>:<password>@<host>:<port>/<url-path> | ||
| | ||
| .. versionadded:: 0.21.0 | ||
| | ||
| auth : tuple, default None | ||
| A tuple of string with (username, password) string for | ||
| auth : tuple, default None | ||
| A tuple of string with (username, password) string for | ||
| HTTP(s) basic auth: eg auth= ('roberto', 'panda$4life') | ||
| | ||
| .. versionadded:: 0.21.0 | ||
| | ||
| verify_ssl : boolean, Default True | ||
| | ||
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.
this is misaligned. needs to be part of the sentence above.