Bug 2059964

Summary: python-promise fails to build with pytest 7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-promiseAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mail
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-promise-2.3.0-9.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-04 09:28:23 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: 2050629    

Description Miro Hrončok 2022-03-02 12:12:05 UTC
In this copr repo, I have updated pytest to 7.0.1:

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/

Based on this PR:

https://src.fedoraproject.org/rpms/pytest/pull-request/25

I'd like to update pytest to 7 in Fedora 37, but python-promise 2.3.0-8 fails to build.

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/python-promise/


=================================== FAILURES ===================================
____________________ test_thrown_exceptions_have_stacktrace ____________________

    def test_thrown_exceptions_have_stacktrace():
        def throws(v):
            assert False
    
        p3 = Promise.resolve("a").then(throws)
        with raises(AssertionError) as assert_exc:
            p3.get()
    
>       assert assert_exc.traceback[-1].path.strpath == __file__
E       AttributeError: 'PosixPath' object has no attribute 'strpath'

tests/test_extra.py:116: AttributeError
__________________ test_thrown_exceptions_preserve_stacktrace __________________

    def test_thrown_exceptions_preserve_stacktrace():
        def throws(v):
            assert False
    
        def after_throws(v):
            pass
    
        p3 = Promise.resolve("a").then(throws).then(after_throws)
        with raises(AssertionError) as assert_exc:
            p3.get()
    
>       assert assert_exc.traceback[-1].path.strpath == __file__
E       AttributeError: 'PosixPath' object has no attribute 'strpath'

tests/test_extra.py:130: AttributeError


A fix has been proposed upstream in https://github.com/syrusakbary/promise/pull/96


There are several packages affected by this update, so I'd very much appreciate it if you could backport the fix.

Thanks!

Comment 1 Fedora Update System 2022-03-04 09:26:13 UTC
FEDORA-2022-1abcee7ee8 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-1abcee7ee8

Comment 2 Fedora Update System 2022-03-04 09:28:23 UTC
FEDORA-2022-1abcee7ee8 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.