Closed dahristo closed 4 years ago
Hello @dahristo, thank you for this issue! You are absolutely right that this is a problem with Python before 3.8. The docs on functools in 3.8 make it clear if you know how to differentiate the two variants (user_func or int/None).
Maybe should bump up the dependency to 3.8 from 3.5 in the setup.py
I'm aiming for 3.5+ support, so a parameter fix will be the best (and easiest) option. You should not receive this error in the next release.
Thank you very much for the incompatibility hint. Version v0.10.3 is now available on PyPI. It includes multiple fixes for compatibility to Python 3.5.3 and should work for you as well!
Both pip install 0.10.2 and from git clone fails to run python3 -m netflow.collector on python 3.7 with exception
$ python -m netflow.collector -h Traceback (most recent call last): File "C:\Users\dhristov\AppData\Local\Continuum\anaconda3\envs\py37\lib\runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "C:\Users\dhristov\AppData\Local\Continuum\anaconda3\envs\py37\lib\runpy.py", line 109, in _get_module_details import(pkg_name) File "C:\techno\git\python-netflow-v9-softflowd\netflow__init__.py", line 10, in
from .utils import parse_packet
File "C:\techno\git\python-netflow-v9-softflowd\netflow\utils.py", line 16, in
from .ipfix import IPFIXExportPacket
File "C:\techno\git\python-netflow-v9-softflowd\netflow\ipfix.py", line 526, in
class IPFIXDataTypes:
File "C:\techno\git\python-netflow-v9-softflowd\netflow\ipfix.py", line 559, in IPFIXDataTypes
def by_name(cls, key: str) -> Optional[DataType]:
File "C:\Users\dhristov\AppData\Local\Continuum\anaconda3\envs\py37\lib\functools.py", line 477, in lru_cache
raise TypeError('Expected maxsize to be an integer or None')
TypeError: Expected maxsize to be an integer or None
The root cause is lru_cache before 3.8 has to have at least to be "lru_cache()".
Maybe should bump up the dependency to 3.8 from 3.5 in the setup.py