# PEP 690: Lazy Imports

**URL:** <https://discuss.python.org/t/pep-690-lazy-imports/15474>\
**Category:** PEPs\
**Created:** [May 3, 2022, 8:18pm UTC](https://discuss.python.org/t/pep-690-lazy-imports/15474 "2022-05-03T20:18:51Z")\
**Posts on this page:** 1\
**Showing post:** 191

<div class="post-metadata">

**Author:** ![pf\_moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/pf_moore/32/35_2.png) [@pf\_moore](https://discuss.python.org/u/pf_moore)\
**Post date:** [June 23, 2022, 7:38pm UTC](https://discuss.python.org/t/pep-690-lazy-imports/15474/191 "2022-06-23T19:38:25Z")

</div>

> [@davidism](#):
>
> I guess my two concerns are:
> 
> - How is this going to be communicated to users, and what will they have to do to take advantage of it?
> - What extra work will maintainers have to do, including learning, one time changes, and ongoing testing/maintenance?

I very much agree with this. My fear is that most users will get the impression that “enable lazy imports” is essentially a “go\_faster=True” setting, and will enable them and have little or no ability to handle the (inevitable) problems. They will therefore push the issue back to library maintainers.

I’m lucky in that I don’t maintain any big libraries that have a programmatic API, but for the libraries I do maintain, I’ll almost certainly just refuse to support lazy imports (“if you hit an issue, reproduce it with lazy imports switched off, otherwise I will close it as unsupported”). Whether that’s a viable strategy for larger projects, though, I don’t know. And even if it is, the emotional work of repeatedly stating that position is far from negligible.

I’m all in favour of improving the startup time of Python applications, and in particular the cost of imports. But I think we should do so in a way that matches other tuning processes - provide a set of (ideally easy to use) tools that a motivated application developer can use to achieve better performance. But with full understanding of what they are doing, _not_ by simply turning on a “magic switch” and expecting things to “just work”.

---

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