Can not explicitly import Gdk-2.0

Bug #875399 reported by Evan Broder
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygobject (Ubuntu)
Fix Released
Medium
Martin Pitt
Oneiric
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Martin Pitt

Bug Description

The overrides in pygobject for Gdk use the Gdk.atom_intern function, which was not correctly exported in GDK 2.0, which causes the import to fail:

evan@caron:~$ python
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version('Gdk', '2.0')
>>> from gi.repository import Gdk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 76, in load_module
    dynamic_module._load()
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 224, in _load
    overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  File "/usr/lib/python2.7/dist-packages/gi/overrides/Gdk.py", line 296, in <module>
    SELECTION_PRIMARY = Gdk.atom_intern('PRIMARY', True)
  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 105, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.Gdk' object has no attribute 'atom_intern'

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: python-gobject 3.0.0-0ubuntu2
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CheckboxSubmission: d27dbc9ce66475289526ca4b283ec487
CheckboxSystem: bb422ca46d02494cdbc459927a98bc2f
Date: Sat Oct 15 17:44:24 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: pygobject
UpgradeStatus: Upgraded to oneiric on 2011-09-18 (27 days ago)

Revision history for this message
Evan Broder (broder) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Subscribing pitti, maybe he has a clue about this one

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in pygobject (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in pygobject (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

uploaded to oneiric-proposed queue as well, needs ubuntu-sru review.

Changed in pygobject (Ubuntu Oneiric):
importance: Undecided → Low
status: New → Fix Committed
importance: Low → Medium
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Evan, or anyone else affected,

Accepted pygobject into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Evan Broder (broder) wrote :

Verified from oneiric-proposed - I can explicitly import both Gdk-2.0 and Gdk-3.0

evan@caron:~$ python
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version('Gdk', '2.0')
>>> from gi.repository import Gdk
>>> Gdk
<gi.module.DynamicModule 'Gdk' from '/usr/lib/girepository-1.0/Gdk-2.0.typelib'>

evan@caron:~$ python
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
>>> gi.require_version('Gdk', '3.0')
>>> from gi.repository import Gdk
>>> Gdk
<gi.module.DynamicModule 'Gdk' from '/usr/lib/girepository-1.0/Gdk-3.0.typelib'>

Chris and Martin, thanks for the quick turnaround on this!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.2-1

---------------
pygobject (3.0.2-1) experimental; urgency=low

  * New upstream release:
    - Allow GBoxed types as property. (LP: #877397)
    - When converting an object with transfer none, make sure the wrapper owns
      a ref. (LP: #874299)
    - Gdk overrides: Unbreak for Gdk-2.0. (LP: #875399)
    - Do union member checks for unions that are parameters.
    - Fix "Returns: (skip)" method calls without (out) arguments.
 -- Martin Pitt <email address hidden> Sun, 23 Oct 2011 12:54:30 +0200

Changed in pygobject (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.0-0ubuntu3

---------------
pygobject (3.0.0-0ubuntu3) oneiric-proposed; urgency=low

  * Add 00git_allow_gboxed_properties.patch: Add the GBoxed type as valid type
    to the gobject property helper. This fixes the "snippets" gedit plugin.
    Patch taken from upstream git head. (LP: #877397)
  * Add 00git_gboxed_property_test.patch: Corresponding test case. Taken from
    upstream git head.
  * Add 00git_gdk2_overrides_atom_intern.patch: Fix Gdk override to also work
    for Gdk 2.0. Patch also pushed to upstream git. (LP: #875399)
 -- Martin Pitt <email address hidden> Wed, 19 Oct 2011 09:05:09 +0200

Changed in pygobject (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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