python-ryu failed to build from source in Fedora rawhide https://koji.fedoraproject.org/koji/taskinfo?taskID=28224673 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Please fix python-ryu at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, python-ryu will be orphaned. Before branching of Fedora 30, python-ryu will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://fedoraproject.org/wiki/Fails_to_build_from_source
Created attachment 1466789 [details] build.log file build.log too big, will only attach last 32768 bytes
Created attachment 1466790 [details] root.log file root.log too big, will only attach last 32768 bytes
Created attachment 1466791 [details] state.log
(This is a mass bug update. Forgive me if things are not 100% accurate for this one.) At this moment, your package still requires Python 3.6. This will cause broken upgrades to Fedora 29. Please prioritize this rebuild. Let me know if you need help from the Python maintenance team figuring out why the package FTBFS. Consider orphaning the package if you don't have time for it. Consider retiring the package if upstream is dead and nothing depends on it in Fedora. If you are blocked by other packages (I've recently tried to set the Bugzilla metadata to reflect that), consider helping there as well. Thank you.
ERROR: Failure: AttributeError ('functools.partial' object has no attribute '__qualname__') ---------------------------------------------------------------------- Traceback (most recent call last): ... File "/builddir/build/BUILD/ryu-4.25/ryu/tests/unit/ofproto/test_parser.py", line 311, in <module> _add_tests() File "/builddir/build/BUILD/ryu-4.25/ryu/tests/unit/ofproto/test_parser.py", line 308, in _add_tests set(unittest.defaultTestLoader.getTestCaseNames(Test_Parser))) File "/usr/lib64/python3.7/unittest/loader.py", line 235, in getTestCaseNames testFnNames = list(filter(shouldIncludeMethod, dir(testCaseClass))) File "/usr/lib64/python3.7/unittest/loader.py", line 232, in shouldIncludeMethod fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__) AttributeError: 'functools.partial' object has no attribute '__qualname__' ---------------------------------------------------------------------- Ran 121542 tests in 276.981s FAILED (SKIP=2, errors=1)
'functools.partial' object had no attribute '__qualname__' even on 3.6
This might be an unittest regression introduced by https://github.com/python/cpython/pull/4496 I'll try to prep a shorter reproducer and will open upstream bug.
Hi, I already reproduced it with Python 3.7 locally. I hope I will propose a patch in upstream soon.
Actually, ryu does some not so common things in test_lib.add_method, not sure if this is supported, but a fix might be: diff --git a/ryu/tests/test_lib.py b/ryu/tests/test_lib.py index 380297b..b30a144 100644 --- a/ryu/tests/test_lib.py +++ b/ryu/tests/test_lib.py @@ -265,6 +265,7 @@ def add_method(cls, method_name, method): """Add the method to the class dynamically, keeping unittest/nose happy.""" method.func_name = method_name method.__name__ = method_name + method.__qualname__ = cls.__qualname__ + '.' + method_name if six.PY3: methodtype = types.MethodType(method, cls) else:
Or rather: + method.__qualname__ = cls.__name__ + '.' + method_name
I just did patch in upstream rye code to fix this issue: https://github.com/osrg/ryu/pull/75
Patch for ryu is merged. Master branch should build fine on py 3.7 now. I will now ask ryu developers when new version with this fix can be released.
Could you please backport the patch?
There is PR do bump python-ryu to 4.27 in rawhide: https://src.fedoraproject.org/rpms/python-ryu/pull-request/4 - this should works fine with py37