Kaydet (Commit) 1e76e864 authored tarafından Vinay Sajip's avatar Vinay Sajip

Issue #12718: Set importer on instance if Python function, to avoid bad interaction with winpdb.

üst cce5b04c
...@@ -379,6 +379,12 @@ class BaseConfigurator(object): ...@@ -379,6 +379,12 @@ class BaseConfigurator(object):
def __init__(self, config): def __init__(self, config):
self.config = ConvertingDict(config) self.config = ConvertingDict(config)
self.config.configurator = self 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): def resolve(self, s):
""" """
......
...@@ -247,6 +247,9 @@ Core and Builtins ...@@ -247,6 +247,9 @@ Core and Builtins
Library Library
------- -------
- Issue #12718: Fix interaction with winpdb overriding __import__ by setting
importer attribute on BaseConfigurator instance.
- Issue #17521: Corrected non-enabling of logger following two calls to - Issue #17521: Corrected non-enabling of logger following two calls to
fileConfig(). fileConfig().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment