title: Pylint infinite recursion in astriod package
body: <p>I have a following code snippet, that pylint cannot handle:</p>
  
  <pre><code>from celery import Celery
  
  
  def create_celery(application):
      """
      Configures celery instance from application, using it's config
      :param application: Flask application instance
      :return: Celery instance
      """
      celery = Celery(application.import_name)
      celery.conf.update(application.config)
      TaskBase = celery.Task
  
      class ContextTask(TaskBase):
          abstract = True
  
          def __call__(self, *args, **kwargs):
              with application.app_context():
                  return TaskBase.__call__(self, *args, **kwargs)
  
      celery.Task = ContextTask
      return celery
  </code></pre>
  
  <p>I get following error:</p>
  
  <pre><code> File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 325, in raise_if_nothing_inferred
      for node in func(*args, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/inference.py", line 156, in infer_attribute
      for owner in self.expr.infer(context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 99, in _infer_stmts
      for inferred in stmt.infer(context=context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 99, in _infer_stmts
      for inferred in stmt.infer(context=context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 325, in raise_if_nothing_inferred
      for node in func(*args, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/inference.py", line 100, in infer_call
      for callee in self.func.infer(context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 99, in _infer_stmts
      for inferred in stmt.infer(context=context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 99, in _infer_stmts
      for inferred in stmt.infer(context=context):
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 49, in cache_generator
      for result in generator:
    File "/usr/local/lib/python3.4/dist-packages/astroid/bases.py", line 302, in wrapped
      for res in _func(node, context, **kwargs):
    File "/usr/local/lib/python3.4/dist-packages/astroid/inference.py", line 144, in infer_import_from
      context = contextmod.copy_context(context)
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 79, in copy_context
      return context.clone()
    File "/usr/local/lib/python3.4/dist-packages/astroid/context.py", line 42, in clone
      clone = InferenceContext(self.path, inferred=self.inferred)
  RuntimeError: maximum recursion depth exceeded
  </code></pre>
  
  <p>I use latest pylint 1.5.5 and python 3.4 </p>
  
  <p>I've tried to contact logilab on issue tracker, but it seems that they have a broken login functionality.</p>
  
  <p>I found a workaround for this, use a --ignore option for that file, but it doesn't solves the problem</p>