Bug+fix: sipbuild-6.7.2 exception handler throws error
Patrick Stinson
patrickkidd at gmail.com
Tue Oct 18 22:52:46 BST 2022
Phil,
I found a bug in sipbuild-6.7.2.
I got the following exception when running into errors in my custom sip
files while upgrading from PyQt5 to PyQt6. It looks like changing
OverloadFormatter(overload,
scope) to OverloadFormatter('any string', overload, scope) allows
exceptions to be printed.
bash-5.2$ sip-build
Querying qmake about your Qt installation...
/Users/patrick/dev/lib/Qt/6.4.0/macos/bin/qmake -query
These bindings will be built: _pkdiagram.
Generating the _pkdiagram bindings...
sip-build: An internal error occurred...
Traceback (most recent call last):
File "/Users/patrick/dev/familydiagram/.venv/bin/sip-build", line 8, in
<module>
sys.exit(main())
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/tools/build.py",
line 37, in main
handle_exception(e)
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/exceptions.py",
line 81, in handle_exception
raise e
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/tools/build.py",
line 34, in main
project.build()
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/project.py",
line 244, in build
self.builder.build()
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/builder.py",
line 48, in build
self._generate_bindings()
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/builder.py",
line 277, in _generate_bindings
buildable = bindings.generate()
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/bindings.py",
line 171, in generate
resolve(spec)
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 98, in resolve
_resolve_module(spec, spec.modules[0], error_log)
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 231, in _resolve_module
_resolve_scope_overloads(spec, klass.overloads, error_log,
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 936, in _resolve_scope_overloads
_resolve_func_types(spec, overload.common.module, scope, overload,
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 1288, in _resolve_func_types
_resolve_py_signature_types(spec, mod, scope, overload, error_log)
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 1375, in _resolve_py_signature_types
_log_overload_error(error_log,
File
"/Users/patrick/dev/familydiagram/.venv/lib/python3.10/site-packages/sipbuild/generator/resolver/resolver.py",
line 2195, in _log_overload_error
formatter = OverloadFormatter(overload, scope)
TypeError: ScopedFormatter.__init__() missing 1 required positional
argument: 'scope'
Cheers,
-Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221018/83d40c08/attachment.htm>
More information about the PyQt
mailing list