python-hyperscan icon indicating copy to clipboard operation
python-hyperscan copied to clipboard

v0.2.0 does not work with Python 3.10

Open dfarley1 opened this issue 2 years ago • 5 comments

We're currently using v0.2.0 since we have a customized version of libhs. Since trying to update to Python 3.10 we're seeing the following error (in a container based on python:3.10-bullseye:

$ python3 -m pip install hyperscan==0.2.0 --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Collecting hyperscan==0.2.0
  Downloading hyperscan-0.2.0.tar.gz (13 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: hyperscan
  Building wheel for hyperscan (pyproject.toml) ... done
  Created wheel for hyperscan: filename=hyperscan-0.2.0-cp310-cp310-manylinux_2_31_x86_64.whl size=12566 sha256=c6665898f9cdb3b601ccbc21d0a432838502eb6644ab555e7220cf8e8a5bd341
  Stored in directory: /tmp/pip-ephem-wheel-cache-scq2qfof/wheels/4d/2a/88/2f04c0e9dfd098657e8617bff17d277bfa9eb5febc26b4ba33
Successfully built hyperscan
Installing collected packages: hyperscan
Successfully installed hyperscan-0.2.0
$ python3
Python 3.10.11 (main, Apr  5 2023, 23:35:11) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hyperscan
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/hyperscan/__init__.py", line 5, in <module>
    from hyperscan._hyperscan import *
ModuleNotFoundError: No module named 'hyperscan._hyperscan'
>>> 

Upgrading to v0.4.0 fixes the problem, but we can't use it because we require dynamically linking libhs. I suppose this is either a bug report for the old version or a feature request for dynamic linking support in the newer version?

dfarley1 avatar Apr 07 '23 19:04 dfarley1