Skip to content
  • Christoph Reiter's avatar
    Don't emit require_version warning if namespace was loaded previously using g_irepository_require · ea75a89a
    Christoph Reiter authored
    Instead of tracking loaded dependencies ourself to hide warnings if they
    were loaded by a previous import just look if the namespace was loaded
    before the import. This (a) makes the implementation much simpler and
    (b) also takes into account namespaces loaded outside of Python/PyGObject
    using the libgirepository C API (as is common in applications using
    libpeas with Python plugins)
    
    This also introduces a new Python wrapper for g_irepository_is_registered()
    to allow checking the loading state of namespaces before imports.
    
    This fixes unnecessary require_version warnings in gedit, gnome-builder,
    totem, rhythmbox etc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754491
    ea75a89a