snare icon indicating copy to clipboard operation
snare copied to clipboard

Python 3.10 breaks Snare

Open t3chn0m4g3 opened this issue 2 years ago • 3 comments

Snare currently does not support Python 3.10 due to ... :

snare           | Traceback (most recent call last):
snare           |   File "/usr/bin/snare", line 4, in <module>
snare           |     __import__('pkg_resources').run_script('Snare==0.3.0', 'snare')
snare           |   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 656, in run_script
snare           |     self.require(requires)[0].run_script(script_name, ns)
snare           |   File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1460, in run_script
snare           |     exec(script_code, namespace, namespace)
snare           |   File "/usr/lib/python3.10/site-packages/Snare-0.3.0-py3.10.egg/EGG-INFO/scripts/snare", line 30, in <module>
snare           |   File "/usr/lib/python3.10/site-packages/Snare-0.3.0-py3.10.egg/snare/server.py", line 3, in <module>
snare           |   File "/usr/lib/python3.10/site-packages/aiohttp_jinja2/__init__.py", line 5, in <module>
snare           |     from collections import Mapping
snare           | ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
snare exited with code 1

t3chn0m4g3 avatar Jun 03 '22 15:06 t3chn0m4g3

I can confirm the same issue. Is there another Python version that can be used?

Rapsoulis avatar Jun 26 '22 13:06 Rapsoulis

Python 3.9 works fine for now.

t3chn0m4g3 avatar Jun 26 '22 14:06 t3chn0m4g3

The import seems to have been removed in https://github.com/aio-libs/aiohttp-jinja2/commit/3f9efc900a4ca0f2a43fea76ca8209e873873bfd#diff-34b91be528320edc4dccf295f1897a54ad72af8f243e0030fc9b4a0207b90ef1L5

tirkarthi avatar Jul 20 '22 09:07 tirkarthi

Fixed in #316

mzfr avatar May 25 '23 16:05 mzfr