DeferredImportCallbackFinder

(class from pyomo.common.dependencies)

class pyomo.common.dependencies.DeferredImportCallbackFinder[source]

Bases: object

Custom Finder that will wrap the normal loader to trigger callbacks

This importlib.abc.MetaPathFinder finder will wrap the normal loader returned by PathFinder with a loader that will trigger custom callbacks after the module is loaded. We use this to trigger the post import callbacks registered through attempt_import() even when a user imports the target library directly (and not through attribute access on the DeferredImportModule.

__init__()

Methods

__init__()

find_spec(fullname, path[, target])

invalidate_caches()

Member Documentation