ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

pybase: drop unused imports for Django >= 2.2 #81

Closed 0x2ec closed 1 year ago

0x2ec commented 1 year ago

Neither force_bytes or force_text are used. Initially I was going to replace force_text with force_str for Django 4 support (force_text was removed), but realised that neither of those functions are referenced anywhere.

Tested with Django 4.0.

0x2ec commented 1 year ago

Just to note: As force_text doesn't exist in Django 4, I couldn't get the connection working before this change was added.

praveen-db2 commented 1 year ago

Appreciate your contribution, I will consider this change in my next delivery, which I am taking up shortly.

0x2ec commented 1 year ago

Thanks! I think the imports of force_text and force_bytes could be removed for all the django versions, but I decided for this PR to go with the smallest change that unblocks me (to make it work with Django 4).

0x2ec commented 1 year ago

I've been pushing more commits to master, so I'll split my stack of changes into multiple PRs.