Bug 2328707 - python-img2pdf fails to build in rawhide: 48 AssertionErrors
Summary: python-img2pdf fails to build in rawhide: 48 AssertionErrors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-img2pdf
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Georg Sauthoff
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F42FTBFS PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-11-25 16:30 UTC by Karolina Surma
Modified: 2025-04-11 18:26 UTC (History)
4 users (show)

Fixed In Version: python-img2pdf-0.6.0-1.fc43 python-img2pdf-0.6.0-1.fc42
Clone Of:
Environment:
Last Closed: 2025-04-01 13:51:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2024-11-25 16:30:52 UTC
python-img2pdf fails to build with Python 3.14.0a2.

__________________ ERROR at setup of test_miff_rgb8[pikepdf] ___________________

tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7f26077deea0>, _basetemp=PosixPath('/tmp/pytest-of-mockbuild/pytest-0'), _retention_count=3, _retention_policy='all')
tmp_normal_png = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/normal_png0/normal.png')

    @pytest.fixture(scope="session")
    def tiff_rgb8_img(tmp_path_factory, tmp_normal_png):
        in_img = tmp_path_factory.mktemp("tiff_rgb8") / "in.tiff"
        subprocess.check_call(
            CONVERT + [str(tmp_normal_png), "-compress", "Zip", str(in_img)]
        )
        identify = json.loads(subprocess.check_output(CONVERT + [str(in_img), "json:"]))
        assert len(identify) == 1
        # somewhere between imagemagick 6.9.7.4 and 6.9.9.34, the json output was
        # put into an array, here we cater for the older version containing just
        # the bare dictionary
        if "image" in identify:
            identify = [identify]
        assert "image" in identify[0]
        assert identify[0]["image"].get("format") == "TIFF", str(identify)
        assert identify[0]["image"].get("mimeType") == "image/tiff", str(identify)
        assert identify[0]["image"].get("geometry") == {
            "width": 60,
            "height": 60,
            "x": 0,
            "y": 0,
        }, str(identify)
        assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
        assert identify[0]["image"].get("type") == "TrueColor", str(identify)
        assert identify[0]["image"].get("depth") == 8, str(identify)
        assert identify[0]["image"].get("pageGeometry") == {
            "width": 60,
            "height": 60,
            "x": 0,
            "y": 0,
        }, str(identify)
>       assert (
            identify[0]["image"].get("properties", {}).get("tiff:alpha") == "unspecified"
        ), str(identify)
