Skip to content

Commit

Permalink
Merge pull request #88 from James1345/fix-py276-compability
Browse files Browse the repository at this point in the history
Fix py276 compability
  • Loading branch information
belugame authored Jan 28, 2018
2 parents a79bb79 + 665c7e9 commit e0fd2a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
######
3.1.2
######
- restore compability with Python <2.7.7

######
3.1.1
######
Expand Down
3 changes: 3 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#Changelog

## 3.1.2
- restore compability with Python <2.7.7

## 3.1.1
- use hmac.compare_digest instead of == for comparing hashes for more security

Expand Down
6 changes: 5 additions & 1 deletion knox/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from hmac import compare_digest
try:
from hmac import compare_digest
except ImportError:
def compare_digest(a, b):
return a == b

from django.conf import settings
from django.utils.translation import ugettext_lazy as _
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='3.1.1',
version='3.1.2',
description='Authentication for django rest framework',
long_description=long_description,

Expand Down

0 comments on commit e0fd2a6

Please sign in to comment.