mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-01 12:56:54 +08:00
Merge pull request #2002 from srinivasreddy/928
rename log.warn to log.warning as log.warn is deprecated
This commit is contained in:
commit
1216b83e35
@ -52,7 +52,7 @@ class LoginHandler(IPythonHandler):
|
||||
allow = bool(self.allow_origin_pat.match(origin))
|
||||
if not allow:
|
||||
# not allowed, use default
|
||||
self.log.warn("Not allowing login redirect to %r" % url)
|
||||
self.log.warning("Not allowing login redirect to %r" % url)
|
||||
url = default
|
||||
self.redirect(url)
|
||||
|
||||
|
@ -192,7 +192,7 @@ class NotebookWebApplication(web.Application):
|
||||
version_hash = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
||||
|
||||
if jupyter_app.ignore_minified_js:
|
||||
log.warn("""The `ignore_minified_js` flag is deprecated and no
|
||||
log.warning("""The `ignore_minified_js` flag is deprecated and no
|
||||
longer works. Alternatively use `npm run build:watch` when
|
||||
working on the notebook's Javascript and LESS""")
|
||||
warnings.warn("The `ignore_minified_js` flag is deprecated and will be removed in Notebook 6.0", DeprecationWarning)
|
||||
|
@ -41,7 +41,7 @@ class SessionRootHandler(APIHandler):
|
||||
raise web.HTTPError(400, "No JSON data provided")
|
||||
|
||||
if 'notebook' in model and 'path' in model['notebook']:
|
||||
self.log.warn('Sessions API changed, see updated swagger docs')
|
||||
self.log.warning('Sessions API changed, see updated swagger docs')
|
||||
model['path'] = model['notebook']['path']
|
||||
model['type'] = 'notebook'
|
||||
|
||||
@ -119,7 +119,7 @@ class SessionHandler(APIHandler):
|
||||
|
||||
changes = {}
|
||||
if 'notebook' in model and 'path' in model['notebook']:
|
||||
self.log.warn('Sessions API changed, see updated swagger docs')
|
||||
self.log.warning('Sessions API changed, see updated swagger docs')
|
||||
model['path'] = model['notebook']['path']
|
||||
model['type'] = 'notebook'
|
||||
if 'path' in model:
|
||||
|
@ -521,11 +521,11 @@ def css_js_prerelease(command, strict=False):
|
||||
# die if strict or any targets didn't build
|
||||
prefix = os.path.commonprefix([repo_root + os.sep] + missing)
|
||||
missing = [ m[len(prefix):] for m in missing ]
|
||||
log.warn("rebuilding js and css failed. The following required files are missing: %s" % missing)
|
||||
log.warning("rebuilding js and css failed. The following required files are missing: %s" % missing)
|
||||
raise e
|
||||
else:
|
||||
log.warn("rebuilding js and css failed (not a problem)")
|
||||
log.warn(str(e))
|
||||
log.warning("rebuilding js and css failed (not a problem)")
|
||||
log.warning(str(e))
|
||||
|
||||
# check again for missing targets, just in case:
|
||||
missing = [ t for t in targets if not os.path.exists(t) ]
|
||||
|
Loading…
Reference in New Issue
Block a user