E       AssertionError: [{'version': '1.0', 'image': {'name': '/tmp/pytest-of-mockbuild/pytest-0/tiff_rgb80/in.tiff', 'baseName': 'in.tiff', 'format': 'TIFF', 'formatDescription': 'Tagged Image File Format', 'mimeType': 'image/tiff', 'class': 'DirectClass', 'geometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'units': 'PixelsPerInch', 'type': 'TrueColor', 'endianness': 'LSB', 'colorspace': 'sRGB', 'depth': 8, 'baseDepth': 8, 'channelDepth': {'red': 8, 'green': 8, 'blue': 1}, 'pixels': 3600, 'imageStatistics': {'Overall': {'min': 0, 'max': 255, 'mean': 74.1465, 'median': 0, 'standardDeviation': 106.006, 'kurtosis': -1.00199, 'skewness': 0.91509, 'entropy': 0.460859}}, 'channelStatistics': {'red': {'min': 0, 'max': 255, 'mean': 74.1542, 'median': 0, 'standardDeviation': 105.978, 'kurtosis': -1.0011, 'skewness': 0.915359, 'entropy': 0.462046}, 'green': {'min': 0, 'max': 255, 'mean': 74.2758, 'median': 0, 'standardDeviation': 106.06, 'kurtosis': -1.00686, 'skewness': 0.912479, 'entropy': 0.460981}, 'blue': {'min': 0, 'max': 255, 'mean': 74.0094, 'median': 0, 'standardDeviation': 105.979, 'kurtosis': -0.998009, 'skewness': 0.917431, 'entropy': 0.459548}}, 'renderingIntent': 'Perceptual', 'gamma': 0.454545, 'chromaticity': {'redPrimary': {'x': 0.64, 'y': 0.33}, 'greenPrimary': {'x': 0.3, 'y': 0.6}, 'bluePrimary': {'x': 0.15, 'y': 0.06}, 'whitePrimary': {'x': 0.3127, 'y': 0.329}}, 'matteColor': '#BDBDBDBDBDBD', 'backgroundColor': '#FFFFFFFFFFFF', 'borderColor': '#DFDFDFDFDFDF', 'transparentColor': '#000000000000', 'interlace': 'None', 'intensity': 'Undefined', 'compose': 'Over', 'pageGeometry': {'width': 60, 'height': 60, 'x': 0, 'y': 0}, 'dispose': 'Undefined', 'iterations': 0, 'compression': 'Zip', 'orientation': 'TopLeft', 'properties': {'signature': '347da9cc530cc040b2818b07e399104f8cd8dd42a484eb9524b0ba9970fb8cd2', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}, 'tainted': False, 'filesize': '2256B', 'numberPixels': '3600', 'pixelsPerSecond': '13.5553MB', 'userTime': '0.000u', 'elapsedTime': '0:01.000', 'version': 'ImageMagick 7.1.1-41 Q16-HDRI x86_64 22504 https://imagemagick.org'}}]
E       assert None == 'unspecified'
E        +  where None = <built-in method get of dict object at 0x7f26052c7d00>('tiff:alpha')
E        +    where <built-in method get of dict object at 0x7f26052c7d00> = {'signature': '347da9cc530cc040b2818b07e399104f8cd8dd42a484eb9524b0ba9970fb8cd2', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'}.get
E        +      where {'signature': '347da9cc530cc040b2818b07e399104f8cd8dd42a484eb9524b0ba9970fb8cd2', 'tiff:endian': 'lsb', 'tiff:photometric': 'RGB', 'tiff:rows-per-strip': '60'} = <built-in method get of dict object at 0x7f26052dae00>('properties', {})
E        +        where <built-in method get of dict object at 0x7f26052dae00> = {'backgroundColor': '#FFFFFFFFFFFF', 'baseDepth': 8, 'baseName': 'in.tiff', 'borderColor': '#DFDFDFDFDFDF', ...}.get


https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08310083-python-img2pdf/

For all our attempts to build python-img2pdf with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-img2pdf/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 David Auer 2024-11-25 17:44:08 UTC
Maybe this is due to an update in ImageMagic and not in Python, at least this upstream bug suggests that:
https://gitlab.mister-muffin.de/josch/img2pdf/issues/205

Indeed ImageMagic has a sub-patch (or whatever this fourth part in the version is called) update from .39 to 7.1.1.41 in Rawhide.

https://src.fedoraproject.org/rpms/ImageMagick

Comment 2 Miro Hrončok 2024-11-25 18:00:06 UTC
Indeed, I bumped priority over at https://koschei.fedoraproject.org/package/python-img2pdf?collection=f42 and the build failed.

Comment 3 Aoife Moloney 2025-02-26 13:18:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 4 Fedora Release Engineering 2025-03-30 04:22:13 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 42.
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 2025-01-20).

A week before the mass branching of Fedora 43 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 41 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-43/f-43-key-tasks.html

Comment 5 David Auer 2025-03-31 16:01:51 UTC
Version 0.6.0 builds fine, I just created a PR. I'd apply that to rawhide and f42 but currently I have no access to this package. (I maintain pdfarranger which uses img2pdf.)

Comment 6 Fedora Update System 2025-04-01 10:59:44 UTC
FEDORA-2025-e758382474 (python-img2pdf-0.6.0-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e758382474

Comment 7 Fedora Update System 2025-04-01 13:51:58 UTC
FEDORA-2025-e758382474 (python-img2pdf-0.6.0-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2025-04-01 19:12:06 UTC
FEDORA-2025-8100cdb876 (python-img2pdf-0.6.0-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-8100cdb876

Comment 9 Fedora Update System 2025-04-02 01:13:24 UTC
FEDORA-2025-8100cdb876 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-8100cdb876`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-8100cdb876

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Georg Sauthoff 2025-04-07 12:26:59 UTC
Commenting just to remove the needinfo flag.
I agree that David's new version push fixed this build issue.

Comment 11 Fedora Update System 2025-04-11 18:26:50 UTC
FEDORA-2025-8100cdb876 (python-img2pdf-0.6.0-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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