OpenCue
OpenCue copied to clipboard
[pyoutline] Replace use of execfile() with exec().
Summarize your change.
Python 3 dropped support for execfile, which is why we're importing it from past.builtins.
Looks like Python 3.10 finally broke support for execfile as it no longer contains one of the needed dependencies:
ImportError: cannot import name 'Iterable' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)
Recreate the same behavior by reading the outline file with open/read and executing it with exec. compile is also used to associate the code with the outline file, which helps add some additional info when debugging.