Bug 1301033
Summary: | Python 3: Fedora-specific rpmbuild hooks patch contains unknown symbols | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Felix Schwarz <fschwarz> |
Component: | python3 | Assignee: | Robert Kuska <rkuska> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 24 | CC: | bkabrda, jberan, pviktori, rkuska, tomspur |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-03-17 09:43:48 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1287556 |
Description
Felix Schwarz
2016-01-22 11:38:12 UTC
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 |