Skip to content

Conversation

@jdfreder
Copy link
Contributor

  • tests

@jdfreder jdfreder added this to the 4.0 milestone Apr 20, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user=False shouldn't be hardcoded

@jasongrout
Copy link
Member

Async rabbit for you! 🐰

@jdfreder
Copy link
Contributor Author

This is ready for review/merge

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add log to settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though it looked like settings was being used as a generic budle of things, but I must have been imagining it. I'll set it on self.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mainly asking because we log everywhere, and don't need access in
settings, so I was dubious that it actually needed to be added.

On Mon, Apr 20, 2015 at 5:16 PM, Jonathan Frederic <[email protected]

wrote:

In jupyter_notebook/notebookapp.py
#34 (comment)
:

@@ -203,6 +241,7 @@ def init_settings(self, ipython_app, kernel_manager, contents_manager,
config=ipython_app.config,
jinja2_env=env,
terminals_available=False, # Set later if terminals are available

  •        log=log,
    

[image: ✔️]


Reply to this email directly or view it on GitHub
https://github.com/jupyter/jupyter_notebook/pull/34/files#r28741120.

@jdfreder
Copy link
Contributor Author

@minrk the last commit greatly simplifies the deprecation handler.

@jdfreder
Copy link
Contributor Author

I think I can still make it one handler... One second.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't check for or serve the file, you can just redirect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but then my deprecation warning doesn't show.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@minrk this is driving me crazy- for the case of http://localhost:8888/deprecatedwidgets/js/init.js this yields:

console.warn('`/static/widgets/js` is deprecated.  Use `/nbextensions/widgets/widgets/js` instead.');
define(['/nbextensions/widgets/widgets/js/init.js'], function(x) { console.log('...loaded...'); return x; });

In the notebook, when I require this file, the warning shows in the console. After the ~5sec require js timeout, a load timeout error is shown, no 404s in the network panel of the browser debugging tools, and the "...loaded..." text is never printed. HOWEVER, when I try to access the file manually by navigating to http://localhost:8888/nbextensions/widgets/widgets/js/init.js it loads just fine!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling it's the last bullet here :http://requirejs.org/docs/errors.html#timeout

@jdfreder jdfreder force-pushed the smallsplit branch 4 times, most recently from c5c6442 to 797893d Compare April 21, 2015 15:40
@jdfreder
Copy link
Contributor Author

@minrk I moved the handler class def out of the closure. The problem causing the require js timeout was the import paths in /ipython_widgets/static/notebook/js/extension.js not matching the path(s) written by the deprecation warning. I'm not satisfied with the current state of things, which requires a / prefix and .js suffix on the require import. This is because using nbextensions/... gets interpreted as /notebooks/CWD/nbextensions/... - which doesn't make sense. It's almost as if the page.html require config is just being ignored in this case. I'm looking some more into this...

TL;DR This warning is now working, but I want to tweak somethings before we think about merging.

@jdfreder
Copy link
Contributor Author

/me sighs

I must have been tired last night - didn't notice the .js being appended to the path, which is why the / was required. Everything is fixed now - ready for review or merge.

This is a combination of 9 commits.

Shim IPython.html.widgets
Add flags to widgets install.
Put shim in IPython instead
Add deprecation warning to Javascript source
Move tests
Don't use setting to pass log arround.
Simplify deprecated handler.
Use requirejs to perform redirect.
@jdfreder
Copy link
Contributor Author

I squashed the last 8 commits, which all related to the JS deprecation warning, making this PR more lean.

@minrk
Copy link
Member

minrk commented Apr 21, 2015

@jdfreder sorry for the struggle. This is looking good, now.

@minrk
Copy link
Member

minrk commented Apr 21, 2015

@jdfreder almost there. Can you remove widget.less from ipython.less so that building css works?

@jdfreder
Copy link
Contributor Author

Yes, that brings up a good point - after the new repository, and your history cleaning, I'll need to do something about the CSS...

@minrk
Copy link
Member

minrk commented Apr 21, 2015

I suspect we'll want to add require-css or similar.

@jdfreder
Copy link
Contributor Author

Can you remove widget.less from ipython.less so that building css

✔️

minrk added a commit that referenced this pull request Apr 21, 2015
Segregating the widgets (the Small Split)
@minrk minrk merged commit 89f57d7 into jupyter:master Apr 21, 2015
@minrk
Copy link
Member

minrk commented Apr 21, 2015

@jdfreder thanks. I've started the actual split to create the widgets repo, but I have somewhere I need to be this evening, so it probably won't finish before tomorrow.

@jdfreder
Copy link
Contributor Author

No rush, thanks for doing that! : )

jdfreder pushed a commit to jdfreder/notebook that referenced this pull request Apr 23, 2015
Segregating the widgets (the Small Split)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants