Skip to content

robot.utils.restreader module breaks API doc generation #5498

Closed

Description

@pekkaklarck

I tried to create a link from the robot.api.types module to the robot.utils.secret.Secret class, but the link didn't work. After spending hours to understand what was going on, I realized that the robot.utils.restreader module does some docutils configuration at the module import time and that apparently either breaks normal docutils usage or how the Sphinx tool uses it.

This has been broken for years, most likely since 33ee46d that fixed #4086 in RF 4.1.2. Because the bug only affects API doc generation of modules that are alphabetically after robot.utlls.restreader, only few utility modules were affected. Apparently nobody noticed that.

The fix is easy. We just need to do the needed docutils configuration when Robot parses reST data, not already when the module is imported. At the same time it makes sense to change the code so that configuration is reverted afterwards.

Activity

  1. added this to the v7.4 milestone on Sep 12, 2025
  2. self-assigned this
    on Sep 12, 2025
  3. added theissue type on Sep 12, 2025
  4. added a commit that references this issue on Sep 12, 2025
    92bc1db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions