Python 3.9+ compatibility: upstream dependency contains outdated dependency
rlue opened this issue · comments
ffsubsync fails on python 3.9+ due to an issue in upstream dependency python-ffmpeg, as described in this issue (excerpted below):
Problem
On python 3.10.2, ffmpeg-python raises the following error:
Traceback (most recent call last): File "/home/rlue/.pyenv/versions/3.10.2/bin/ffs", line 5, in <module> from ffsubsync import main File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/ffsubsync/__init__.py", line 21, in <module> from .ffsubsync import main # noqa File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/ffsubsync/ffsubsync.py", line 34, in <module> from ffsubsync.speech_transformers import ( File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/ffsubsync/speech_transformers.py", line 10, in <module> import ffmpeg File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/ffmpeg/__init__.py", line 2, in <module> from . import nodes File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/ffmpeg/nodes.py", line 3, in <module> from past.builtins import basestring File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/past/builtins/__init__.py", line 43, in <module> from past.builtins.noniterators import (filter, map, range, reduce, zip) File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/past/builtins/noniterators.py", line 24, in <module> from past.types import basestring File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/past/types/__init__.py", line 25, in <module> from .oldstr import oldstr File "/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/site-packages/past/types/oldstr.py", line 5, in <module> from collections import Iterable ImportError: cannot import name 'Iterable' from 'collections' (/home/rlue/.pyenv/versions/3.10.2/lib/python3.10/collections/__init__.py)
This issue cannot be addressed in ffsubsync until it is addressed in the upstream dependency; this bug report is being filed as a reminder in the meantime.
Notes
In case it is of interest, I am experiencing this problem on:
- ffs 0.4.20
- Python 3.10.2
- Debian Linux with pyenv
@rlue this is probably not an issue with ffsubsync or with ffmpeg-python, but with the version of the future package you have installed. You should see an improvement after running
pip install --upgrade future
I'm pinning the min required future version in the next release of ffsubsync, so hopefully this will get better afterwards.