Message110268
Hello, I think there is a problem with Python 2.7: I installed it, and tried to compile GObject-Introspection 0.9.2. Here is the result:
...
GISCAN GLib-2.0.gir
Traceback (most recent call last):
File "../tools/g-ir-scanner", line 36, in <module>
from giscanner.scannermain import scanner_main
File "/sources/gobject-introspection-0.9.2/giscanner/scannermain.py", line 31, in <module>
from giscanner.dumper import compile_introspection_binary
File "/sources/gobject-introspection-0.9.2/giscanner/dumper.py", line 26, in <module>
from .glibtransformer import IntrospectionBinary
File "/sources/gobject-introspection-0.9.2/giscanner/glibtransformer.py", line 34, in <module>
from .transformer import Names
File "/sources/gobject-introspection-0.9.2/giscanner/transformer.py", line 31, in <module>
from .girparser import GIRParser
File "/sources/gobject-introspection-0.9.2/giscanner/girparser.py", line 32, in <module>
from .girwriter import COMPATIBLE_GIR_VERSION
File "/sources/gobject-introspection-0.9.2/giscanner/girwriter.py", line 30, in <module>
from .xmlwriter import XMLWriter
File "/sources/gobject-introspection-0.9.2/giscanner/xmlwriter.py", line 70, in <module>
with LibtoolImporter:
AttributeError: __exit__
Oops, no GObject-Introspection for me. Investigating the bug, I looked in the recent changes in Python2.7 for something interesting, and found this:
A new opcode was added to perform the initial setup for with statements, looking up the __enter__() and __exit__() methods. (Contributed by Benjamin Peterson.)
Finally, I made 3 test cases to the bug. All 3 produce no input in Python 2.6, but crash pretty nicely in 2.7, the first 2 not finding __exit__ and the last missing __enter__.
I will try to make a patch, however my CPython skills are not so great, so you will probably make a better one. |
|
Date |
User |
Action |
Args |
2010-07-14 11:53:18 | arielbyd | set | recipients:
+ arielbyd |
2010-07-14 11:53:18 | arielbyd | set | messageid: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> |
2010-07-14 11:53:15 | arielbyd | link | issue9259 messages |
2010-07-14 11:53:14 | arielbyd | create | |
|