Remove dep on unidecode (#6673)

Not needed anymore in py3
This commit is contained in:
Maxime Beauchemin 2019-01-13 09:22:13 -08:00 committed by GitHub
parent b2f0b2bde6
commit ae6217ba55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 5 deletions

View File

@ -92,7 +92,6 @@ thrift-sasl==0.3.0
thrift==0.11.0
tornado==5.1.1 # via flower
unicodecsv==0.14.1
unidecode==1.0.22
urllib3==1.22 # via requests, selenium
vine==1.1.4 # via amqp
webencodings==0.5.1 # via bleach

View File

@ -94,7 +94,6 @@ setup(
'thrift>=0.9.3',
'thrift-sasl>=0.2.1',
'unicodecsv',
'unidecode>=0.04.21',
],
extras_require={
'cors': ['flask-cors>=2.0.0'],

View File

@ -23,7 +23,6 @@ import sqlalchemy as sqla
from sqlalchemy import and_, create_engine, MetaData, or_, update
from sqlalchemy.engine.url import make_url
from sqlalchemy.exc import IntegrityError
from unidecode import unidecode
from werkzeug.routing import BaseConverter
from werkzeug.utils import secure_filename
@ -2614,8 +2613,7 @@ class Superset(BaseSupersetView):
# TODO(bkyryliuk): add compression=gzip for big files.
csv = df.to_csv(index=False, **config.get('CSV_EXPORT'))
response = Response(csv, mimetype='text/csv')
response.headers['Content-Disposition'] = (
'attachment; filename={}.csv'.format(unidecode(query.name)))
response.headers['Content-Disposition'] = f'attachment; filename={query.name}.csv'
logging.info('Ready to return response')
return response