Earlier quoted context omitted.
I think this import flow tends to be the canonical one. I might recommend doing something like importing from something like `numpy.version` (or some other "random" very small utils package) so that the work done on file load is still fairly small.
It's not clear such a thing even exists in general though. It's certainly not guaranteed by packages. What would that be for numba?
For example, numba._version only imports standard library stuff so is probably good enough here[0]
It would be nice to have general querying capabilities here, of course. I just think that in practice there's at least a halfway-decent workaround in almost any real situation
[0] https://github.com/numba/numba/blob/main/numba/_version.py