Sphinx: Sphinx 1.8.0 breaks the rstcheck 3.3 utility

Created on 13 Sep 2018  路  6Comments  路  Source: sphinx-doc/sphinx

Subject: Sphinx 1.8.0 breaks the rstcheck 3.3 utility

Problem

When running rstcheck on a reStructedText (.rst) file in a Python environment with Sphinx 1.8.0, an ApplicationError exception is raised. This does not occur with Sphinx 1.7.9.

Procedure to reproduce the problem

Run the rstcheck command in a terminal

rstcheck foo.rst

Error logs / results

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/bin/rstcheck", line 11, in <module>
    sys.exit(main())
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/rstcheck.py", line 939, in main
    with enable_sphinx_if_possible():
  File "/opt/python/3.6.3/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/rstcheck.py", line 897, in enable_sphinx_if_possible
    status=None)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/sphinx/application.py", line 160, in __init__
    raise ApplicationError(__('Source directory and destination '
sphinx.errors.ApplicationError: Source directory and destination directory cannot be identical

Expected results

rstcheck 3.3 should run normally

Reproducible project / your project

Environment info

  • OS: Linux
  • Python version: 3.6.3
  • Sphinx version: 1.8.0
wontfix

Most helpful comment

Fix in rstcheck has been included in 3.3.1 release: https://github.com/myint/rstcheck/pull/51.

All 6 comments

Sphinx does not expect that srcdir and outputdir are same. Since 1.8, we'd started to check that explicitly. Please file a issue to rstcheck project.
Thanks,

I'm closing this now.
Thanks,

Sphinx does not expect that srcdir and outputdir are same. Since 1.8, we'd started to check that explicitly. Please file a issue to rstcheck project.
Thanks,

FYI, this is really bad situation for people using rstcheck & Sphinx. My colleague described it (I quote) as:

Nobody is responsible upstream:
Sphinx: File an issue to rstcheck
rstcheck: Fix sphinx version to 1.7.9

Sphinx does not expect that srcdir and outputdir are same. Since 1.8, we'd started to check that explicitly.

Please give a ref to the docs where this is said.
Please justify throwing the exception.
Thank you.

Fix in rstcheck has been included in 3.3.1 release: https://github.com/myint/rstcheck/pull/51.

Please give a ref to the docs where this is said.

We'd started to check srcdir and outdir since 1.3 (#2193, 9c2704b705d9989ff235625fbf735c79b8086753).
On 1.8 release, it was refactored more explicitly (#4436).

It is not mentioned in docs, but sphinx-build command has emitted errors for a long time.

Was this page helpful?
0 / 5 - 0 ratings