Skip to content

RemovedInSphinx90Warning ("The str interface for _JavaScript objects is deprecated") #197

@ru-fu

Description

@ru-fu

Describe the bug

When building with Sphinx 8.x, sphinx-tabs gives the following errors:

.../.sphinx/venv/lib/python3.10/site-packages/sphinx_tabs/tabs.py:335: RemovedInSphinx90Warning: The str interface for _JavaScript objects is deprecated. Use js.filename instead.
  if path.suffix == ".js" and path.as_posix() in context["script_files"]:
.../.sphinx/venv/lib/python3.10/site-packages/sphinx_tabs/tabs.py:336: RemovedInSphinx90Warning: The str interface for _JavaScript objects is deprecated. Use js.filename instead.
  context["script_files"].remove(path.as_posix())

These aren't actually Sphinx errors and don't cause the build to fail, but I haven't figured out how to filter them out, so they make the build log unreadable.
And it will probably render sphinx-tabs unusable in Sphinx 9.x.

Seems the deprecation message has been introduced in this commit: sphinx-doc/sphinx@49dc0dd

Reproduce the bug

Build a doc set that includes tabs with Sphinx 8.x.

List your environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions