Issues

Issue #1233 resolved

[intersphinx] Cannot find reference targets for built-in exceptions when aliasing

marc2982
created an issue

Info:

  • Sphinx (sphinx-build) 1.2b1
  • Python 2.6.6, Ubuntu
  • Intersphinx enabled

This is similar to Issue #1034, but it is a bit of a different use case.

My class has this:

class MyClass:
    failure_exception = AssertionError

My .rst file has this:

.. automodule:: test.myclass
    :members:

And I get this exception:

Warning, treated as error:
/home/me/test/myclass.rst:35: WARNING: py:class reference target not found: AssertionError

When I don't use -W the docs show this (without the link to AssertionError):

class test.myclass.MyClass

    failure_exception
        alias of AssertionError

I have also tried adding this to the top, with no luck:

from exceptions import AssertionError

Is this a bug or am I doing it wrong?

Thanks, Marc

Comments (6)

  1. Log in to comment