Bug 617782 - PackageKit fails to build against python 2.7, giscanner/xmlwriter.py issue
Summary: PackageKit fails to build against python 2.7, giscanner/xmlwriter.py issue
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gobject-introspection
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-23 23:30 UTC by Dave Malcolm
Modified: 2012-08-16 22:36 UTC (History)
5 users (show)

Fixed In Version: gobject-introspection-0.9.2-5.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 22:36:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2010-07-23 23:30:23 UTC
Description of problem:
http://koji.fedoraproject.org/koji/getfile?taskID=2347398&name=build.log
contains:
  GISCAN PackageKitGlib-1.0.gir
Traceback (most recent call last):
  File "/usr/bin/g-ir-scanner", line 36, in <module>
    from giscanner.scannermain import scanner_main
  File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 31, in <module>
    from giscanner.dumper import compile_introspection_binary
  File "/usr/lib64/gobject-introspection/giscanner/dumper.py", line 26, in <module>
    from .glibtransformer import IntrospectionBinary
  File "/usr/lib64/gobject-introspection/giscanner/glibtransformer.py", line 34, in <module>
    from .transformer import Names
  File "/usr/lib64/gobject-introspection/giscanner/transformer.py", line 31, in <module>
    from .girparser import GIRParser
  File "/usr/lib64/gobject-introspection/giscanner/girparser.py", line 32, in <module>
    from .girwriter import COMPATIBLE_GIR_VERSION
  File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 30, in <module>
    from .xmlwriter import XMLWriter
  File "/usr/lib64/gobject-introspection/giscanner/xmlwriter.py", line 70, in <module>
    with LibtoolImporter:
AttributeError: __exit__
make[4]: *** [PackageKitGlib-1.0.gir] Error 1
make[4]: Leaving directory `/builddir/build/BUILD/PackageKit-0.6.6/lib/packagekit-glib2'
make[3]: Leaving directory `/builddir/build/BUILD/PackageKit-0.6.6/lib/packagekit-glib2'
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/builddir/build/BUILD/PackageKit-0.6.6/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/PackageKit-0.6.6'

Looks like this isn't compatible with python 2.7

http://docs.python.org/dev/whatsnew/2.7.html#porting-to-python-2-7 has this which seems the likely explanation:
"Because of an optimization for the with statement, the special methods __enter__() and __exit__() must belong to the object’s type, and cannot be directly attached to the object’s instance. This affects new-style classes (derived from object) and C extension types. (issue 6101.)"

Steps to Reproduce:
koji build dist-f14-py27-rebuild cvs://cvs.fedoraproject.org/cvs/pkgs?rpms/PackageKit/devel#PackageKit-0_6_6-3_fc14

Comment 1 Dave Malcolm 2010-07-23 23:31:55 UTC
Presumably affects any other packages that build .gir files; reassigning to "gobject-introspection"

Comment 2 Dave Malcolm 2010-07-26 00:39:39 UTC
There seems to be some discussion of this in the Python bug tracker:
http://bugs.python.org/issue9259

Comment 4 Dave Malcolm 2010-07-26 10:44:12 UTC
I've tested with that patch and was successfully able to rebulid gtk-vnc on python 2.7 with in.

Committed to CVS; building gobject-introspection-0.9.2-5.fc14 into dist-f14-py27-rebuild as:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2351043

Comment 5 Bug Zapper 2010-07-30 12:48:29 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Fedora End Of Life 2012-08-16 22:36:45 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.