﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26016	Django 1.9 dropped compatibility with py-bcrypt (as an alternative to bcrypt)	Raphaël Hertzog	Tim Graham	"In Debian, our python-bcrypt package is currently based on py-bcrypt (https://pypi.python.org/pypi/py-bcrypt) and it always worked fine with Django. With version 1.9 however, the test suite now fails with errors like this:

{{{
======================================================================
ERROR: test_bcrypt (auth_tests.test_hashers.TestUtilsHashPass)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/tmp/adttmp.u2Wozt/django-tests/auth_tests/test_hashers.py"", line 167, in test_bcrypt
    encoded = make_password('lètmein', hasher='bcrypt')
  File ""/usr/lib/python3/dist-packages/django/contrib/auth/hashers.py"", line 74, in make_password
    salt = hasher.salt()
  File ""/usr/lib/python3/dist-packages/django/contrib/auth/hashers.py"", line 289, in salt
    return bcrypt.gensalt(rounds=self.rounds)
TypeError: gensalt() got an unexpected keyword argument 'rounds'
}}}

This code works with bcrypt (https://pypi.python.org/pypi/bcrypt). I believe that keeping the compatibility with py-bcrypt is as easy as replacing the named parameter with the positional parameter that was used until commit 23529fb19594ffcc6ba6d716356b828157200288

The commit does not give a good reason why this change was actually needed... so I would suggest to revert it (and on the Debian side we will still upgrade our python-bcrypt to bcrypt instead of py-bcrypt but I wanted to file this to let you know and at least to document this regression for other users)."	Bug	closed	contrib.auth	1.9	Normal	fixed		FunkyBob	Accepted	0	0	0	0	0	0
