Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializable fix #122

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion brubeck/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def gen_hexdigest(raw_password, algorithm=BCRYPT, salt=None):
# bcrypt has a special salt
if salt is None:
salt = bcrypt.gensalt()
return (algorithm, salt, bcrypt.hashpw(raw_password, salt))
return (algorithm, salt, bcrypt.hashpw(raw_password.encode('utf-8'), salt.encode('utf-8')))
raise ValueError('Unknown password algorithm')


Expand Down
2 changes: 1 addition & 1 deletion brubeck/request_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def coro_spawn(function, app, message, *a, **kw):
import os, sys
from request import Request, to_bytes, to_unicode

from schematics.serialize import for_jsonschema, from_jsonschema
from schematics.types.serializable import for_jsonschema, from_jsonschema

import ujson as json

Expand Down
4 changes: 1 addition & 3 deletions envs/brubeck.reqs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
Cython==0.15.1
Jinja2==2.6
#Mako==0.7.0
#tornado==2.2
#pystache==0.5.1
dictshield==0.4.3
py-bcrypt==0.2
pymongo==2.1.1
python-dateutil==2.1
pyzmq==2.1.11
ujson==1.18
-e git+git://github.com/reduxdj/schematics/tree/v0.9.2