Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable maps of wrapped classes #143

Open
poshul opened this issue Apr 4, 2022 · 4 comments
Open

Enable maps of wrapped classes #143

poshul opened this issue Apr 4, 2022 · 4 comments

Comments

@poshul
Copy link
Contributor

poshul commented Apr 4, 2022

Autowrap currently doesn't allow the wrapping of maps that have keys that are themselves wrapped. ("Converter can not handle wrapped classes as keys and values in map"). This should be added for ID Datastructure wrapping.

@jpfeuffer
Copy link
Contributor

Done in #124

@poshul
Copy link
Contributor Author

poshul commented Apr 5, 2022

I'm still seeing this issue using a version of autowrap with #124 merged,

Traceback (most recent call last): File "/home/samuel/.local/lib/python3.9/site-packages/autowrap-0.22.8-py3.9.egg/autowrap/CodeGenerator.py", line 520, in create_wrapper_for_class pyx_code, stub_code = self._create_wrapper_for_attribute(attribute) File "/home/samuel/.local/lib/python3.9/site-packages/autowrap-0.22.8-py3.9.egg/autowrap/CodeGenerator.py", line 870, in _create_wrapper_for_attribute to_py_code = converter.output_conversion(t, "_r", "py_result") File "/home/samuel/.local/lib/python3.9/site-packages/autowrap-0.22.8-py3.9.egg/autowrap/ConversionProvider.py", line 978, in output_conversion raise Exception("Converter can not handle wrapped classes as keys and values in map") Exception: Converter can not handle wrapped classes as keys and values in map

@poshul poshul reopened this Apr 5, 2022
@jpfeuffer
Copy link
Contributor

Can you add a PR with a MWE as test that shows this behaviour?

@jpfeuffer
Copy link
Contributor

jpfeuffer commented Apr 14, 2022

Ok, while checking the code, it is obvious that the support was only added for the input_conversion.
We need to take the changes from the linked PR #124 and do the same for output_conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants