nnseva / django-access

Django-Access - the application introducing dynamic evaluation-based instance-level (row-level) access rights control for Django
GNU Lesser General Public License v3.0
78 stars 6 forks source link

Python/Django compatibility #14

Closed Pro100Sany closed 1 year ago

Pro100Sany commented 1 year ago

Hi! I found one more incompatibility: Python 3.11 Django 4.1

The error occured: AttributeError: module 'collections' has no attribute 'Iterable', when i tried to return some dict in CheckAblePlugin in appendable. Please correct it as you wish.

nnseva commented 1 year ago

Hi! Please notice that the changes should be backward-compatible. Please fix your code to be compatible with all versions of Python. It might look like:

try:
    from collections import Iterable
except ImportError:
    from collections.abs import Iterable
...
    if isinstance(v, Iterable)...
Pro100Sany commented 1 year ago

I added changes as you suggested. Check it please.