Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix building docs on Debian Bullseye #1602

Merged
merged 2 commits into from Oct 13, 2021

Conversation

saschalucas
Copy link
Member

When building docs with man pages (--enable-manpages-in-doc) the following issues exists:

  • Sphinx refdomain=None no longer works. In a previous fix (commit 388c0b6, by @cilq ) refdomain=None was introduced. However this emits a deprecation warning on pre Debian Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this by setting refdomain=std:
  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.
  • On Bullseye an other deprecation warning is emitted and no longer works the old way. Fixing this as suggested in the warning:
  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

When building docs with man pages (`--enable-manpages-in-doc`) the
following issues exists:

* Sphinx refdomain=None no longer works. In a previous fix (commit
  388c0b6) refdomain=None was
  introduced. However this emits a deprecation warning on pre Debian
  Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this
  by setting refdomain=std:

  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.

* On Bullseye an other deprecation warning is emitted and no longer
  works the old way. Fixing this as suggested in the warning:

  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
@saschalucas
Copy link
Member Author

OK. It builds on Bullseye, but nothing else:

Exception occurred:
  File "/usr/lib/python3/dist-packages/pygments/__init__.py", line 48, in lex
    raise TypeError('lex() argument must be a lexer instance, '
TypeError: lex() argument must be a lexer instance, not a class

I need to investigate further on a fix depended on the sphinx version.

@saschalucas saschalucas marked this pull request as draft July 4, 2021 11:13
According to Sphinx changelog[1] add_lexer() takes a Lexer class instead
of instance since 2.1.0

[1] https://www.sphinx-doc.org/en/master/changes.html

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
@saschalucas saschalucas marked this pull request as ready for review July 5, 2021 17:57
@saschalucas saschalucas requested a review from iustin July 9, 2021 18:29
@saschalucas
Copy link
Member Author

friendly ping @iustin

@mbakke
Copy link
Contributor

mbakke commented Oct 13, 2021

Whoops, not sure how I missed this PR before preparing #1615.

LGTM, FWIW 👍

I'll rebase the one relevant commit in #1615 after this is merged.

@mbakke
Copy link
Contributor

mbakke commented Oct 13, 2021

Maybe also backport to 3.0? Or target it directly and "upmerge", like in the days of yore...

@iustin
Copy link
Contributor

iustin commented Oct 13, 2021

friendly ping @iustin

Sorry for the late reply, I don't have much time nowadays. This seems very straightforward, thank you.

@saschalucas saschalucas merged commit 40c4390 into ganeti:master Oct 13, 2021
@saschalucas
Copy link
Member Author

Thank you @iustin.

@mbakke: I've tagged this PR for backport to 3.0, since this would ease my tests for Debian Bullseye. And last but not least ganeti docs should be generated on Bullseye next time.

@saschalucas saschalucas deleted the fix_doc_bullseye branch October 15, 2021 19:44
rbott pushed a commit to rbott/ganeti that referenced this pull request Jan 16, 2022
When building docs with man pages (`--enable-manpages-in-doc`) the
following issues exists:

* Sphinx refdomain=None no longer works. In a previous fix (commit
  388c0b6) refdomain=None was
  introduced. However this emits a deprecation warning on pre Debian
  Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this
  by setting refdomain=std:

  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.

* On Bullseye an other deprecation warning is emitted and no longer
  works the old way. Fixing this as suggested in the warning, while keeping
  support for sphinx before 2.1.0:

  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
rbott pushed a commit to rbott/ganeti that referenced this pull request Jan 24, 2022
When building docs with man pages (`--enable-manpages-in-doc`) the
following issues exists:

* Sphinx refdomain=None no longer works. In a previous fix (commit
  388c0b6) refdomain=None was
  introduced. However this emits a deprecation warning on pre Debian
  Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this
  by setting refdomain=std:

  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.

* On Bullseye an other deprecation warning is emitted and no longer
  works the old way. Fixing this as suggested in the warning, while keeping
  support for sphinx before 2.1.0:

  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
(cherry picked from commit 40c4390)
@saschalucas saschalucas added the Backport to 3.0 done backport to 3.0 is done label Feb 1, 2022
rbott pushed a commit that referenced this pull request Feb 13, 2022
When building docs with man pages (`--enable-manpages-in-doc`) the
following issues exists:

* Sphinx refdomain=None no longer works. In a previous fix (commit
  388c0b6) refdomain=None was
  introduced. However this emits a deprecation warning on pre Debian
  Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this
  by setting refdomain=std:

  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.

* On Bullseye an other deprecation warning is emitted and no longer
  works the old way. Fixing this as suggested in the warning, while keeping
  support for sphinx before 2.1.0:

  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
(cherry picked from commit 40c4390)
rbott pushed a commit to rbott/ganeti that referenced this pull request Feb 13, 2022
When building docs with man pages (`--enable-manpages-in-doc`) the
following issues exists:

* Sphinx refdomain=None no longer works. In a previous fix (commit
  388c0b6) refdomain=None was
  introduced. However this emits a deprecation warning on pre Debian
  Bullseye (i.e. Ubuntu Focal) and no longer works on Bullseye. Fix this
  by setting refdomain=std:

  RemovedInSphinx20Warning: Invalid pendig_xref node detected. :doc: reference should have refdomain=std attribute.

* On Bullseye an other deprecation warning is emitted and no longer
  works the old way. Fixing this as suggested in the warning, while keeping
  support for sphinx before 2.1.0:

  RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance

Signed-off-by: Sascha Lucas <sascha_lucas@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants