Fedora Account System
Red Hat Associate
Red Hat Customer
ocrmypdf fails to build with Python 3.15.0a8. _________________ test_xml_metadata_preserved[3small.pdf-pdfa] _________________ [gw0] linux -- Python 3.15.0 /usr/bin/python3 libxmp_file_to_dict = <function file_to_dict at 0x7fc5f8c1d430> test_file = '3small.pdf', output_type = 'pdfa' resources = PosixPath('/builddir/build/BUILD/ocrmypdf-16.12.0-build/ocrmypdf-16.12.0/tests/resources') outpdf = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/popen-gw0/test_xml_metadata_preserved_3s0/out.pdf') @pytest.mark.parametrize( 'test_file,output_type', [ ('graph.pdf', 'pdf'), # PDF with full metadata ('graph.pdf', 'pdfa'), # PDF/A with full metadata ('overlay.pdf', 'pdfa'), # /Title() ('3small.pdf', 'pdfa'), ], ) def test_xml_metadata_preserved( libxmp_file_to_dict, test_file, output_type, resources, outpdf ): input_file = resources / test_file before = libxmp_file_to_dict(str(input_file)) check_ocrmypdf( input_file, outpdf, '--output-type', output_type, '--skip-text', '--plugin', 'tests/plugins/tesseract_noop.py', ) after = libxmp_file_to_dict(str(outpdf)) equal_properties = [ 'dc:contributor', 'dc:coverage', 'dc:creator', 'dc:description', 'dc:format', 'dc:identifier', 'dc:language', 'dc:publisher', 'dc:relation', 'dc:rights', 'dc:source', 'dc:subject', 'dc:title', 'dc:type', 'pdf:keywords', ] acquired_properties = ['dc:format'] # Cleanup messy data structure # Top level is key-value mapping of namespaces to keys under namespace, # so we put everything in the same namespace def unify_namespaces(xmpdict): for entries in xmpdict.values(): yield from entries # Now we have a list of (key, value, {infodict}). We don't care about # infodict. Just flatten to keys and values def keyval_from_tuple(list_of_tuples): for k, v, *_ in list_of_tuples: yield k, v before = dict(keyval_from_tuple(unify_namespaces(before))) after = dict(keyval_from_tuple(unify_namespaces(after))) for prop in equal_properties: if prop in before: assert prop in after, f'{prop} dropped from xmp' assert before[prop] == after[prop] # libxmp presents multivalued entries (e.g. dc:title) as: # 'dc:title': '' <- there's a title # 'dc:title[1]: 'The Title' <- the actual title # 'dc:title[1]/?xml:lang': 'x-default' <- language info propidx = f'{prop}[1]' if propidx in before: assert ( after.get(propidx) == before[propidx] or after.get(prop) == before[propidx] ) if prop in after and prop not in before: > assert prop in acquired_properties, ( f"acquired unexpected property {prop} with value " f"{after.get(propidx) or after.get(prop)}" ) E AssertionError: acquired unexpected property dc:title with value 'Untitled' E assert 'dc:title' in ['dc:format'] https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10318578-ocrmypdf/ For all our attempts to build ocrmypdf with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/ocrmypdf/ 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.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. 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.
*** Bug 2485727 has been marked as a duplicate of this bug. ***
Hello, Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues This package fails to install and maintainers are advised to take one of the following actions: - Fix this bug and close this bugzilla once the update makes it to the repository. (The same script that posted this comment will eventually close this bugzilla when the fixed package reaches the repository, so you don't have to worry about it.) or - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet. or - Orphan the package if you no longer plan to maintain it. If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue. This package may be orphaned in 7+ weeks. This is the first reminder (step 3) from the policy. Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.
Hello, Please note that this comment was generated automatically by https://forge.fedoraproject.org/releng/tooling/src/branch/main/release-process/bug-filing/follow-policy/follow_policy.py If you feel that this output has mistakes, please open an issue at https://forge.fedoraproject.org/releng/tickets/issues This package fails to install and maintainers are advised to take one of the following actions: - Fix this bug and close this bugzilla once the update makes it to the repository. (The same script that posted this comment will eventually close this bugzilla when the fixed package reaches the repository, so you don't have to worry about it.) or - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet. or - Orphan the package if you no longer plan to maintain it. If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue. This package may be orphaned in 4+ weeks. This is the second reminder (step 4) from the policy. Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.
This package has been orphaned. You can pick it up at https://src.fedoraproject.org/rpms/ocrmypdf by clicking button "Take". If nobody picks it up, it will be retired and removed from a distribution.