diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-03-25 23:37:41 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-03-25 23:37:41 (GMT) |
commit | 1e76e8643b00e6b8811aa4e5c6a7cedae829b9c0 (patch) | |
tree | a7494a131ba2360cefce820fda8cae028d2223f3 /Lib | |
parent | cce5b04c75e1959a48cf41d210c9179ef3ce2e69 (diff) | |
download | cpython-1e76e8643b00e6b8811aa4e5c6a7cedae829b9c0.zip cpython-1e76e8643b00e6b8811aa4e5c6a7cedae829b9c0.tar.gz cpython-1e76e8643b00e6b8811aa4e5c6a7cedae829b9c0.tar.bz2 |
Issue #12718: Set importer on instance if Python function, to avoid bad interaction with winpdb.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/logging/config.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 37729d8..e2b0163 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -379,6 +379,12 @@ class BaseConfigurator(object): def __init__(self, config): self.config = ConvertingDict(config) self.config.configurator = self + # Issue 12718: winpdb replaces __import__ with a Python function, which + # ends up being treated as a bound method. To avoid problems, we + # set the importer on the instance, but leave it defined in the class + # so existing code doesn't break + if type(__import__) == types.FunctionType: + self.importer = __import__ def resolve(self, s): """ |