AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 294 forks source link

Python 3.12 support / imp module deleted #1668

Closed EvanBldy closed 10 months ago

EvanBldy commented 1 year ago

Bug Report

OpenTimeLineIO plugin for python installs correctly with pip but it cannot import be imported after. It's due to an import of imp module which is deleted and deprecated since python 3.4.

Python 3.12.0 (main, Oct  9 2023, 17:10:54) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import opentimelineio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/DATA/DEV/virtualenv/linuxmint/zou3.12/lib/python3.12/site-packages/opentimelineio/__init__.py", line 14, in <module>
    from . import (
  File "/mnt/DATA/DEV/virtualenv/linuxmint/zou3.12/lib/python3.12/site-packages/opentimelineio/schema/__init__.py", line 34, in <module>
    from . schemadef import (
  File "/mnt/DATA/DEV/virtualenv/linuxmint/zou3.12/lib/python3.12/site-packages/opentimelineio/schema/schemadef.py", line 7, in <module>
    from .. import (
  File "/mnt/DATA/DEV/virtualenv/linuxmint/zou3.12/lib/python3.12/site-packages/opentimelineio/plugins/__init__.py", line 8, in <module>
    from .python_plugin import (
  File "/mnt/DATA/DEV/virtualenv/linuxmint/zou3.12/lib/python3.12/site-packages/opentimelineio/plugins/python_plugin.py", line 7, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

I will make a PR to fix that.

To Reproduce

  1. Operating System : Linux Mint
  2. Python version : 3.12

Expected Behavior

To work on python 3.12.

EvanBldy commented 10 months ago

I close because my PR is validated :)