# PEP 810: Explicit lazy imports

**URL:** <https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131>\
**Category:** PEPs\
**Created:** [October 3, 2025, 11:50am UTC](https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131 "2025-10-03T11:50:19Z")\
**Posts on this page:** 1\
**Showing post:** 42

<div class="post-metadata">

**Author:** ![pablogsal](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pablogsal/32/32246_2.png) [@pablogsal](https://discuss.python.org/u/pablogsal)\
**Post date:** [October 3, 2025, 6:54pm UTC](https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131/42 "2025-10-03T18:54:02Z")

</div>

Bear in mind that as mentioned before this is an advanced _caveat emptor_ feature (so users are expected to have to think what they are doing as it comes with a set of advantages and disadvantages) but just to be clear: security-sensitive tools like `pip` can and should disable laziness right at startup with `sys.set_lazy_imports("disabled")` (or install a filter that forces eager imports). That way the environment variable can’t affect them. The `with` trick would work too since those imports are always eager, but it’s potentially suboptimal compared to just turning off the flag once at the beginning.

---

_[View the full topic](https://discuss.python.org/t/pep-810-explicit-lazy-imports/104131)._
