Twisted use of pygtkcompat breaks support of old pygobject APIS

Bug #1108036 reported by dobey
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-4-2
Fix Released
High
dobey
Trunk
Fix Released
Critical
dobey
ubuntuone-client (Ubuntu)
Fix Released
Undecided
dobey
Raring
Fix Released
Undecided
dobey

Bug Description

This happens now, at least in tests, thanks to the new twisted in Ubuntu 13.04 using pygtkcompat:

Traceback (most recent call last):
  File "/usr/bin/u1trial", line 40, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 277, in main
    suite = test_runner.get_suite(options)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 173, in get_suite
    config['ignore-paths']))
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 157, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 98, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/mnt/tarmac/cache/ubuntuone-client/trunk/tests/platform/os_helper/test_linux.py", line 39, in <module>
    GIO_NOT_SUPPORTED = gio.ERROR_NOT_SUPPORTED
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 316, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 135, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.Gio' object has no attribute 'ERROR_NOT_SUPPORTED'

This is because we check for the old API being loaded first, and use gi only when it isn't in use. However, use of pygtkcompat in twisted's gireactor now, means that the things we were checking for are set in sys.modules, but actually point to the new APIs, which are not compatible.

Related branches

dobey (dobey)
Changed in ubuntuone-client (Ubuntu Raring):
status: New → Triaged
assignee: nobody → Rodney Dawes (dobey)
Julien Funk (jaboing)
tags: added: u1-api u1-by-automation u1-on-staging
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 4.1.90-0ubuntu1

---------------
ubuntuone-client (4.1.90-0ubuntu1) raring; urgency=low

  * New upstream release.
    - Fix support for searching local files in cloud folders. (LP: #1101271)
    - Various fixes to the test suite.
    - Fix tritcask DataFile.write to flush with new libc6. (LP: #1093111)
    - Remove most of the static glib bindings usage. (LP: #1108036)
    - Avoid g_type_init with new versions of glib. (LP: #1100926)
    - Replace simplejson usage with json. (LP: #1029094)
    - Use a standard LC_CTYPE locale when the LANG is turkish. (LP: #997326)
  * debian/control:
    - Require newer version of ubuntu-sso-client for LANG fix.
    - Update dependencies to drop fallbacks for static bindings.
 -- Rodney Dawes <email address hidden> Tue, 29 Jan 2013 15:22:08 -0500

Changed in ubuntuone-client (Ubuntu Raring):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.