IBM / django-ibmi

Django adapter for IBM i
Apache License 2.0
3 stars 5 forks source link

Remove support for Django versions prior to 2.2 #22

Closed kadler closed 3 years ago

kadler commented 3 years ago

Things like this can get removed:

if djangoVersion[0:2] < ( 2, 2):
    # do something the old way, incompatible with new versions

Things like this can have their if check removed and code inlined (2.0/2.1)

if djangoVersion[0:2] > ( 2,0):
    # do something only supported on newer versions

Any version check that's less than 2.2 can be handled this way. Any newer checks eg. 3.0+ (which I don't think there are) will need to be left.

kadler commented 3 years ago

Things like this can also probably be cleaned up: https://github.com/IBM/django-ibmi/blob/master/django_ibmi/base.py#L29-L42 and either stop referencing the package name in the try blocks or the except blocks.