Merge pull request #2002 from srinivasreddy/928

rename log.warn to log.warning as log.warn is deprecated
This commit is contained in:
Thomas Kluyver 2016-12-21 18:15:32 +00:00 committed by GitHub
commit 1216b83e35
4 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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:

View File

@ -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) ]