Yeah, one of the mailing list threads listed in the "Related" comment in #1195 would be more appropriate place than here.
My main objection to this PR is exposing more of TM to the plugin API, and doing so because of a single plugin language, for a single implementation, which has an already extremely common workaround mechanism builtin to the main implementation for just this case (C-extensions).
If I needed this in a GeanyPy plugin, I'd probably propose to add a helper function/API into it directly to smooth over the language barrier.