Support alias for module
Support alias for module while importing:
import gi
gi.require_version('Gtk', '4.0')
# Create alias for Gtk 4.0
gi.alias('Gtk', '4.0', 'Gtk4')
from gi.repository import Gtk4
So that we could provide python type hints stub files for both Gtk3(by Gtk3.pyi) and Gtk4(by Gtk4.pyi) in PyGObject-stubs. Now there is only Gtk3 support in pygobject-stubs and if we want Gtk4, we need to drop Gtk3 because there is only ONE Gtk.pyi file.
Edited by wsgalaxy