Bug#997366: speedcrunch: FTBFS: TypeError: 'SpeedCrunchSessionLexer' object is not callable

2022-11-19 Thread Felix Krull
On Sat, 29 Oct 2022 at 10:57, Felix Geyer  wrote:
> I've prepared a fix for building against Sphinx >= 4 and uploaded it to 
> DELAYED/5.
> Please feel free to tell me if I should cancel it. The debdiff is attached.

Nah, it's great, thanks for fixing this. I pushed the fix to the repo
and upstream as well.



Bug#997366: speedcrunch: FTBFS: TypeError: 'SpeedCrunchSessionLexer' object is not callable

2022-10-29 Thread Felix Geyer

Control: tags -1 patch
Control: tags -1 pending

On Sat, 23 Oct 2021 21:41:50 +0200 Lucas Nussbaum  wrote:

Source: speedcrunch
Version: 0.12.0-5
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


I've prepared a fix for building against Sphinx >= 4 and uploaded it to 
DELAYED/5.
Please feel free to tell me if I should cancel it. The debdiff is attached.

Felixdiff -Nru speedcrunch-0.12.0/debian/changelog 
speedcrunch-0.12.0/debian/changelog
--- speedcrunch-0.12.0/debian/changelog 2020-04-19 14:13:08.0 +0200
+++ speedcrunch-0.12.0/debian/changelog 2022-10-29 09:59:26.0 +0200
@@ -1,3 +1,11 @@
+speedcrunch (0.12.0-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix docs build with Sphinx >= 4. (Closes: #997366)
+- Add 0007-fix-docs-build-with-Sphinx-4.patch
+
+ -- Felix Geyer   Sat, 29 Oct 2022 09:59:26 +0200
+
 speedcrunch (0.12.0-5) unstable; urgency=medium
 
   * d/patches, d/control: fix docs build with Sphinx >= 2.0
diff -Nru 
speedcrunch-0.12.0/debian/patches/0007-fix-docs-build-with-Sphinx-4.patch 
speedcrunch-0.12.0/debian/patches/0007-fix-docs-build-with-Sphinx-4.patch
--- speedcrunch-0.12.0/debian/patches/0007-fix-docs-build-with-Sphinx-4.patch   
1970-01-01 01:00:00.0 +0100
+++ speedcrunch-0.12.0/debian/patches/0007-fix-docs-build-with-Sphinx-4.patch   
2022-10-29 09:59:26.0 +0200
@@ -0,0 +1,33 @@
+Description: Fix FTBFS with Sphinx >= 4
+
+Pass the type instead of an instance to add_lexer().
+
+> Sphinx.add_lexer():
+> Take a lexer class as an argument.
+> An instance of lexers are still supported until Sphinx-3.x.
+
+--- speedcrunch-0.12.0.orig/doc/src/extensions/sc_lexer.py
 speedcrunch-0.12.0/doc/src/extensions/sc_lexer.py
+@@ -108,16 +108,18 @@ class SpeedCrunchSessionLexer(SpeedCrunc
+ ]
+ }
+ 
++def __init__(self):
++super().__init__(stripnl=False)
++self.add_filter('raiseonerror')
++
+ 
+ __all__ = ['SpeedCrunchLexer', 'SpeedCrunchSessionLexer']
+ 
+ 
+ # Sphinx extension interface
+ def setup(app):
+-sc_lexer = SpeedCrunchSessionLexer(stripnl=False)
+-sc_lexer.add_filter('raiseonerror')
+-app.add_lexer('sc', sc_lexer)
+-app.add_lexer('speedcrunch', sc_lexer)
++app.add_lexer('sc', SpeedCrunchSessionLexer)
++app.add_lexer('speedcrunch', SpeedCrunchSessionLexer)
+ return {
+ 'version': '0.1',
+ 'parallel_read_safe': True,
diff -Nru speedcrunch-0.12.0/debian/patches/series 
speedcrunch-0.12.0/debian/patches/series
--- speedcrunch-0.12.0/debian/patches/series2020-04-19 11:13:12.0 
+0200
+++ speedcrunch-0.12.0/debian/patches/series2022-10-29 09:59:14.0 
+0200
@@ -4,3 +4,4 @@
 0004-Replace-the-REBUILD_MANUAL-option-with-a-path.patch
 0005-docs-fix-docs-build-with-Sphinx-2.0.patch
 0006-Use-CMake-s-CXX_STANDARD-property.patch
+0007-fix-docs-build-with-Sphinx-4.patch


Bug#997366: speedcrunch: FTBFS: TypeError: 'SpeedCrunchSessionLexer' object is not callable

2021-10-23 Thread Lucas Nussbaum
Source: speedcrunch
Version: 0.12.0-5
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> make[4]: Entering directory '/<>/build-docs'
> [100%] Generating manual.qrc
> Running Sphinx v4.2.0
> loading translations [en_US]... not available for built-in messages
> making output directory... done
> loading 'extra-doc-strings' translations [en_US]...
> building [mo]: targets for 0 po files that are out of date
> building [qthelp2]: targets for 16 source files that are out of date
> updating environment: [new config] 16 added, 0 changed, 0 removed
> reading sources... [  6%] advanced/colorschemeformat
> reading sources... [ 12%] advanced/index
> reading sources... [ 18%] contents
> reading sources... [ 25%] introduction
> reading sources... [ 31%] reference/basic
> reading sources... [ 37%] reference/constants
> reading sources... [ 43%] reference/ieee754
> reading sources... [ 50%] reference/index
> reading sources... [ 56%] reference/integer
> reading sources... [ 62%] reference/statistical
> reading sources... [ 68%] userguide/advanced
> reading sources... [ 75%] userguide/first_steps
> reading sources... [ 81%] userguide/index
> reading sources... [ 87%] userguide/installation
> reading sources... [ 93%] userguide/interface
> reading sources... [100%] userguide/syntax
> 
> looking for now-outdated files... none found
> pickling environment... done
> checking consistency... done
> preparing documents... done
> writing output... [  6%] advanced/colorschemeformat
> writing output... [ 12%] advanced/index
> writing output... [ 18%] contents
> writing output... [ 25%] introduction
> writing output... [ 31%] reference/basic
> 
> Exception occurred:
>   File "/usr/lib/python3/dist-packages/sphinx/highlighting.py", line 127, in 
> get_lexer
> lexer = lexer_classes[lang](**opts)
> TypeError: 'SpeedCrunchSessionLexer' object is not callable
> The full traceback has been saved in /tmp/sphinx-err-ck3e8w6e.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 
> . Thanks!
> Building docs for en_US...
> Traceback (most recent call last):
>   File "/<>/doc/src/doc-tool.py", line 208, in 
> main(sys.argv)
>   File "/<>/doc/src/doc-tool.py", line 202, in main
> args.func(tools, args)
>   File "/<>/doc/src/doc-tool.py", line 135, in build_bundled_docs
> build_docs(tools, args.source_dir, args.build_dir, lang,
>   File "/<>/doc/src/doc-tool.py", line 77, in build_docs
> return tools.sphinx_build(*args)
>   File "/<>/doc/src/doc-tool.py", line 52, in 
> return lambda *args: self.run_tool(name, *args)
>   File "/<>/doc/src/doc-tool.py", line 49, in run_tool
> return subprocess.check_call(cmd)
>   File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['/usr/bin/sphinx-build', 
> '/<>/doc/src', '/<>/build-docs/en_US', '-b', 
> 'qthelp2', '-D', 'qthelp_basename=manual-en_US', '-D', 'language=en_US', 
> '-t', 'sc_bundled_docs']' returned non-zero exit status 2.
> make[4]: *** [CMakeFiles/manual.dir/build.make:102: manual.qrc] Error 1


The full build log is available from:
http://qa-logs.debian.net/2021/10/23/speedcrunch_0.12.0-5_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.