Poly-Haven / polyhavenassets

A Blender add-on to integrate our assets natively in the asset browser
GNU General Public License v3.0
312 stars 21 forks source link

Use importlib when imp is not available to support Python 3.12+ #102

Closed unboiled closed 8 months ago

unboiled commented 8 months ago

The Python imp module has been deprecated since 3.4, and it has finally been removed in Python 3.12. Since I run 3.12, the polyhavenassets module crashed on load. Kept fallback to imp in case users still have a very, very old Python runtime.

You can also replace imp with importlib directly, I don't expect anybody to be realistically be using a Python without importlib.

gregzaal commented 8 months ago

Thanks @unboiled!