awkward icon indicating copy to clipboard operation
awkward copied to clipboard

use `@functools.cache` instead of global variables for imports/versions

Open ianna opened this issue 6 months ago • 0 comments

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

ianna avatar Jun 12 '25 20:06 ianna