migrating flask imports (#525)
This commit is contained in:
parent
06a920502c
commit
8e5323e2d7
|
@ -9,7 +9,7 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from flask.ext.principal import Permission, RoleNeed
|
from flask_principal import Permission, RoleNeed
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
operator_permission = Permission(RoleNeed('operator'))
|
operator_permission = Permission(RoleNeed('operator'))
|
||||||
|
|
|
@ -17,10 +17,10 @@ from datetime import datetime, timedelta
|
||||||
|
|
||||||
from flask import g, current_app, jsonify, request
|
from flask import g, current_app, jsonify, request
|
||||||
|
|
||||||
from flask.ext.restful import Resource
|
from flask_restful import Resource
|
||||||
from flask.ext.principal import identity_loaded, RoleNeed, UserNeed
|
from flask_principal import identity_loaded, RoleNeed, UserNeed
|
||||||
|
|
||||||
from flask.ext.principal import Identity, identity_changed
|
from flask_principal import Identity, identity_changed
|
||||||
|
|
||||||
from cryptography.hazmat.backends import default_backend
|
from cryptography.hazmat.backends import default_backend
|
||||||
from cryptography.hazmat.primitives import serialization
|
from cryptography.hazmat.primitives import serialization
|
||||||
|
|
|
@ -11,8 +11,8 @@ import requests
|
||||||
|
|
||||||
from flask import Blueprint, current_app
|
from flask import Blueprint, current_app
|
||||||
|
|
||||||
from flask.ext.restful import reqparse, Resource, Api
|
from flask_restful import reqparse, Resource, Api
|
||||||
from flask.ext.principal import Identity, identity_changed
|
from flask_principal import Identity, identity_changed
|
||||||
|
|
||||||
from lemur.extensions import metrics
|
from lemur.extensions import metrics
|
||||||
from lemur.common.utils import get_psuedo_random_string
|
from lemur.common.utils import get_psuedo_random_string
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint, g
|
from flask import Blueprint, g
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.common.utils import paginated_parser
|
from lemur.common.utils import paginated_parser
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
|
|
|
@ -9,7 +9,7 @@ import base64
|
||||||
from builtins import str
|
from builtins import str
|
||||||
|
|
||||||
from flask import Blueprint, make_response, jsonify, g
|
from flask import Blueprint, make_response, jsonify, g
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
from lemur.common.utils import paginated_parser
|
from lemur.common.utils import paginated_parser
|
||||||
|
|
|
@ -12,7 +12,7 @@ import random
|
||||||
from cryptography import x509
|
from cryptography import x509
|
||||||
from cryptography.hazmat.backends import default_backend
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
|
||||||
from flask.ext.restful.reqparse import RequestParser
|
from flask_restful.reqparse import RequestParser
|
||||||
|
|
||||||
paginated_parser = RequestParser()
|
paginated_parser = RequestParser()
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
:license: Apache, see LICENSE for more details.
|
:license: Apache, see LICENSE for more details.
|
||||||
"""
|
"""
|
||||||
from flask import current_app, Blueprint
|
from flask import current_app, Blueprint
|
||||||
from flask.ext.restful import Api
|
from flask_restful import Api
|
||||||
|
|
||||||
from lemur.auth.service import AuthenticatedResource
|
from lemur.auth.service import AuthenticatedResource
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import Api, reqparse
|
from flask_restful import Api, reqparse
|
||||||
from lemur.destinations import service
|
from lemur.destinations import service
|
||||||
|
|
||||||
from lemur.auth.service import AuthenticatedResource
|
from lemur.auth.service import AuthenticatedResource
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.domains import service
|
from lemur.domains import service
|
||||||
from lemur.auth.service import AuthenticatedResource
|
from lemur.auth.service import AuthenticatedResource
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint, g
|
from flask import Blueprint, g
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.common.utils import paginated_parser
|
from lemur.common.utils import paginated_parser
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
from lemur.common.utils import paginated_parser
|
from lemur.common.utils import paginated_parser
|
||||||
|
|
|
@ -17,8 +17,8 @@ from gunicorn.config import make_settings
|
||||||
from cryptography.fernet import Fernet
|
from cryptography.fernet import Fernet
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask.ext.script import Manager, Command, Option, prompt_pass
|
from flask_script import Manager, Command, Option, prompt_pass
|
||||||
from flask.ext.migrate import Migrate, MigrateCommand, stamp
|
from flask_migrate import Migrate, MigrateCommand, stamp
|
||||||
from flask_script.commands import ShowUrls, Clean, Server
|
from flask_script.commands import ShowUrls, Clean, Server
|
||||||
|
|
||||||
from lemur import database
|
from lemur import database
|
||||||
|
|
|
@ -32,4 +32,4 @@ def upgrade():
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_constraint(None, 'certificates', type_='unique')
|
op.drop_constraint(None, 'certificates', type_='unique')
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import Api, reqparse
|
from flask_restful import Api, reqparse
|
||||||
from lemur.notifications import service
|
from lemur.notifications import service
|
||||||
from lemur.notifications.schemas import notification_input_schema, notification_output_schema, notifications_output_schema
|
from lemur.notifications.schemas import notification_input_schema, notification_output_schema, notifications_output_schema
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import Api, reqparse
|
from flask_restful import Api, reqparse
|
||||||
from lemur.auth.service import AuthenticatedResource
|
from lemur.auth.service import AuthenticatedResource
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint, g
|
from flask import Blueprint, g
|
||||||
from flask import make_response, jsonify
|
from flask import make_response, jsonify
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.roles import service
|
from lemur.roles import service
|
||||||
from lemur.auth.service import AuthenticatedResource
|
from lemur.auth.service import AuthenticatedResource
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
from flask.ext.restful import Api, reqparse
|
from flask_restful import Api, reqparse
|
||||||
from lemur.sources import service
|
from lemur.sources import service
|
||||||
|
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
|
|
|
@ -3,7 +3,7 @@ import pytest
|
||||||
|
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
|
||||||
from flask.ext.principal import identity_changed, Identity
|
from flask_principal import identity_changed, Identity
|
||||||
|
|
||||||
from lemur import create_app
|
from lemur import create_app
|
||||||
from lemur.database import db as _db
|
from lemur.database import db as _db
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>
|
||||||
"""
|
"""
|
||||||
from flask import g, Blueprint
|
from flask import g, Blueprint
|
||||||
from flask.ext.restful import reqparse, Api
|
from flask_restful import reqparse, Api
|
||||||
|
|
||||||
from lemur.common.schema import validate_schema
|
from lemur.common.schema import validate_schema
|
||||||
from lemur.common.utils import paginated_parser
|
from lemur.common.utils import paginated_parser
|
||||||
|
|
Loading…
Reference in New Issue