sveetch / boussole

Command line interface to build Sass projects using 'libsass-python'.
http://boussole.readthedocs.io
MIT License
10 stars 5 forks source link

ReadTheDoc build is broken #47

Open sveetch opened 1 year ago

sveetch commented 1 year ago

Describe the bug Build on RTD has failed with the last release to fix the .readthedoc.yml file

Environment Describe your environment:

To Reproduce I didn't reproduced it locally yet, this only occurs on RTD build CI.

Here is a part of the long traceback (full version only available on RTD):

Running Sphinx v1.8.6
loading translations [en]... done
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 17 source files that are out of date
updating environment: 17 added, 0 changed, 0 removed
reading sources... [  5%] api/compiler

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/cmd/build.py", line 304, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/application.py", line 341, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 345, in build_update
    self.build(to_build,
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 360, in build
    updated_docnames = set(self.read())
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 468, in read
    self._read_serial(docnames)
[....]
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 177, in __init__
    self._parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 578, in _parse
    lines = self._sections[section.lower()](section)
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 691, in _parse_parameters_section
    fields = self._consume_fields()
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 258, in _consume_fields
    _name, _type, _desc = self._consume_field(parse_type, prefer_type)
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 250, in _consume_field
    _descs = self.__class__(_descs, self._config).lines()
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 123, in __init__
    elif isinstance(obj, collections.Callable):  # type: ignore
AttributeError: module 'collections' has no attribute 'Callable'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/boussole/envs/latest/lib/python3.10/site-packages/sphinx/ext/napoleon/docstring.py", line 123, in __init__
    elif isinstance(obj, collections.Callable):  # type: ignore
AttributeError: module 'collections' has no attribute 'Callable'
The full traceback has been saved in /tmp/sphinx-err-d6st5y__.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Looks to be related to napoleon shipped in Sphinx, strangely it seems a very old sphinx 1.x is used.

Expected behavior It should works !

We should open a dedicated branch for testing to update docs/requirements.txt to use boussole[doc] instead of just boussole then try building doc for this branch and see if it resolves issue.

sveetch commented 1 year ago

Fixed but using "boussole[doc]" is not good things to do, see https://github.com/sveetch/cookiecutter-sveetch-python/issues/15 for a better way