{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/37096666","id":37096666,"diff_hunk":"@@ -631,10 +637,13 @@ def _update_ipython_widget(self, value=None):\n         # if none exists.\n         if not hasattr(self, '_widget'):\n             # Import only if an IPython widget, i.e., widget in iPython NB\n-            from IPython.html import widgets\n+            try:\n+                from ipywidgets import widgets\n+            except ImportError:\n+                from IPython.html import widgets\n             from IPython.display import display\n \n-            self._widget = widgets.FloatProgressWidget()\n+            self._widget = widgets.FloatProgress()","path":"astropy/utils/console.py","position":43,"original_position":43,"commit_id":"93cb7d91b95bf1cdb5db6f847f383c7fa7b59112","original_commit_id":"93cb7d91b95bf1cdb5db6f847f383c7fa7b59112","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"body":"`FloatProgressWidget` was deprecated (in favor of `FloatProgress`) in `3.0.0` and removed in `4.0.0`.\r\n\r\n`FloatProgress` will not work for `IPython` versions < `3.0`.  If you prefer, I can revert to `FloatProgressWidget` for `2.x`.","created_at":"2015-08-14T17:07:48Z","updated_at":"2015-08-14T17:07:48Z","html_url":"https://github.com/astropy/astropy/pull/4078#discussion_r37096666","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/4078","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/37096666"},"html":{"href":"https://github.com/astropy/astropy/pull/4078#discussion_r37096666"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4078"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4078","id":42472459,"html_url":"https://github.com/astropy/astropy/pull/4078","diff_url":"https://github.com/astropy/astropy/pull/4078.diff","patch_url":"https://github.com/astropy/astropy/pull/4078.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4078","number":4078,"state":"open","locked":false,"title":"Update imports for new release of IPython/Jupyter","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"body":"`IPython (4.0.0)` and `jupyter (1.0.0)` were released a few days ago [1].  Importing `astropy` in the new jupyter notebook gives a deprecation warning:\r\n\r\n```\r\n ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.\r\n```\r\n\r\nThis PR will try to import from the new `ipykernel` and `ipywidgets` packages (part of the Big Split) if available, otherwise try the `IPython` imports (for < `4.0.0`).  With this change, the `ShimWarning` is no longer issued in the new notebook.\r\n\r\n[1] http://blog.jupyter.org/2015/08/12/first-release-of-jupyter/","created_at":"2015-08-14T16:18:58Z","updated_at":"2015-08-14T17:07:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5708886461be6c06fdeeea5fa8aa21170bafd923","assignee":null,"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/29","html_url":"https://github.com/astropy/astropy/milestones/v1.0.5","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/29/labels","id":1240775,"number":29,"title":"v1.0.5","description":"","creator":{"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},"open_issues":4,"closed_issues":3,"state":"open","created_at":"2015-08-04T18:58:47Z","updated_at":"2015-08-14T16:57:42Z","due_on":"2015-09-04T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/4078/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/4078/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4078/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/93cb7d91b95bf1cdb5db6f847f383c7fa7b59112","head":{"label":"larrybradley:jupyter","ref":"jupyter","sha":"93cb7d91b95bf1cdb5db6f847f383c7fa7b59112","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"repo":{"id":13567623,"name":"astropy","full_name":"larrybradley/astropy","owner":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larrybradley/astropy","description":"My fork of the Repository for the Astropy core package","fork":true,"url":"https://api.github.com/repos/larrybradley/astropy","forks_url":"https://api.github.com/repos/larrybradley/astropy/forks","keys_url":"https://api.github.com/repos/larrybradley/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larrybradley/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larrybradley/astropy/teams","hooks_url":"https://api.github.com/repos/larrybradley/astropy/hooks","issue_events_url":"https://api.github.com/repos/larrybradley/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/larrybradley/astropy/events","assignees_url":"https://api.github.com/repos/larrybradley/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/larrybradley/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/larrybradley/astropy/tags","blobs_url":"https://api.github.com/repos/larrybradley/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larrybradley/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larrybradley/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/larrybradley/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larrybradley/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/larrybradley/astropy/languages","stargazers_url":"https://api.github.com/repos/larrybradley/astropy/stargazers","contributors_url":"https://api.github.com/repos/larrybradley/astropy/contributors","subscribers_url":"https://api.github.com/repos/larrybradley/astropy/subscribers","subscription_url":"https://api.github.com/repos/larrybradley/astropy/subscription","commits_url":"https://api.github.com/repos/larrybradley/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/larrybradley/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/larrybradley/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/larrybradley/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/larrybradley/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/larrybradley/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larrybradley/astropy/merges","archive_url":"https://api.github.com/repos/larrybradley/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larrybradley/astropy/downloads","issues_url":"https://api.github.com/repos/larrybradley/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/larrybradley/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/larrybradley/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/larrybradley/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larrybradley/astropy/labels{/name}","releases_url":"https://api.github.com/repos/larrybradley/astropy/releases{/id}","created_at":"2013-10-14T17:09:24Z","updated_at":"2015-06-24T17:39:31Z","pushed_at":"2015-08-14T16:07:12Z","git_url":"git://github.com/larrybradley/astropy.git","ssh_url":"git@github.com:larrybradley/astropy.git","clone_url":"https://github.com/larrybradley/astropy.git","svn_url":"https://github.com/larrybradley/astropy","homepage":"http://astropy.org","size":38660,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"a36121bd9731476bece89edc6a2d843dfa739519","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-08-11T09:46:10Z","pushed_at":"2015-08-14T16:18:58Z","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":65315,"stargazers_count":626,"watchers_count":626,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":417,"mirror_url":null,"open_issues_count":610,"forks":417,"open_issues":610,"watchers":626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4078"},"html":{"href":"https://github.com/astropy/astropy/pull/4078"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/4078"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/4078/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4078/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4078/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/93cb7d91b95bf1cdb5db6f847f383c7fa7b59112"}}}}