panphon
panphon copied to clipboard
panphon currently does not work with on Python 3.8
To reproduce the problem, simply create a fresh Python 3.8 environment using venv or conda and install panphon:
conda create --name panphon-py38 python=3.8
conda activate panphon-py38
pip install panphon
and get this error as soon as you import panphon:
$ python -c "import panphon"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\joanise\Miniconda3\envs\panphon-py38\lib\site-packages\panphon\__init__.py", line 2, in <module>
from panphon.featuretable import FeatureTable
File "C:\Users\joanise\Miniconda3\envs\panphon-py38\lib\site-packages\panphon\featuretable.py", line 17, in <module>
from .segment import Segment
File "C:\Users\joanise\Miniconda3\envs\panphon-py38\lib\site-packages\panphon\segment.py", line 11, in <module>
class Segment(Mapping[str, int]):
TypeError: 'ABCMeta' object is not subscriptable
@roedoejet has already submitted a solution via PR #57
We're hoping you'll be able to merge it and release a patch, because at the moment we have to restrict our panphon requirements to panphon>=0.19, <0.21
for the g2p and ReadAlongs/Studio projects because we still support Python 3.8, but we'd really like to benefit from the improvements you recently brought to panphon 0.21.