component/python3: version up python3.11.8
Showing
-
Owner
This fixed erp5.util test for SlapOS.Eggs.UnitTest-Master.Python3Next https://erp5js.nexedi.net/#/test_result_module/20240207-D6DB8C69/5? cc @tomo
-
Owner
great ! slapos.core has failures like this:
====================================================================== FAIL: test_ConnectionError_only_implements (slapos.tests.test_interface.TestInterface.test_ConnectionError_only_implements) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/slapgrid/slappart62/t/ehi/i/0/parts/slapos.core/slapos/tests/test_interface.py", line 42, in testMethod raise AssertionError("Unexpected methods %s" % implemented_method_list) AssertionError: Unexpected methods {'add_note'}
this is because python3.11 added a
add_note
method on exceptions. The failing test checks that classes do not have more methods than their interfaces - but I don't understand why this would be a problem. I was about to suggest removing this test, but maybe a patch like this would be enough :diff --git a/slapos/slap/interface/slap.py b/slapos/slap/interface/slap.py index 161bc4655..f4a47e225 100644 --- a/slapos/slap/interface/slap.py +++ b/slapos/slap/interface/slap.py @@ -32,7 +32,7 @@ Note: all strings accepted/returned by the slap library are encoded in UTF-8. """ -class IException(Interface): +class IException(Interface, Exception): """ Classes which implement IException are used to report errors. """
-
Owner
( if you want to try this patch, please do :) )
Please register or sign in to comment