Skip to content

Commit

Permalink
digitalmarketplace-utils dependency: bump to 43.0.0, remove featurefl…
Browse files Browse the repository at this point in the history
…ags references, fix error handlers for flask 0.12
  • Loading branch information
risicle committed Aug 24, 2018
1 parent 8072d8a commit c919ace
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
4 changes: 1 addition & 3 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy import MetaData

import dmapiclient
from dmutils import init_app, flask_featureflags
from dmutils import init_app

from config import configs

Expand All @@ -17,7 +17,6 @@
"pk": "%(table_name)s_pkey",
}))
search_api_client = dmapiclient.SearchAPIClient()
feature_flags = flask_featureflags.FeatureFlag()


def create_app(config_name):
Expand All @@ -28,7 +27,6 @@ def create_app(config_name):
application,
configs[config_name],
db=db,
feature_flags=feature_flags,
search_api_client=search_api_client
)

Expand Down
6 changes: 4 additions & 2 deletions app/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import jsonify
from werkzeug.exceptions import default_exceptions

from .main import main
from .callbacks import callbacks
Expand All @@ -25,5 +26,6 @@ def generic_error_handler(e):


for code in range(400, 599):
main.app_errorhandler(code)(generic_error_handler)
callbacks.app_errorhandler(code)(generic_error_handler)
if code in default_exceptions: # flask complains if we attempt to register a handler for status code its unaware of
main.app_errorhandler(code)(generic_error_handler)
callbacks.app_errorhandler(code)(generic_error_handler)
3 changes: 0 additions & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class Config:
DM_LOG_PATH = None
DM_APP_NAME = 'api'

# Feature Flags
RAISE_ERROR_ON_MISSING_FEATURES = True

DM_API_SERVICES_PAGE_SIZE = 100
DM_API_SUPPLIERS_PAGE_SIZE = 100
DM_API_BRIEFS_PAGE_SIZE = 100
Expand Down
6 changes: 2 additions & 4 deletions requirements-app.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Run `make freeze-requirements` to update requirements.txt
# with package version changes made in requirements-app.txt

Flask==0.10.1
Flask==0.12.4
Flask-Bcrypt==0.7.1
Flask-Migrate==2.0.3
Flask-SQLAlchemy==2.1
Expand All @@ -10,9 +10,7 @@ psycopg2==2.7.3
SQLAlchemy==1.1.4
SQLAlchemy-Utils==0.30.5

git+https://github.com/alphagov/[email protected]#egg=Flask-FeatureFlags==1.0

git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-utils==41.2.1
git+https://github.com/alphagov/digitalmarketplace-utils.git@ris-flask-0-12#egg=digitalmarketplace-utils==43.0.0
git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-apiclient==19.0.0

# For schema validation
Expand Down
9 changes: 4 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Run `make freeze-requirements` to update requirements.txt
# with package version changes made in requirements-app.txt

Flask==0.10.1
Flask==0.12.4
Flask-Bcrypt==0.7.1
Flask-Migrate==2.0.3
Flask-SQLAlchemy==2.1
Expand All @@ -11,9 +11,7 @@ psycopg2==2.7.3
SQLAlchemy==1.1.4
SQLAlchemy-Utils==0.30.5

git+https://github.com/alphagov/[email protected]#egg=Flask-FeatureFlags==1.0

git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-utils==41.2.1
git+https://github.com/alphagov/digitalmarketplace-utils.git@ris-flask-0-12#egg=digitalmarketplace-utils==43.0.0
git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-apiclient==19.0.0

# For schema validation
Expand All @@ -27,9 +25,10 @@ asn1crypto==0.24.0
bcrypt==3.1.4
boto3==1.4.8
botocore==1.8.50
certifi==2018.4.16
certifi==2018.8.13
cffi==1.11.5
chardet==3.0.4
click==6.7
contextlib2==0.4.0
cryptography==2.3
docopt==0.4.0
Expand Down

0 comments on commit c919ace

Please sign in to comment.