kisom / pypcapfile

Pure Python library for handling libpcap savefiles.
http://kisom.github.com/pypcapfile
ISC License
76 stars 33 forks source link

Broken on Python 3.12 #56

Closed dos1 closed 4 months ago

dos1 commented 4 months ago

linklayer.py relies on deprecated module that got removed from Python 3.12:

>>> from pcapfile import savefile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dos/git/ViewSB/venv/lib/python3.12/site-packages/pcapfile/savefile.py", line 13, in <module>
    import pcapfile.linklayer as linklayer
  File "/home/dos/git/ViewSB/venv/lib/python3.12/site-packages/pcapfile/linklayer.py", line 7, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses