Transcrypt icon indicating copy to clipboard operation
Transcrypt copied to clipboard

Built in function 'super' with arguments not supported

Open Apollon77 opened this issue 7 years ago • 5 comments

I tried to transcrypt a python library called homematicip and this uses "aenum" library inside. When I now try to transcrypt this I get

Error while compiling (offending file last):
	File '/Volumes/Dev/python/api.py', line 3, at import of:
	File '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/homematicip/device.py', line 7, at import of:
	File '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/homematicip/base/enums.py', line 2, at import of:
	File 'aenum', line 301, namely:
	
	Built in function 'super' with arguments not supported

in aenum in line 301 (https://bitbucket.org/stoneleaf/aenum/src/a0295abd67941a4f350bc8bf48eaf37f128b008a/aenum/init.py?at=default&fileviewer=file-view-default#init.py-301) it is:

super(_NamedConstantDict, self).__init__()

is there any way to get this supported?

Thank you

Apollon77 avatar Dec 02 '18 20:12 Apollon77

I tried to transpile SymPy with the same result.

Kreijstal avatar Mar 10 '19 22:03 Kreijstal

Fast and ugly you can try use super w\o arrg: #super(_NamedConstantDict, self).__init__() super().__init__()

alex-pancho avatar Jul 04 '19 05:07 alex-pancho

I tried to import pyparsing into a Transcrypt project, and the limitation on super stopped it cold. Modifying the arguments is not an option in that case.

jeremydouglass avatar Aug 14 '19 20:08 jeremydouglass

This is an issue on python code that has to be python 2 and 3 compatible because the way to do that is to use the argument version of super with arguments of (CurrentClassName, self passed into init).

Would it be appropriate to modify transcrypt to handle this one style to treat it as if it was a no argument super?

markfinn avatar Jan 09 '20 15:01 markfinn

Has anyone found a way to work around this? Is there something I can use other than httplib2 that doesn't throw this error?

linzinha avatar Feb 24 '21 09:02 linzinha