| Summary: | swig 2.0.3 incompatible with python 3.2 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mattias Ellert <mattias.ellert> |
| Component: | swig | Assignee: | Adam Tkac <atkac> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | atkac, ovasik |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | swig-2.0.4-1.fc15 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-07-22 19:39:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Mattias Ellert
2011-07-07 05:40:05 UTC
Current swig-2.0.3-1.fc15.x86_64 should work fine, it contains patch for this issue (for example python3 bindings are successfully built in the "znc" package). Can you attach .i file and write commands which you use to generate & compile bindings, please? Thank you in advance. The patch is incomplete - it doesn't fix the whole problem and at the same time introduces new problems. With the patch, the Fedora 15 swig will generate python 3.2 compatible bindings - but only if the -py3 flag is used. The -py3 flag does not mean "Generate python 3 bindings", but "Generate code with Python 3 specific features" (quoting swig -python -help). The code generated without the -py3 flag should be compilable with python 3 too. Also, code generated using the patched Fedora 15 swig with the -py3 flag only works for python 3.2. If the generated code is transferred to a Fedora 14 host where python3 is python 3.1, the code will not compile. On the other hand the code generated using swig 2.0.4 works as expected: Code generated using swig -python compiles for python 2.x, 3.1 and 3.2 and code generated using swig -python -py3 compiles for both python 3.1 and 3.2. This is the way it is supposed to work. In summary: There are 5 cases. The following table indicates what works and what doesn't. swig version: 2.0.3 2.0.3 with patch 2.0.4 A. python 2.x + + + B. python 3.1 + + + C. python 3.2 - - + D. python 3.1 with -py3 + - + E. python 3.2 with -py3 - + + Score 3/5 3/5 5/5 So both the original and the patched 2.0.3 supports 3 out of the 5 cases, but the set of 3 is not the same. The patched version fixes one case but at the same time breaks another. So I wouldn't call it neither better nor worse, just different. 2.0.4 on the other hand supports all 5 cases. Ok, thanks for your analysis, I will update swig to 2.0.4 soon. swig-2.0.4-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/swig-2.0.4-1.fc15 Package swig-2.0.4-1.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing swig-2.0.4-1.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/swig-2.0.4-1.fc15 then log in and leave karma (feedback). swig-2.0.4-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |