open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Fix: Replace `pkg_resources` with `importlib.resources` #395

Open alcrene opened 7 months ago

alcrene commented 7 months ago

Importing pkg_resources causes errors on recent Python. The functionality we use is now available as import.resources.files since Python 3.9.

For Python 3.7 and 3.8, this commit uses the import_resources backport, and for Python ≤3.6, the old implementation with pkg_resources is kept.