{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/73967787","id":73967787,"diff_hunk":"@@ -81,6 +81,16 @@\n # agrees to be bound by the terms and conditions of this License\n # Agreement.\n \n+'''\n+The **urls** utils module offers a replacement for the `requests`_ library for most cases. \n+\n+Sometimes you really need the requests library, but you should always check, whether \n+this utils module is sufficient for your use case.\n+\n+.. _requests:\n+   http://docs.python-requests.org/en/master/\n+'''","path":"lib/ansible/module_utils/urls.py","position":12,"original_position":12,"commit_id":"4bc2d6201cacdd95261d70a1d9d97989e94543f5","original_commit_id":"4bc2d6201cacdd95261d70a1d9d97989e94543f5","user":{"login":"abadger","id":209242,"avatar_url":"https://avatars.githubusercontent.com/u/209242?v=3","gravatar_id":"","url":"https://api.github.com/users/abadger","html_url":"https://github.com/abadger","followers_url":"https://api.github.com/users/abadger/followers","following_url":"https://api.github.com/users/abadger/following{/other_user}","gists_url":"https://api.github.com/users/abadger/gists{/gist_id}","starred_url":"https://api.github.com/users/abadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abadger/subscriptions","organizations_url":"https://api.github.com/users/abadger/orgs","repos_url":"https://api.github.com/users/abadger/repos","events_url":"https://api.github.com/users/abadger/events{/privacy}","received_events_url":"https://api.github.com/users/abadger/received_events","type":"User","site_admin":false},"body":"Hmm.... I see in the original bug that ansible-modules-validate is throwing an error for using requests and that was part of what prompted this doc update.  That does make it a good idea to mention requests here.... What about something like:\r\n\r\n```\r\nThe **urls** utils module offers a replacement for the urllib2 python library.\r\n\r\nurllib2 is the python stdlib way to retrieve files from the Internet but it lacks some security features (around verifying SSL certificates) that users should care about in most situations.  using the functions in this module corrects deficiencies in the urllib2 module wherever possible.\r\n\r\nThere are also third-party libraries (for instance, requests) which can be used to replace urllib2 with a more secure library.  However, all third party libraries require that the library be installed on the managed machine.  That is an extra step for users making use of a module.  If possible, avoid third party libraries by using this code instead.\r\n```","created_at":"2016-08-08T22:28:38Z","updated_at":"2016-08-08T22:28:38Z","html_url":"https://github.com/ansible/ansible/pull/16987#discussion_r73967787","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/16987","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/73967787"},"html":{"href":"https://github.com/ansible/ansible/pull/16987#discussion_r73967787"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/16987"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/16987","id":80364322,"html_url":"https://github.com/ansible/ansible/pull/16987","diff_url":"https://github.com/ansible/ansible/pull/16987.diff","patch_url":"https://github.com/ansible/ansible/pull/16987.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16987","number":16987,"state":"open","locked":false,"title":"16888: comment module_utils/urls.py","user":{"login":"kontrafiktion","id":198502,"avatar_url":"https://avatars.githubusercontent.com/u/198502?v=3","gravatar_id":"","url":"https://api.github.com/users/kontrafiktion","html_url":"https://github.com/kontrafiktion","followers_url":"https://api.github.com/users/kontrafiktion/followers","following_url":"https://api.github.com/users/kontrafiktion/following{/other_user}","gists_url":"https://api.github.com/users/kontrafiktion/gists{/gist_id}","starred_url":"https://api.github.com/users/kontrafiktion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontrafiktion/subscriptions","organizations_url":"https://api.github.com/users/kontrafiktion/orgs","repos_url":"https://api.github.com/users/kontrafiktion/repos","events_url":"https://api.github.com/users/kontrafiktion/events{/privacy}","received_events_url":"https://api.github.com/users/kontrafiktion/received_events","type":"User","site_admin":false},"body":"##### ISSUE TYPE\r\n - Docs Pull Request\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.0.0\r\nconfig file =\r\nconfigured module search path = Default w/o overrides\r\n```\r\n\r\n##### SUMMARY\r\none step for #16888 ","created_at":"2016-08-07T11:06:35Z","updated_at":"2016-08-08T22:28:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9446633355ccdd527b0841be1bfbe200f4e4e5e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/16987/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/16987/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16987/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/4bc2d6201cacdd95261d70a1d9d97989e94543f5","head":{"label":"kontrafiktion:16888_urls_doc","ref":"16888_urls_doc","sha":"4bc2d6201cacdd95261d70a1d9d97989e94543f5","user":{"login":"kontrafiktion","id":198502,"avatar_url":"https://avatars.githubusercontent.com/u/198502?v=3","gravatar_id":"","url":"https://api.github.com/users/kontrafiktion","html_url":"https://github.com/kontrafiktion","followers_url":"https://api.github.com/users/kontrafiktion/followers","following_url":"https://api.github.com/users/kontrafiktion/following{/other_user}","gists_url":"https://api.github.com/users/kontrafiktion/gists{/gist_id}","starred_url":"https://api.github.com/users/kontrafiktion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontrafiktion/subscriptions","organizations_url":"https://api.github.com/users/kontrafiktion/orgs","repos_url":"https://api.github.com/users/kontrafiktion/repos","events_url":"https://api.github.com/users/kontrafiktion/events{/privacy}","received_events_url":"https://api.github.com/users/kontrafiktion/received_events","type":"User","site_admin":false},"repo":{"id":29348714,"name":"ansible","full_name":"kontrafiktion/ansible","owner":{"login":"kontrafiktion","id":198502,"avatar_url":"https://avatars.githubusercontent.com/u/198502?v=3","gravatar_id":"","url":"https://api.github.com/users/kontrafiktion","html_url":"https://github.com/kontrafiktion","followers_url":"https://api.github.com/users/kontrafiktion/followers","following_url":"https://api.github.com/users/kontrafiktion/following{/other_user}","gists_url":"https://api.github.com/users/kontrafiktion/gists{/gist_id}","starred_url":"https://api.github.com/users/kontrafiktion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontrafiktion/subscriptions","organizations_url":"https://api.github.com/users/kontrafiktion/orgs","repos_url":"https://api.github.com/users/kontrafiktion/repos","events_url":"https://api.github.com/users/kontrafiktion/events{/privacy}","received_events_url":"https://api.github.com/users/kontrafiktion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kontrafiktion/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/kontrafiktion/ansible","forks_url":"https://api.github.com/repos/kontrafiktion/ansible/forks","keys_url":"https://api.github.com/repos/kontrafiktion/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kontrafiktion/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kontrafiktion/ansible/teams","hooks_url":"https://api.github.com/repos/kontrafiktion/ansible/hooks","issue_events_url":"https://api.github.com/repos/kontrafiktion/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/kontrafiktion/ansible/events","assignees_url":"https://api.github.com/repos/kontrafiktion/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/kontrafiktion/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/kontrafiktion/ansible/tags","blobs_url":"https://api.github.com/repos/kontrafiktion/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kontrafiktion/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kontrafiktion/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/kontrafiktion/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kontrafiktion/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/kontrafiktion/ansible/languages","stargazers_url":"https://api.github.com/repos/kontrafiktion/ansible/stargazers","contributors_url":"https://api.github.com/repos/kontrafiktion/ansible/contributors","subscribers_url":"https://api.github.com/repos/kontrafiktion/ansible/subscribers","subscription_url":"https://api.github.com/repos/kontrafiktion/ansible/subscription","commits_url":"https://api.github.com/repos/kontrafiktion/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/kontrafiktion/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/kontrafiktion/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/kontrafiktion/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/kontrafiktion/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/kontrafiktion/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kontrafiktion/ansible/merges","archive_url":"https://api.github.com/repos/kontrafiktion/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kontrafiktion/ansible/downloads","issues_url":"https://api.github.com/repos/kontrafiktion/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/kontrafiktion/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/kontrafiktion/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/kontrafiktion/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kontrafiktion/ansible/labels{/name}","releases_url":"https://api.github.com/repos/kontrafiktion/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/kontrafiktion/ansible/deployments","created_at":"2015-01-16T13:05:42Z","updated_at":"2016-02-18T14:41:59Z","pushed_at":"2016-08-07T11:02:46Z","git_url":"git://github.com/kontrafiktion/ansible.git","ssh_url":"git@github.com:kontrafiktion/ansible.git","clone_url":"https://github.com/kontrafiktion/ansible.git","svn_url":"https://github.com/kontrafiktion/ansible","homepage":"http://ansible.com/","size":34221,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"420a2f11af4034ed4ca43cfcc31a1ca01a8556ce","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2016-08-08T21:20:31Z","pushed_at":"2016-08-08T22:08:45Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":60767,"stargazers_count":18203,"watchers_count":18203,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5515,"mirror_url":null,"open_issues_count":1518,"forks":5515,"open_issues":1518,"watchers":18203,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/16987"},"html":{"href":"https://github.com/ansible/ansible/pull/16987"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/16987"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/16987/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/16987/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/16987/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/4bc2d6201cacdd95261d70a1d9d97989e94543f5"}}}}
{"actor":{"display_login":"abadger"}}