django-radius
django-radius copied to clipboard
ImportError in Python3.10
When importing radiusauth
you now get an ImportError with Python3.10. It looks like the import of basestring
from past.builtins
is causing the issue. However, I cannot see where basestring
is referenced in the module. Commenting out the import seems to make things work though.
Python 3.10.0 (default, Oct 26 2021, 22:34:49) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import radiusauth.backends.radius
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/radiusauth/backends/__init__.py", line 1, in <module>
from radiusauth.backends.radius import RADIUSBackend, RADIUSRealmBackend
File "/usr/local/lib/python3.10/site-packages/radiusauth/backends/radius.py", line 3, in <module>
from past.builtins import basestring
File "/usr/local/lib/python3.10/site-packages/past/builtins/__init__.py", line 43, in <module>
from past.builtins.noniterators import (filter, map, range, reduce, zip)
File "/usr/local/lib/python3.10/site-packages/past/builtins/noniterators.py", line 24, in <module>
from past.types import basestring
File "/usr/local/lib/python3.10/site-packages/past/types/__init__.py", line 25, in <module>
from .oldstr import oldstr
File "/usr/local/lib/python3.10/site-packages/past/types/oldstr.py", line 5, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
update future to 0.18.2, it'll fix the import error. django-radius asks for 0.16.0 but it works with 0.18.2 as well (at least so far)
^ should be fixed by https://github.com/robgolding/django-radius/pull/27
Would be nice to get this in a release!