{"action":"created","comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/33623786","id":33623786,"diff_hunk":"@@ -140,3 +141,36 @@ def _asarray_validated(a, check_finite=True,\n             raise ValueError('object arrays are not supported')\n     return a\n \n+\n+def inspect_args(func):\n+    \"\"\"\n+    Args/defaults from inspect.getargspec (py2k) or inspect.signature (py3k).\n+\n+    `inspect.signature` does not exist in Python 2.x, and `inspect.getargspec`\n+    is deprecated in Python 3.x.  This function is a simple wrapper around both\n+    that returns only the parameters and defaults lists (typically all that is\n+    needed within Scipy).\n+\n+    Parameters\n+    ----------\n+    func : callable\n+        The function to inspect.\n+\n+    Returns\n+    -------\n+    args : sequence of str\n+        The argument names.  For Python 2.x, a list of strings.  For Python\n+        3.x, an OrderedDict.\n+    defaults : list\n+        A list of defaults for keyword arguments.\n+\n+    \"\"\"\n+    if sys.version_info[0] >= 3:\n+        sig = inspect.signature(func)\n+        args = sig.parameters\n+        tmp_defaults = [d.default for d in sig.parameters.values()]\n+        defaults = [d for d in tmp_defaults if d is not inspect._empty]\n+    else:\n+        args, _, _, defaults = inspect.getargspec(func)\n+\n+    return args, defaults","path":"scipy/_lib/_util.py","position":53,"original_position":53,"commit_id":"5f740aa8f6798638be80d03275ea7bfad85c188d","original_commit_id":"5f740aa8f6798638be80d03275ea7bfad85c188d","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"body":"agree, will change","created_at":"2015-06-30T21:06:58Z","updated_at":"2015-06-30T21:06:58Z","html_url":"https://github.com/scipy/scipy/pull/4928#discussion_r33623786","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/4928","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/33623786"},"html":{"href":"https://github.com/scipy/scipy/pull/4928#discussion_r33623786"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/4928"}}},"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/4928","id":36671302,"html_url":"https://github.com/scipy/scipy/pull/4928","diff_url":"https://github.com/scipy/scipy/pull/4928.diff","patch_url":"https://github.com/scipy/scipy/pull/4928.patch","issue_url":"https://api.github.com/repos/scipy/scipy/issues/4928","number":4928,"state":"open","locked":false,"title":"WIP: remove use of inspect.getargspec for Python 3.x (deprecated in 3.5)","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"body":"Not quite finished yet, but already filing a PR to ensure not forgetting this for 0.16.x. That's the only thing that seems to need fixing with Python 3.5.0b2\r\n\r\nDidn't touch ``doc/source/scipyoptdoc.py`` and ``scipy/_lib/decorator.py`` yet, did file an issue on the ``decorator`` issue tracker.","created_at":"2015-06-01T21:11:02Z","updated_at":"2015-06-30T21:06:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a057c0472ebb93163d4f539ee57f16ad7ddfea43","assignee":null,"milestone":{"url":"https://api.github.com/repos/scipy/scipy/milestones/24","html_url":"https://github.com/scipy/scipy/milestones/0.16.0","labels_url":"https://api.github.com/repos/scipy/scipy/milestones/24/labels","id":792277,"number":24,"title":"0.16.0","description":"","creator":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":384,"state":"open","created_at":"2014-09-16T21:15:40Z","updated_at":"2015-06-30T21:05:51Z","due_on":"2015-05-30T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scipy/scipy/pulls/4928/commits","review_comments_url":"https://api.github.com/repos/scipy/scipy/pulls/4928/comments","review_comment_url":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/4928/comments","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/5f740aa8f6798638be80d03275ea7bfad85c188d","head":{"label":"rgommers:inspect-depr","ref":"inspect-depr","sha":"5f740aa8f6798638be80d03275ea7bfad85c188d","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"repo":{"id":1461782,"name":"scipy","full_name":"rgommers/scipy","owner":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rgommers/scipy","description":"Scipy main repository","fork":true,"url":"https://api.github.com/repos/rgommers/scipy","forks_url":"https://api.github.com/repos/rgommers/scipy/forks","keys_url":"https://api.github.com/repos/rgommers/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rgommers/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rgommers/scipy/teams","hooks_url":"https://api.github.com/repos/rgommers/scipy/hooks","issue_events_url":"https://api.github.com/repos/rgommers/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/rgommers/scipy/events","assignees_url":"https://api.github.com/repos/rgommers/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/rgommers/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/rgommers/scipy/tags","blobs_url":"https://api.github.com/repos/rgommers/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rgommers/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rgommers/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rgommers/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rgommers/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/rgommers/scipy/languages","stargazers_url":"https://api.github.com/repos/rgommers/scipy/stargazers","contributors_url":"https://api.github.com/repos/rgommers/scipy/contributors","subscribers_url":"https://api.github.com/repos/rgommers/scipy/subscribers","subscription_url":"https://api.github.com/repos/rgommers/scipy/subscription","commits_url":"https://api.github.com/repos/rgommers/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rgommers/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rgommers/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rgommers/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rgommers/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/rgommers/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rgommers/scipy/merges","archive_url":"https://api.github.com/repos/rgommers/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rgommers/scipy/downloads","issues_url":"https://api.github.com/repos/rgommers/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/rgommers/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/rgommers/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/rgommers/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rgommers/scipy/labels{/name}","releases_url":"https://api.github.com/repos/rgommers/scipy/releases{/id}","created_at":"2011-03-10T01:35:58Z","updated_at":"2015-05-03T12:39:58Z","pushed_at":"2015-06-21T16:05:45Z","git_url":"git://github.com/rgommers/scipy.git","ssh_url":"git@github.com:rgommers/scipy.git","clone_url":"https://github.com/rgommers/scipy.git","svn_url":"https://github.com/rgommers/scipy","homepage":"http://scipy.org/","size":57666,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":6,"default_branch":"master"}},"base":{"label":"scipy:master","ref":"master","sha":"08c435a1812b1191ecf921d57f4aef4cb0ee4d36","user":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"repo":{"id":1460385,"name":"scipy","full_name":"scipy/scipy","owner":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scipy/scipy","description":"Scipy library main repository","fork":false,"url":"https://api.github.com/repos/scipy/scipy","forks_url":"https://api.github.com/repos/scipy/scipy/forks","keys_url":"https://api.github.com/repos/scipy/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scipy/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scipy/scipy/teams","hooks_url":"https://api.github.com/repos/scipy/scipy/hooks","issue_events_url":"https://api.github.com/repos/scipy/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/scipy/scipy/events","assignees_url":"https://api.github.com/repos/scipy/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/scipy/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/scipy/scipy/tags","blobs_url":"https://api.github.com/repos/scipy/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scipy/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scipy/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scipy/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/scipy/scipy/languages","stargazers_url":"https://api.github.com/repos/scipy/scipy/stargazers","contributors_url":"https://api.github.com/repos/scipy/scipy/contributors","subscribers_url":"https://api.github.com/repos/scipy/scipy/subscribers","subscription_url":"https://api.github.com/repos/scipy/scipy/subscription","commits_url":"https://api.github.com/repos/scipy/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scipy/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scipy/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scipy/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scipy/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/scipy/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scipy/scipy/merges","archive_url":"https://api.github.com/repos/scipy/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scipy/scipy/downloads","issues_url":"https://api.github.com/repos/scipy/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/scipy/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/scipy/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/scipy/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scipy/scipy/labels{/name}","releases_url":"https://api.github.com/repos/scipy/scipy/releases{/id}","created_at":"2011-03-09T18:52:03Z","updated_at":"2015-06-30T17:33:19Z","pushed_at":"2015-06-30T21:05:00Z","git_url":"git://github.com/scipy/scipy.git","ssh_url":"git@github.com:scipy/scipy.git","clone_url":"https://github.com/scipy/scipy.git","svn_url":"https://github.com/scipy/scipy","homepage":"http://scipy.org/scipylib/","size":88351,"stargazers_count":1709,"watchers_count":1709,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":937,"mirror_url":null,"open_issues_count":844,"forks":937,"open_issues":844,"watchers":1709,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/4928"},"html":{"href":"https://github.com/scipy/scipy/pull/4928"},"issue":{"href":"https://api.github.com/repos/scipy/scipy/issues/4928"},"comments":{"href":"https://api.github.com/repos/scipy/scipy/issues/4928/comments"},"review_comments":{"href":"https://api.github.com/repos/scipy/scipy/pulls/4928/comments"},"review_comment":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scipy/scipy/pulls/4928/commits"},"statuses":{"href":"https://api.github.com/repos/scipy/scipy/statuses/5f740aa8f6798638be80d03275ea7bfad85c188d"}}}}