renpy / renpy-build

Build system for the Ren'Py visual novel engine. (The engine itself, not games.)
76 stars 51 forks source link

Modernise built-in submodule importer #97

Open mal opened 1 year ago

mal commented 1 year ago

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.

mal commented 1 month ago

@renpytom it'd be good to merge this before work is started on the 3.12 upgrade.