Hi Developers,

We’ve been seeing some issues in certain environments where our Python global 
imports aren’t working. On the surface, executing the imports in a clean Python 
shell works, but when the agent code gets executed, we’re hit with a bunch of 
NameErrors for the imports that Python can’t find.

Moving forward, please do not use import *. Instead, we should all be using 
explicit imports of each module/class that the Python script depends on.

One pattern that is especially bad is

from resource_management import *

When working on an existing file that includes a * import, please change this 
to explicit imports. Let’s be diligent in our code reviews as well. If you see 
a * import, flag it as an issue so that we can work toward eliminating this 
from the codebase.

Thanks,

- Jonathan

Reply via email to