Registry / testing / sybil-extras

sybil-extras

JSON →
library2026.5.25pypiunverified

sybil-extras is a Python library that provides additional parsers and functionalities to Sybil, the documentation testing tool. It extends Sybil's capabilities to handle more complex documentation formats and integrations, such as MyPy documentation and advanced reStructuredText features. The library is actively maintained with frequent releases, currently at version 2026.3.1.6.

pip install sybil-extras
INSTALL
IMPORT
SIG · SYBIL-EXTRAS
S
sybil-extras
testingenv2026.5.25
Install
5.4s avg
Import
Disk
91MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.2.27 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 2.65s
py 3.11
✓ —
✓ 6.75s
py 3.12
✓ —
✓ 6.1s
py 3.13
✓ —
✓ 6.1s
py 3.9
✕ build_error
✕ build_error
91MB installed
● package 91MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DOCUTILS_RST
from sybil_extras.parsers.rst import DOCUTILS_RST
Imports the specialized reStructuredText parser from sybil-extras.
mypy_docs
from sybil_extras.parsers.myst import mypy_docs
Imports the MyST parser for MyPy documentation. Path inferred.

This quickstart demonstrates integrating a sybil-extras parser, `DOCUTILS_RST`, with `pytest` to test reStructuredText documentation. It sets up Sybil to discover and evaluate examples within .rst files.

import pytest from sybil import Sybil from sybil_extras.parsers.rst import DOCUTILS_RST README = Sybil( parsers=[DOCUTILS_RST], # Example using a sybil-extras parser patterns=["*.rst"], fixtures=["tmp_path"], ) @pytest.mark.parametrize("sybil", [README], ids=str) def test_documentation(sybil): sybil.run()
Debug
Known issues
gotchaOlder versions of `sybil-extras` (prior to 2026.03.01.1) might have incorrectly applied `--example-workers 0` to all MyPy documentation examples, potentially causing unexpected behavior or errors if MyPy examples were not designed for single-worker execution.
fix
Upgrade to `sybil-extras` version 2026.03.01.1 or later. Ensure your MyPy testing setup is compatible with current `mypy_docs` parser behavior.
affects: <2026.03.01.1
breakingIn versions prior to 2026.03.01.3, the `DOCUTILS_RST` parser could crash when encountering reStructuredText `include` directives or did not support Sphinx Jinja2 syntax within RST files.
fix
Upgrade to `sybil-extras` version 2026.03.01.3 or newer to resolve crashes with `include` directives and enable Sphinx Jinja2 support. You may also need to update `docutils` and `sphinx` dependencies if issues persist.
affects: <2026.03.01.3
gotchaEnsure all necessary underlying parsers (like `docutils` for `DOCUTILS_RST` or `mypy` for `mypy_docs`) are installed as optional dependencies. Missing these will lead to import errors or runtime failures when their respective parsers are used.
fix
Install optional dependencies as needed, e.g., `pip install sybil-extras[rst]` or `pip install 'sybil-extras[mypy]'` if such extras are defined, or install the base packages directly: `pip install docutils sphinx mypy`.
affects: All versions
Errors
Common errors & fixes
ImportError: cannot import name 'DOCUTILS_RST' from 'sybil_extras.parsers.rst'
The `sybil-extras` library or its specific parsers were not correctly installed, or the import path is incorrect. It may also mean the optional dependency `docutils` is missing.
fix
Ensure `sybil-extras` is installed (`pip install sybil-extras`) and that `docutils` is also installed (`pip install docutils`). Verify the import statement matches the library's structure (e.g., `from sybil_extras.parsers.rst import DOCUTILS_RST`).
sybil.exceptions.SybilError: Error running example: Command failed (exit code ...)
An example within your documentation failed to execute correctly, possibly due to a parsing issue introduced by `sybil-extras` (especially in older versions) or an error in the example code itself.
fix
First, check the example code for correctness. If `DOCUTILS_RST` or `mypy_docs` are involved, consider updating `sybil-extras` to the latest version (>=2026.03.01.3 for RST issues, >=2026.03.01.1 for MyPy issues) and ensure all required dependencies are met. Inspect the full traceback for more specific details on the command that failed.
Upgrade
Version history
2026.5.25latest on PyPI · released May 25, 2026
Audit
Dependencies
sybilrequiredCore dependency, sybil-extras extends its functionality.
docutilsoptionalRequired for reStructuredText parsing, particularly for the `DOCUTILS_RST` parser.
sphinxoptionalLikely required for features related to Sphinx, such as Jinja2 support within RST.
mypyoptionalRequired for integrating MyPy documentation testing.
Agent activity
8 hits · last 30 days
node
8
Resources

No resource links recorded.

sybil-extras — pip install sybil-extras · libregistry