'function' directive not registered

Eugeny Rostovtsev avatarEugeny Rostovtsev created an issue

In version 0.6.7 in file sphinx/directives/desc.py it registered:

directives.register_directive('function', directive_dwim(ModulelevelDesc))

But in version 1.0.* this file not exist, and building of documentation for client packages (e.g. NumPy) crashed.

More info: http://projects.scipy.org/numpy/ticket/1489

Comments (5)

  1. Sebastian Wiesner

    All directives are "lost", but this isn't a Sphinx bug. Sphinx internals simply changed when introducing domains, and all language-specific directives and roles (e.g. "function" and "class") are now grouped in what Sphinx calls "domains".

    Simply restoring old 0.6.x code isn't the solution. The broken extension must be re-written for Sphinx 1.0. I don't know, what it does, but it seemingly decorates existing directives. In this case, the proper solution is a special "numpy" domain class, which derives from the standard Python domain and extends the directives and functions accordingly. Ask on the mailing list, if you need advice on how to do this.

  2. 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.