@ -541,6 +541,7 @@ def is_blacklisted_import(importer, fullname):
any packages have been whitelisted and ` fullname ` is not part of one .
any packages have been whitelisted and ` fullname ` is not part of one .
NB :
NB :
- The default whitelist is ` [ ' ' ] ` which matches any module name .
- If a package is on both lists , then it is treated as blacklisted .
- If a package is on both lists , then it is treated as blacklisted .
- If any package is whitelisted , then all non - whitelisted packages are
- If any package is whitelisted , then all non - whitelisted packages are
treated as blacklisted .
treated as blacklisted .
@ -1536,9 +1537,8 @@ class Importer(object):
return importlib . machinery . ModuleSpec ( fullname , loader = self )
return importlib . machinery . ModuleSpec ( fullname , loader = self )
blacklisted_msg = (
blacklisted_msg = (
' %r is present in the Mitogen importer blacklist, therefore this '
' A %r request would be refused by the Mitogen master. The module is '
' context will not attempt to request it from the master, as the '
' on the deny list (blacklist) or not on the allow list (whitelist). '
' request will always be refused. '
)
)
pkg_resources_msg = (
pkg_resources_msg = (
' pkg_resources is prohibited from importing __main__, as it causes '
' pkg_resources is prohibited from importing __main__, as it causes '