Bug 2059953 - python-diff-cover fails to build with pytest 7
Summary: python-diff-cover fails to build with pytest 7
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-diff-cover
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11 F37FTBFS PYTEST7
TreeView+ depends on / blocked
 
Reported: 2022-03-02 11:56 UTC by Miro Hrončok
Modified: 2023-09-15 01:52 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-22 00:44:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Bachmann1234 diff_cover pull 264 0 None Merged Fix tests for pytest 7.0 2022-03-02 11:56:36 UTC

Description Miro Hrončok 2022-03-02 11:56:21 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-diff-cover 6.4.4-3 fails to build.

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

________________ TestSimpleReportGenerator.test_percent_covered ________________

self = <tests.test_report_generator.TestSimpleReportGenerator object at 0x7f27afc9c550>

    def test_percent_covered(self):
        # Check that we get the expected coverage percentages
        # By construction, both files have the same diff line
        # and coverage information
    
        # There are 6 lines that are both in the diff and measured,
        # and 4 of those are covered.
        for src_path in self.SRC_PATHS:
>           assert pytest.approx(self.report.percent_covered(src_path), 4.0 / 6 * 100)
E           AssertionError: approx() is not supported in a boolean context.
E           Did you mean: `assert a == approx(b)`?

tests/test_report_generator.py:191: AssertionError
=========================== short test summary info ============================
FAILED tests/test_report_generator.py::TestSimpleReportGenerator::test_percent_covered



This should be fixed in https://github.com/Bachmann1234/diff_cover/pull/264


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

Thanks!

Comment 1 Tomáš Hrnčiar 2022-04-21 14:15:18 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2022-04-27).

A week before the mass branching of Fedora 38 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 36 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

Comment 2 Tomáš Hrnčiar 2022-05-18 06:56:35 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 37.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-12-28).

A week before the mass branching of Fedora 38 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 36 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-38/f-38-key-tasks.html

Comment 3 Fedora Admin user for bugzilla script actions 2022-06-16 12:11:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 4 Adam Williamson 2022-06-22 00:44:13 UTC
This got fixed upstream along the way. More recent builds failed for a different reason, I have fixed that and sent a build to Rawhide that succeeded:
https://koji.fedoraproject.org/koji/taskinfo?taskID=88576572

Comment 5 Red Hat Bugzilla 2023-09-15 01:52:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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