Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pyoutline] Replace use of execfile() with exec(). #1201

Merged

Conversation

bcipriano
Copy link
Collaborator

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.

@bcipriano bcipriano merged commit d458bc2 into AcademySoftwareFoundation:master Sep 29, 2022
@bcipriano bcipriano deleted the replace-execfile branch September 29, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants