Skip to content

Commit

Permalink
version 0.8.2 + rely on six and not mongoengine.python_support
Browse files Browse the repository at this point in the history
  • Loading branch information
wojcikstefan committed Dec 11, 2016
1 parent ffefa9d commit 6beffd7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
=========

Development
================
- (Fill this out as you fix issues and develop you features).

Changes in 0.8.2
================
- Fixed relying on mongoengine.python_support.
- Fixed cleaning up empty connection settings #285

Changes in 0.8.1
================

Expand Down
10 changes: 5 additions & 5 deletions flask_mongoengine/wtf/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import sys

from gettext import gettext as _
from mongoengine.python_support import bin_type
from mongoengine.queryset import DoesNotExist
import six
from wtforms import widgets
from wtforms.fields import SelectFieldBase, StringField, TextAreaField
from wtforms.validators import ValidationError
Expand Down Expand Up @@ -176,11 +176,11 @@ def process_formdata(self, valuelist):

class BinaryField(TextAreaField):
"""
Custom TextAreaField that converts its value with bin_type.
Custom TextAreaField that converts its value with binary_type.
"""
def process_formdata(self, valuelist):
if valuelist:
if sys.version_info >= (3, 0):
self.data = bin_type(valuelist[0], 'utf-8')
if six.PY3:
self.data = six.binary_type(valuelist[0], 'utf-8')
else:
self.data = bin_type(valuelist[0])
self.data = six.binary_type(valuelist[0])
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Flask-WTF>=0.8.3
mongoengine>=0.8.0
flake8
flake8-import-order
six
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name='flask-mongoengine',
version='0.8.1',
version='0.8.2',
url='https://github.com/mongoengine/flask-mongoengine',
license='BSD',
author='Ross Lawley',
Expand All @@ -31,6 +31,7 @@
'Flask>=0.8',
'Flask-WTF>=0.13',
'mongoengine>=0.8.0',
'six',
],
packages=['flask_mongoengine',
'flask_mongoengine.wtf'],
Expand Down

0 comments on commit 6beffd7

Please sign in to comment.