Skip to content

Conversation

markgdawson
Copy link
Contributor

@markgdawson markgdawson commented Sep 5, 2023

See issue #250.

Some python types (in particular GenericAlias and Union) cannot be handled by the default ->jvm handler.

Note on tests: The only way I could find to instantiate an object of type types.UnionType for testing is directly with python syntax and the | operator. I don't know of a way to test objects created via syntax without creating global variables in the python interpreter (e.g. with run-simple-string). For that reason, I've left the test for this out for now. I have tested by hand. Suggestions for good approaches to this welcome.

Note: types.UnionType is not the same as typing.Union, which can be used via __get_item__ to produces objects of type typing._UnionGenericAlias.

@cnuernber cnuernber merged commit ad4f08c into clj-python:master Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants