# Python3.11 - importlib no longer exposes .util

**URL:** <https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641>\
**Category:** Python Help\
**Tags:** stdlib\
**Created:** [April 10, 2023, 7:59am UTC](https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641 "2023-04-10T07:59:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![DavidCEllis](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/davidcellis/32/9789_2.png) [@DavidCEllis](https://discuss.python.org/u/DavidCEllis)\
**Post date:** [April 11, 2023, 10:03am UTC](https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641/7 "2023-04-11T10:03:53Z")

</div>

> [@tjreedy](#):
>
> Currently, importlib.machinery is in sys.modules at python startup even though it does not appear in importlib. **init** and likely was imported by something else. Perhaps importlib.util was once similarly present at python startup.

This is true in the REPL as `rlcompleter` is imported and depends on `inspect` which depends on `importlib.machinery`. However it’s not generally true that it’s imported on startup.

```auto
$ python -c "import importlib; importlib.machinery"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'importlib' has no attribute 'machinery'

```

---

_[View the full topic](https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641)._
