Closed dhellmann closed 2 years ago
/cc @kloczek
What about the concerns in the original revert in #105 by @jdufresne ? find_spec
will import all parent modules which may have side effects.
I had a look whilst writing #129 and found that Python still doesn't seem to provide a real alternative to imp
.
What about the concerns in the original revert in #105 by @jdufresne ?
find_spec
will import all parent modules which may have side effects.
Bah, I forgot about that. Thank you for reminding me.
I had a look whilst writing #129 and found that Python still doesn't seem to provide a real alternative to
imp
.
Well, let's see what happens with the current implementation. It's true there could be side-effects, but I wonder how serious those are, how frequently they occur, and whether they can be mitigated in other ways.
Well, let's see what happens with the current implementation. It's true there could be side-effects, but I wonder how serious those are, how frequently they occur, and whether they can be mitigated in other ways.
This is true.
One suggestion would be to disable this filter by default. It would probably not be too disruptive.
I disabled it for my projects, as I noted in this post just now about #129: https://adamj.eu/tech/2022/01/12/book-driven-development-from-boost-your-django-dx/#contribution-sphinxcontrib-spelling-optimization
The imp module is deprecated, so replace it with calls to importlib.
Addresses #124