[sagenb] 01/01: Fix more DeprecationWarnings

Ximin Luo infinity0 at debian.org
Mon Oct 3 22:40:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagenb.

commit ac64e3e3b9cef5e584640578471e84a59d961eb5
Author: Ximin Luo <infinity0 at pwned.gg>
Date:   Tue Oct 4 00:37:58 2016 +0200

    Fix more DeprecationWarnings
---
 debian/patches/update-flask-0.11.patch | 108 +++++++++++++++++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/debian/patches/update-flask-0.11.patch b/debian/patches/update-flask-0.11.patch
index f0180d0..7194de7 100644
--- a/debian/patches/update-flask-0.11.patch
+++ b/debian/patches/update-flask-0.11.patch
@@ -184,3 +184,111 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  _ = gettext
  
  from threading import Lock
+--- a/sagenb/notebook/challenge.py
++++ b/sagenb/notebook/challenge.py
+@@ -27,7 +27,7 @@
+ import os, random, re, urllib2, urllib
+ 
+ from sagenb.notebook.template import template
+-from flask.ext.babel import gettext, lazy_gettext
++from flask_babel import gettext, lazy_gettext
+ _ = lazy_gettext
+ 
+ class ChallengeResponse(object):
+--- a/sagenb/notebook/conf.py
++++ b/sagenb/notebook/conf.py
+@@ -9,7 +9,7 @@
+ #  The full text of the GPL is available at:
+ #                  http://www.gnu.org/licenses/
+ #############################################################################
+-from flask.ext.babel import gettext, lazy_gettext
++from flask_babel import gettext, lazy_gettext
+ 
+ POS = 'pos'
+ DESC = 'desc'
+--- a/sagenb/notebook/notebook.py
++++ b/sagenb/notebook/notebook.py
+@@ -45,7 +45,7 @@
+ from . import user_conf    # user configuration
+ from . import user         # users
+ from   template import template, prettify_time_ago
+-from flask.ext.babel import gettext, lazy_gettext
++from flask_babel import gettext, lazy_gettext
+ 
+ try:
+     # sage is installed
+--- a/sagenb/notebook/register.py
++++ b/sagenb/notebook/register.py
+@@ -12,7 +12,7 @@
+ """
+ Helper functions dealing with the verification of user  
+ """
+-from flask.ext.babel import gettext as _
++from flask_babel import gettext as _
+ 
+ def build_msg(key, username, addr, port, secure):
+     url_prefix = "https" if secure else "http"
+--- a/sagenb/notebook/server_conf.py
++++ b/sagenb/notebook/server_conf.py
+@@ -8,7 +8,7 @@
+ from conf import (POS, DESC, GROUP, TYPE, CHOICES, T_BOOL, T_INTEGER,
+                   T_CHOICE, T_REAL, T_COLOR, T_STRING, T_LIST, T_INFO)
+ from sagenb.misc.misc import get_languages, N_
+-from flask.ext.babel import gettext, lazy_gettext
++from flask_babel import gettext, lazy_gettext
+ _ = lazy_gettext
+ 
+ defaults = {'word_wrap_cols':72,
+--- a/sagenb/notebook/template.py
++++ b/sagenb/notebook/template.py
+@@ -20,7 +20,7 @@
+ import os, re, sys
+ 
+ from sagenb.misc.misc import SAGE_VERSION, DATA
+-from flask.ext.babel import gettext, ngettext, lazy_gettext
++from flask_babel import gettext, ngettext, lazy_gettext
+ from flask import current_app as app
+ 
+ if os.environ.has_key('SAGENB_TEMPLATE_PATH'):
+--- a/sagenb/notebook/tutorial.py
++++ b/sagenb/notebook/tutorial.py
+@@ -348,7 +348,7 @@
+ 
+ #####################################
+ 
+-from flask.ext.babel import lazy_gettext as _
++from flask_babel import lazy_gettext as _
+ 
+ notebook_help = [
+     (_('Find Help and Documentation'),
+--- a/sagenb/notebook/user_conf.py
++++ b/sagenb/notebook/user_conf.py
+@@ -7,7 +7,7 @@
+ from conf import (Configuration, POS, DESC, GROUP, TYPE, CHOICES, T_BOOL,
+                   T_INTEGER, T_CHOICE, T_REAL, T_COLOR, T_STRING, T_LIST)
+ from sagenb.misc.misc import SAGENB_ROOT, get_languages
+-from flask.ext.babel import lazy_gettext
++from flask_babel import lazy_gettext
+ 
+ defaults = {'max_history_length':1000,
+             'default_system':'sage',
+--- a/sagenb/notebook/worksheet.py
++++ b/sagenb/notebook/worksheet.py
+@@ -56,7 +56,7 @@
+ # Imports specifically relevant to the sage notebook
+ from cell import Cell, TextCell
+ from template import template, clean_name, prettify_time_ago
+-from flask.ext.babel import gettext, lazy_gettext
++from flask_babel import gettext, lazy_gettext
+ _ = gettext
+ 
+ # Set some constants that will be used for regular expressions below.
+@@ -4405,7 +4405,7 @@
+     Converts ``t`` (in Unix time) to a locale-specific string
+     describing the time and date.
+     """
+-    from flask.ext.babel import format_datetime
++    from flask_babel import format_datetime
+     import datetime, time
+     try:
+         return format_datetime(datetime.datetime.fromtimestamp(float(t)))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list