Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1605896 - python-ryu: FTBFS in Fedora rawhide
Summary: python-ryu: FTBFS in Fedora rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ryu
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Slawek Kaplonski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON37 F29FTBFS
TreeView+ depends on / blocked
 
Reported: 2018-07-20 17:30 UTC by Mohan Boddu
Modified: 2018-08-12 21:15 UTC (History)
3 users (show)

Fixed In Version: python-ryu-4.27-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-12 21:15:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2018-07-20 17:30 UTC, Mohan Boddu
no flags Details
root.log (32.00 KB, text/plain)
2018-07-20 17:30 UTC, Mohan Boddu
no flags Details
state.log (627 bytes, text/plain)
2018-07-20 17:31 UTC, Mohan Boddu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github osrg ryu pull 75 0 None None None 2018-07-25 11:53:06 UTC

Description Mohan Boddu 2018-07-20 17:30:35 UTC
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

Comment 1 Mohan Boddu 2018-07-20 17:30:54 UTC
Created attachment 1466789 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Mohan Boddu 2018-07-20 17:30:57 UTC
Created attachment 1466790 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Mohan Boddu 2018-07-20 17:31:03 UTC
Created attachment 1466791 [details]
state.log

Comment 4 Miro Hrončok 2018-07-25 09:25:08 UTC
(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.

Comment 5 Alan Pevec 2018-07-25 11:02:21 UTC
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)

Comment 6 Miro Hrončok 2018-07-25 11:16:21 UTC
'functools.partial' object had no attribute '__qualname__' even on 3.6

Comment 7 Miro Hrončok 2018-07-25 11:21:07 UTC
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.

Comment 8 Slawek Kaplonski 2018-07-25 11:26:28 UTC
Hi,

I already reproduced it with Python 3.7 locally. I hope I will propose a patch in upstream soon.

Comment 9 Miro Hrončok 2018-07-25 11:33:22 UTC
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:

Comment 10 Miro Hrončok 2018-07-25 11:34:40 UTC
Or rather:

+    method.__qualname__ = cls.__name__ + '.' + method_name

Comment 11 Slawek Kaplonski 2018-07-25 11:51:54 UTC
I just did patch in upstream rye code to fix this issue: https://github.com/osrg/ryu/pull/75

Comment 12 Slawek Kaplonski 2018-07-31 13:16:43 UTC
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.

Comment 13 Miro Hrončok 2018-08-06 10:07:20 UTC
Could you please backport the patch?

Comment 14 Slawek Kaplonski 2018-08-09 07:40:01 UTC
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


Note You need to log in before you can comment on or make changes to this bug.