PyGObject Module Restructure Proposal

Abstract

The PyGObject bindings expose static constants through the gi._gobject submodule. These constants are used within some of the gi and gi._object sub-modules. The idea behind this proposal is to minimize usage of these constants and instead make them accessible and used through introspection bindings where possible.

Analysis

The gi module wrapper (gi.module.IntrospectionModule) makes use of the following static objects from the gi._gobject sub-module:

  • TYPE_NONE
  • TYPE_ENUM
  • TYPE_FLAGS
  • TYPE_BOXED
  • TYPE_POINTER
  • GObject
  • GInterface

The gi constants module (gi._gobject.constants) creates a number of constants by using the static type_from_name function which is where all the TYPE_* constants come from.

The property helper (gi._gobject.propertyhelper) has dependencies on the following static objects:

  • constants.TYPE_*
  • constants.G_MIN/MAX*
  • _gobject.type_name
  • _gobject.type_is_a
  • _gobject.PARAM_READWRITE
  • _gobject.GObject
  • _gobject.GEnum
  • _gobject.GFlags
  • _gobject.GBoxed

The signal helper (gi._gobject.signalhelper) has dependencies on the following static objects:

  • _gobject.SIGNAL_RUN_FIRST
  • _gobject.GObject

Current Package Dependencies

pygobject-diagram-current.png

(To Be Continued...)

SimonFeltman/PyGObject Module Restructure Proposal (last edited 2012-11-01 02:56:22 by SimonFeltman)