mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Merge 3.2
This commit is contained in:
commit
aabbda5354
27 changed files with 51 additions and 54 deletions
|
@ -471,7 +471,7 @@ class BaseConfigurator(object):
|
|||
def configure_custom(self, config):
|
||||
"""Configure an object with a user-supplied factory."""
|
||||
c = config.pop('()')
|
||||
if not hasattr(c, '__call__'):
|
||||
if not callable(c):
|
||||
c = self.resolve(c)
|
||||
props = config.pop('.', None)
|
||||
# Check for valid identifiers
|
||||
|
@ -690,7 +690,7 @@ class DictConfigurator(BaseConfigurator):
|
|||
filters = config.pop('filters', None)
|
||||
if '()' in config:
|
||||
c = config.pop('()')
|
||||
if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
|
||||
if not callable(c):
|
||||
c = self.resolve(c)
|
||||
factory = c
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue