awkward
awkward copied to clipboard
use `@functools.cache` instead of global variables for imports/versions
Fine for now, since it's following the same pattern as something else, but it's not the right way to do this. The correct way is to make this a function and add @functools.cache to it. That will not require global and will also be threadsafe, and won't require if statement gymnastics to use.
Originally posted by @henryiii in https://github.com/scikit-hep/awkward/pull/3533#discussion_r2143231586