renpy-build
renpy-build copied to clipboard
Modernise built-in submodule importer
The deprecated imp
module has been removed in Python 3.12.
This change works by implementing the MetaPathFinder
API, and returning a ModuleSpec
which tells the other import machinery to use the BuiltinImporter
provided as part of Python proper to handle loading of these modules.
Tested with Ren'Py 8.1.3.
@renpytom it'd be good to merge this before work is started on the 3.12 upgrade.