tarak / django-password-policies

Django unicode-aware password policies.
Other
59 stars 92 forks source link

Python3 #39

Closed mjschultz closed 9 years ago

mjschultz commented 9 years ago

This does a few small changes to add support and testing for Python 3:

Within the code I've changed instances of force_unicode to force_text and smart_unicode to smart_text; see Django's guide to Porting to Python 3 for details.

I also instrumented some code to handle the "xrange is just range in Python 3" problem so xrange is used in Python 2 and range is used in Python 3.

mjschultz commented 9 years ago

I decided to drop Python 3.2 tests since this is a fairly unicode-aware app and Python 3.2 dropped support of the u'unicode' literal notation. This was quickly realized to be a bad idea and was added back in Python 3.3 and 3.4 to make it easier to port projects like this.

I can attempt to jump through the hoops to get Python 3.2 support but I think it would make the code much more convoluted than it needs to be.

mjschultz commented 9 years ago

I would not mind a PyPI release if you merge this! :)

landscape-bot commented 9 years ago

Code Health Repository health increased by 0.08% when pulling 808eaa1 on mjschultz:python3 into fb7ac2a on tarak:master.

tarak commented 9 years ago

Thx! Sorry for the delay...