django-simple-captcha icon indicating copy to clipboard operation
django-simple-captcha copied to clipboard

python 2.7 compatibility

Open AymRod opened this issue 7 years ago • 3 comments

With python 2.7, when installing django-simple-captcha with pip 9.0, pip downloads django 2.0 (released 2017/12/02), and executes the command python setup.py egg_info, which results in an error: AttributeError: 'module' object has no attribute 'lru_cache'. Before django 2.0 was released, it installed django 1.11, and there was no problem. django <2.0 did support python 2.7, but django >=2.0 does not, which is I think the cause of the bug. To sum up, "pip install django-simple-captcha" downloads django 2.0 which is not compatible with python 2.7.

dsc_error

AymRod avatar Dec 20 '17 13:12 AymRod

Hmm yes, I see the problem, but I'm note quite sure how to express a dynamic dependency in setup.py based on whether we're installing with Py2 or Py3.

Any ideas?

EDIT: here is the answer!

mbi avatar Dec 20 '17 19:12 mbi

As a workaround, you could install Django first and then install django-simple-captcha.

prokaktus avatar Jan 08 '18 04:01 prokaktus

Well... since python2 and Django 1.11 are both EOL by now, would it make sense to drop support for python2 and require Django 2.2+ (which is the oldest version of Django currently supported)?

jannh avatar May 24 '20 10:05 jannh