amazon-ion / ion-python

A Python implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
260 stars 51 forks source link

Warn on ImportError when importing ionc #275

Closed rmarrowstone closed 1 year ago

rmarrowstone commented 1 year ago

Before this change ImportErrors other than ModuleNotFoundErrors would propagate. Unless a user was catching the importing of the simpleion module (and why would they?) this would result in their process crashing. Users may have encountered this in platforms that disallow c extensions, such as spark, or if they had an ionc dynamic library that didn't match the architecture of the python runtime.

Now it will warn but import will proceed with pure python mode.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.