Skip to content
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
3 changes: 1 addition & 2 deletions ckanext/security/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import codecs
import logging
import six
import flask

from ckan.common import config
Expand All @@ -19,7 +18,7 @@ def make_key():


def create_reset_key(user):
user.reset_key = six.ensure_text(make_key())
user.reset_key = make_key().decode('ascii')
model.repo.commit_and_remove()


Expand Down
2 changes: 0 additions & 2 deletions ckanext/security/schema.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# encoding: utf-8

import six

from ckan.lib.navl.validators import ignore_missing, not_empty, ignore
from ckan.logic.validators import (
name_validator, user_name_validator, user_password_not_empty,
Expand Down
5 changes: 2 additions & 3 deletions ckanext/security/validators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# encoding: utf-8
import six
import string

from ckan import authz
Expand All @@ -19,7 +18,7 @@ def user_password_validator(key, data, errors, context):

if isinstance(value, Missing):
pass # Already handled in core
elif not isinstance(value, six.string_types):
elif not isinstance(value, str):
raise Invalid(_('Passwords must be strings.'))
elif value == '':
pass # Already handled in core
Expand All @@ -42,4 +41,4 @@ def old_username_validator(key, data, errors, context):


def ensure_str(value):
return six.text_type(value)
return str(value)
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ python-magic~=0.4.24
redis~=4.1
repoze.who~=2.4
git+https://github.com/akissa/repoze.who-use_beaker@780379fd58b10264c0756feb6d3f232f797ba0cb#egg=repoze.who-use_beaker
six~=1.16.0
WebOb~=1.8.7