nu-radio / radiotools

A tool package for cosmic-ray and neutrino radio detectors
GNU General Public License v3.0
8 stars 5 forks source link

Incompatible with Python3.11 #57

Closed Jean1995 closed 8 months ago

Jean1995 commented 11 months ago

Executing from radiotools import helper on Python3.11 fails with

>>> from radiotools import helper
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.11/site-packages/radiotools/helper.py", line 4, in <module>
    from radiotools.atmosphere import models as atm
  File "/opt/homebrew/lib/python3.11/site-packages/radiotools/atmosphere/models.py", line 3, in <module>
    from past.builtins import xrange
  File "/opt/homebrew/lib/python3.11/site-packages/past/builtins/__init__.py", line 43, in <module>
    from past.builtins.noniterators import (filter, map, range, reduce, zip)
  File "/opt/homebrew/lib/python3.11/site-packages/past/builtins/noniterators.py", line 24, in <module>
    from past.types import basestring
  File "/opt/homebrew/lib/python3.11/site-packages/past/types/__init__.py", line 25, in <module>
    from .oldstr import oldstr
  File "/opt/homebrew/lib/python3.11/site-packages/past/types/oldstr.py", line 5, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)
cg-laser commented 11 months ago

Hey @Jean1995 could you make a PR for a fix? I send you an invitation to become a collaborator for radiotools. I think this is just a simple fix of renaming the import but I don't have python 3.11 installed to test it myself. Thanks