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

marc2982 avatarmarc2982 created an issue


  • 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

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

        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 (5)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.