New submission from flying sheep:
If I have a setup.py containing a include directive, and use the command in the
title, I get
Traceback (most recent call last):
[...]
File
"/usr/lib/python3.6/site-packages/docutils/parsers/rst/directives/misc.py",
line 59, in run
source_dir = os.path.dirname(os.path.abspath(source))
File "/usr/lib/python3.6/posixpath.py", line 369, in abspath
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not _io.StringIO
The bug is in this method: distutils.command.check.check._check_rst_data
The first line already hints at it: `source_path = StringIO()`
StringIO instances aren’t paths, but at least the include directive
(docutils.parsers.rst.directives.misc.Include) expects one.
----------
components: Distutils
files: check-test.py
messages: 300953
nosy: dstufft, flying sheep, merwok
priority: normal
severity: normal
status: open
title: `python setup.py check --restructuredtext` fails when a include
directive is present.
type: crash
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file47104/check-test.py
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com