Summary: | PyKDE4 KDialog.None is illegal syntax for python3 | ||
---|---|---|---|
Product: | [Developer tools] bindings | Reporter: | Wolfgang Rohdewald <wolfgang> |
Component: | pykde | Assignee: | kde-bindings |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | flying-sheep, rakuco |
Priority: | NOR | ||
Version: | 4.13.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Wolfgang Rohdewald
2014-04-21 09:50:35 UTC
Isn't this an upstream issue? I get the same thing with PyQt4 and Python 3 if I try to access QAbstractPrintDialog::None as QAbstractPrintDialog.None. Ah, so the symbol is actually exposed by a Qt superclass? Yeah, then this is an upstream issue. A workaround would be getattr(KDialog, 'None'), i guess. In KDialog's case, the symbol comes from KDialog itself. My point is that PyQt has the same problem with enums in Qt that have "None" as one of their values. Maybe the best idea would be to make SIP/DIP automatically create a “<keyword>_” property when encountering a python keyword? because the same problem (but more visibly) also existed for exec() on python 2, which is why PyQt has an exec_() alias for it. so something like: for cpp_fieldname in ...: field_proxy = ... if cpp_fieldname in python_keywords: setattr(current_python_class, cpp_fieldname + '_', field_proxy) setattr(current_python_class, cpp_fieldname, field_proxy) Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! Hello, unfortunately this bug is being closed as unmaintained, per request of einar77. |