Skip to content

Comment on Working to Make Python Lazyparent

Comments

Yep it's not clear, and a bit of a case-by-case thing. Fortunately most codebases only need to do this in a handful of spots so you can really "just" look at a package and find a file that probably is safe.

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.