Skip to content
  1. Nov 30, 2012
    • Martin Pitt's avatar
      test_overrides_gtk: Ignore GVFS warnings from FileChooserDialog · c36e1236
      Martin Pitt authored
      Do not cause GVFS warnings from Gtk.FileChooserDialog (which may concern
      unavailable monitor backends in the test environment) to fail the tests.
      c36e1236
    • Martin Pitt's avatar
      pygtkcompat: Work around IndexError on large flags · 1ce98d45
      Martin Pitt authored
      On 32 bit systems pygtkcompat currently fails with
      
        File "pygtkcompat/pygtkcompat.py", line 74, in _install_enums
          name = flag.value_names[-1].replace(modname + '_', '')
      IndexError: cannot fit 'int' into an index-sized integer
      
      on 32 bit systems as some flags in Gdk are too large to fit into a 32 bit
      "long". Work around this crash until this gets fixed properly (marked as
      FIXME).
      1ce98d45
    • Martin Pitt's avatar
      Fix pyg_value_from_pyobject() range check for uint · ba44a6a4
      Martin Pitt authored
      We cannot use PYGLIB_PyLong_AsLong() for the range check, as on 32 bit machines
      this overflows large uints. Use PyLong_AsLongLong() separately to check for
      negative values, and PyLong_AsUnsignedLong() for the actual conversion.
      ba44a6a4
    • Martin Pitt's avatar
      test_gdbus: Drop failure if timeout=0 works differently · 2758e898
      Martin Pitt authored
      In some test environments we do not actually get a timeout exceptions with
      timeout=0, but a different error message. So only ensure that we get the right
      kind of error.
      2758e898
  2. Nov 29, 2012
    • Martin Pitt's avatar
      Fix array arguments on 32 bit · 82f4d157
      Martin Pitt authored
      In _pygi_argument_from_object() we never put the actual element GType into the
      constructed array. The array contains GIArguments, or bytes in the case of
      passing a string as an array.
      
      This happened to work on 64 bit machines where GIArgument and char* have the
      same size, but not on 32 bit machines (test_gi.TestPropertiesObject.test_strv
      fails there).
      82f4d157
  3. Nov 27, 2012
    • Daniel Drake's avatar
      Fix property lookup in class hierarchy · 776088b4
      Daniel Drake authored
      Commit 4bfe7972 introduced a bug where
      a Python subclass of a gi-provided base class overrides a property from the
      base class.
      
      The new behaviour in the above commit causes pygobject to seek the property
      in the base class and try to read it from there (resulting in confusion)
      rather than noticing that the property is overridden and present in the
      Python object instance.
      
      To provide a nicer solution here, we can exploit the fact that
      g_object_class_find_property() will traverse the hierarchy in order to
      find the right GParamSpec, and the returned GParamSpec can tell us exactly
      which GType introduces the property. The strategy is:
      
       1. Find pspec with g_object_class_find_property()
       2. Find the class that owns that property (pspec->owner_type)
       3. See if girepository owns that class.
       3a. If yes, get property from there.
       3b. If not, get property "directly"
      
      And the same for property setting.
      
      Now that _pygi_lookup_property_from_g_type is always passed the type that
      implements the property, it no longer has to go recursing through parent
      classes, which was the original cause of confusion.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=686942
      776088b4
  4. Nov 26, 2012
  5. Nov 20, 2012
  6. Nov 12, 2012
  7. Oct 24, 2012
    • Martin Pitt's avatar
      Fix various bugs in GLib.IOChannel · 702fe63f
      Martin Pitt authored
      - Fix segfault when using an IOChannel as an iterator: PyIter_Next() returns
        NULL on the last element, instead of raising a StopIteration.
      
      - The default encoding of a stream is 'UTF-8', not NULL. NULL means that the
        stream is being used in binary mode; in that case, we should not attempt to
        do any automagic conversion to an Unicode object. As this special case is
        inconsistent and has never worked anyway, and the current buggy
        implementation breaks binary streams, just drop it without replacement.
        (Introduced in commit de9eae4d)
      
      These bugs were uncovered by the previously committed tests.
      702fe63f
    • Martin Pitt's avatar
      Add tests for GLib.IOChannel · 35ff2a6f
      Martin Pitt authored
      This did not have any code coverage at all. The tests uncover a range of bugs,
      which will be fixed in the next commit.
      
      This drops the verification of the set priority in
      test_add_watch_data_priority(), as find_source_by_id() is not yet available in
      this pygobject version.
      35ff2a6f
    • Martin Pitt's avatar
      Work around wrong 64 bit constants in GLib Gir · 4922b050
      Martin Pitt authored
      GLib's gir currently has wrong constants for MININT64 and MAXUINT64; explicitly
      set them in an override, until this gets fixed properly.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=685022
      4922b050
  8. Oct 23, 2012
  9. Oct 20, 2012
  10. Oct 17, 2012
  11. Oct 15, 2012
  12. Oct 12, 2012
  13. Oct 11, 2012
  14. Oct 05, 2012
  15. Oct 04, 2012