winpcapy icon indicating copy to clipboard operation
winpcapy copied to clipboard

`from collections import Callable` is the `collections` module instead of the correct `typing` module

Open DragonlordNewb opened this issue 1 year ago • 1 comments

In winpcapy.py, the name Callable is imported from collections at the top. However I think that it's supposed to be typing; the code throws an error when I replace the name, and Callable is a type from typings.

DragonlordNewb avatar May 16 '23 22:05 DragonlordNewb

It's something that has changed between Python versions (after 3.7) https://docs.python.org/3.7/library/collections.abc.html#module-collections.abc

You're welcome to open a PR to fix this (maybe have a try except block to try the older version import for backward compatibility)

orweis avatar May 16 '23 22:05 orweis