The python3 package (rawhide, git 1eeebcf2) has a patch "00132-add-rpmbuild-hooks-to-unittest.patch" which contains broken code (as far as I can see). For example line 45 of said patch references a "_ExpectedFailure" exception which was part of unittest.case in Python 2 but isn't anymore in Python 3. I guess that is not a problem right now (as nobody seems to have noticed the problem so far) but you probably want to review/clean up that patch.
Thanks for reporting, Felix! Robert, I think this is right up your alley.
Btw: Python 3.4 changed the way unexpectedfailures are implement so the patch probably still works for Python 3.3.
I will look into it as a part of python3 spec file clean up process. Thank you!
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
This is the patch: http://pkgs.fedoraproject.org/cgit/rpms/python3.git/tree/00132-add-rpmbuild-hooks-to-unittest.patch?id=28c36c694 Simple grep -Ri _expectedfailureinrpm will show that this decorator isn't being used anywhere. The fix is easy: - @functools.wraps(func) - def wrapper(*args, **kwargs): - if 'WITHIN_PYTHON_RPM_BUILD' in os.environ: - try: - func(*args, **kwargs) - except Exception: - raise _ExpectedFailure(sys.exc_info()) - raise _UnexpectedSuccess - else: - # Call directly: - func(*args, **kwargs) - return wrapper + if 'WITHIN_PYTHON_RPM_BUILD' in os.environ: + return expectedFailure(func) + return func But I would prefer dropping this function.
I've removed the function. http://pkgs.fedoraproject.org/cgit/rpms/python3.git/commit/?id=a1c0d073e