{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/24499747","id":24499747,"diff_hunk":"@@ -111,6 +121,19 @@ def minversion(module, version, inclusive=True, version_path='__version__'):\n     True\n     \"\"\"\n \n+    if isinstance(module, types.ModuleType):\n+        module_name = module.__name__\n+    elif isinstance(module, six.string_types):\n+        module_name = module\n+        try:\n+            module = resolve_name(module_name)\n+        except ImportError:\n+            return False","path":"astropy/utils/introspection.py","position":51,"original_position":51,"commit_id":"ef6446d0fae60de3b8d34761abd3f847c2f40f0f","original_commit_id":"ef6446d0fae60de3b8d34761abd3f847c2f40f0f","user":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"body":"See my comment in #3478 - I do think you should let the import error be raised. If some package needs it in their setup, then the import error should actually happen.  Note that this should never be a problem: before we just imported numpy during setup as well to construct the various `NUMPY_LT_...` strings.","created_at":"2015-02-11T14:51:39Z","updated_at":"2015-02-11T14:51:39Z","html_url":"https://github.com/astropy/astropy/pull/3479#discussion_r24499747","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3479","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/24499747"},"html":{"href":"https://github.com/astropy/astropy/pull/3479#discussion_r24499747"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3479"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3479","id":29045168,"html_url":"https://github.com/astropy/astropy/pull/3479","diff_url":"https://github.com/astropy/astropy/pull/3479.diff","patch_url":"https://github.com/astropy/astropy/pull/3479.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3479","number":3479,"state":"open","locked":false,"title":"Ensure that NUMPY_LT_ constants are always defined","user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"body":"@mdboom -- does this fix #3478 for you?","created_at":"2015-02-10T21:12:57Z","updated_at":"2015-02-11T14:51:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d69730e6d9f95fe767e10284a70f2b7ed7acc3c2","assignee":null,"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/15","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/15/labels","id":643887,"number":15,"title":"v1.0.0","description":"","creator":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":308,"state":"open","created_at":"2014-04-29T16:03:02Z","updated_at":"2015-02-11T09:53:25Z","due_on":"2015-01-23T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3479/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3479/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3479/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/ef6446d0fae60de3b8d34761abd3f847c2f40f0f","head":{"label":"embray:utils/minversion-2","ref":"utils/minversion-2","sha":"ef6446d0fae60de3b8d34761abd3f847c2f40f0f","user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"repo":{"id":2223452,"name":"astropy","full_name":"embray/astropy","owner":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/embray/astropy","description":"My fork of the main Astropy repository (astropy/astropy)","fork":true,"url":"https://api.github.com/repos/embray/astropy","forks_url":"https://api.github.com/repos/embray/astropy/forks","keys_url":"https://api.github.com/repos/embray/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embray/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embray/astropy/teams","hooks_url":"https://api.github.com/repos/embray/astropy/hooks","issue_events_url":"https://api.github.com/repos/embray/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/embray/astropy/events","assignees_url":"https://api.github.com/repos/embray/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/embray/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/embray/astropy/tags","blobs_url":"https://api.github.com/repos/embray/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embray/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embray/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/embray/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embray/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/embray/astropy/languages","stargazers_url":"https://api.github.com/repos/embray/astropy/stargazers","contributors_url":"https://api.github.com/repos/embray/astropy/contributors","subscribers_url":"https://api.github.com/repos/embray/astropy/subscribers","subscription_url":"https://api.github.com/repos/embray/astropy/subscription","commits_url":"https://api.github.com/repos/embray/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/embray/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/embray/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/embray/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/embray/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/embray/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embray/astropy/merges","archive_url":"https://api.github.com/repos/embray/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embray/astropy/downloads","issues_url":"https://api.github.com/repos/embray/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/embray/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/embray/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/embray/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embray/astropy/labels{/name}","releases_url":"https://api.github.com/repos/embray/astropy/releases{/id}","created_at":"2011-08-17T18:24:15Z","updated_at":"2015-01-30T19:37:38Z","pushed_at":"2015-02-11T00:05:59Z","git_url":"git://github.com/embray/astropy.git","ssh_url":"git@github.com:embray/astropy.git","clone_url":"https://github.com/embray/astropy.git","svn_url":"https://github.com/embray/astropy","homepage":"astropy.org","size":47317,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"c36bec40373f3a9598bb1cf0e36b6df013b6fdc3","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","created_at":"2011-07-21T01:33:49Z","updated_at":"2015-02-11T09:53:27Z","pushed_at":"2015-02-11T11:06:09Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":57406,"stargazers_count":508,"watchers_count":508,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":342,"mirror_url":null,"open_issues_count":429,"forks":342,"open_issues":429,"watchers":508,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3479"},"html":{"href":"https://github.com/astropy/astropy/pull/3479"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3479"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3479/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3479/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3479/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/ef6446d0fae60de3b8d34761abd3f847c2f40f0f"}}}}