django-encrypted-id icon indicating copy to clipboard operation
django-encrypted-id copied to clipboard

Python 2.7.3. error

Open Eimis opened this issue 8 years ago • 3 comments

Hey :) I noticed that when get_by_ekey_or_404() is used with Python 2.7.3 it fails on struct.unpack() method, probably because of from __future__ import unicode_literals. We had your library on production, so I had to apply a dirty monkeypatch and I'm not actually sure if this will fix the bug, but you might want to look into this :) This is the small code change: https://github.com/Eimis/django-encrypted-id/commit/9952f23eac048b2ea6a9157a1d08d4742274ed14

Eimis avatar Jul 06 '16 08:07 Eimis

:-)

Thanks for reporting and fix. Will implement it and release soon.

amitu avatar Jul 08 '16 05:07 amitu

@jatinderjit please do this.

amitu avatar Jun 04 '17 11:06 amitu

@Eimis I'm unable to reproduce the issue. Though the string formats we used struct.pack and struct.unpack inconsistently, but the struct functions seem to handle them regardless of the format (tested in Python 2.7.3 and Python 3.5.2)

Could you provide a specific case where you faced this issue?

jatinderjit avatar Jun 06 '17 05:06 jatinderjit