py3 compat changes

This commit is contained in:
Maxime Beauchemin 2015-10-20 00:11:39 -07:00
parent 5a967031c8
commit e3e3d0b1f5
3 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,9 @@ def load_examples(sample):
BirthNames.create(db.engine)
session = db.session()
with gzip.open(config.get("BASE_DIR") + '/data/birth_names.csv.gz') as f:
with gzip.open(
config.get("BASE_DIR") + '/data/birth_names.csv.gz',
encoding="ascii") as f:
bb_csv = csv.reader(f)
for i, (state, year, name, gender, num) in enumerate(bb_csv):
if i == 0 or year < "1965": # jumpy data before 1965

View File

@ -458,7 +458,6 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
engine = self.database.get_sqla_engine()
sql = str(qry.compile(engine, compile_kwargs={"literal_binds": True}))
print sql
df = read_sql_query(
sql=sql,
con=engine

View File

@ -1,7 +1,6 @@
import imp
import os
import unittest
import urllib2
os.environ['PANORAMIX_CONFIG'] = 'tests.panoramix_test_config'
from flask.ext.testing import LiveServerTestCase, TestCase