Summary: | Scripter cannot load files under Python 3.4 | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Brendan <bunf2014> |
Component: | Scripting | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.0 pre-alpha | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/krita/9412304e0ac248aab660bb5421db3cdc8b5dcc6d | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Allow scripter to load files under Python 3.4 |
ps: git diffed patch! This has been implemented in the following code review request: https://phabricator.kde.org/D9529 Git commit 9412304e0ac248aab660bb5421db3cdc8b5dcc6d by Boudewijn Rempt. Committed on 25/01/2018 at 08:56. Pushed by rempt into branch 'master'. Enable scripter to run on Python 3.4 systems Patch by Brendanbd, thanks! Differential Revision: https://phabricator.kde.org/D9529 M +20 -7 plugins/extensions/pykrita/plugin/plugins/scripter/ui_scripter/actions/runaction/runaction.py https://commits.kde.org/krita/9412304e0ac248aab660bb5421db3cdc8b5dcc6d |
Created attachment 109253 [details] Allow scripter to load files under Python 3.4 If you try to run a file from scripter it fails to load the file as a module because it uses the new-in-3.5 method importlib.util.module_from_spec. I attach a patch to get this load working in Python 3.4. This patch: * adds a new file loader34.py, based on the equivalent bootstrap file from Python 3.5; and * some code to check for Python 3.4 and use the loader from loader34 to load the module