Bug 2391173

Summary: [f43 freeze exception] python-domdf-python-tools fails to build with Python 3.14: tests/test_words.py::test_alpha_sort - AssertionError: Regex pattern did not match.
Product: [Fedora] Fedora Reporter: Maxwell G <maxwell>
Component: python-domdf-python-toolsAssignee: Maxwell G <maxwell>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 43CC: awilliam, ksurma, maxwell, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedFreezeException
Fixed In Version: python-domdf-python-tools-3.9.0-7.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: 2345519 Environment:
Last Closed: 2025-08-30 18:13:51 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: 2345519    
Bug Blocks: 2339432, 2322407, 2324224, 2373702    

Description Maxwell G 2025-08-26 22:41:15 UTC
+++ This bug was initially created as a clone of Bug #2345519 +++

The original bug will be closed by the rawhide update, so I'm filing a new one to track a freeze exception request.

python-domdf-python-tools fails to build with Python 3.14.05.

_______________________________ test_alpha_sort ________________________________

    def test_alpha_sort():
    	alphabet = f"_{string.ascii_uppercase}{string.ascii_lowercase}0123456789"
    
    	assert alpha_sort(["_hello", "apple", "world"], alphabet) == ["_hello", "apple", "world"]
    	assert alpha_sort(["apple", "_hello", "world"], alphabet) == ["_hello", "apple", "world"]
    	assert alpha_sort(["apple", "_hello", "world"], alphabet, reverse=True) == ["world", "apple", "_hello"]
    
    	with pytest.raises(ValueError, match="The character '☃' was not found in the alphabet."):
>   		alpha_sort(["apple", "_hello", "world", '☃'], alphabet)

tests/test_words.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
domdf_python_tools/words.py:180: in alpha_sort
    raise e
domdf_python_tools/words.py:174: in alpha_sort
    return sorted(iterable, key=lambda attr: [alphabet_.index(letter) for letter in attr], reverse=reverse)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

attr = '☃'

>   return sorted(iterable, key=lambda attr: [alphabet_.index(letter) for letter in attr], reverse=reverse)
E   ValueError: list.index(x): x not in list

domdf_python_tools/words.py:174: ValueError

During handling of the above exception, another exception occurred:

    def test_alpha_sort():
    	alphabet = f"_{string.ascii_uppercase}{string.ascii_lowercase}0123456789"
    
    	assert alpha_sort(["_hello", "apple", "world"], alphabet) == ["_hello", "apple", "world"]
    	assert alpha_sort(["apple", "_hello", "world"], alphabet) == ["_hello", "apple", "world"]
    	assert alpha_sort(["apple", "_hello", "world"], alphabet, reverse=True) == ["world", "apple", "_hello"]
    
>   	with pytest.raises(ValueError, match="The character '☃' was not found in the alphabet."):
E    AssertionError: Regex pattern did not match.
E     Regex: "The character '☃' was not found in the alphabet."
E     Input: 'list.index(x): x not in list'

tests/test_words.py:98: AssertionError

=========================== short test summary info ============================
FAILED tests/test_words.py::test_alpha_sort - AssertionError: Regex pattern did not match.

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/08650993-python-domdf-python-tools/

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

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.

--- Additional comment from Miro Hrončok on 2025-08-26 06:08:43 CDT ---

Hello. This is a bulk comment.

This package still needs to be rebuilt and/or shipped with Python 3.14.0rc2+ bytecode in Fedora 43.

The Beta Freeze of Fedora 43 is scheduled to start today. Please prioritize this bugzilla accordingly.

Thanks.

Comment 1 Fedora Update System 2025-08-26 22:52:56 UTC
FEDORA-2025-3e882d87dd (python-domdf-python-tools-3.9.0-7.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-3e882d87dd

Comment 2 Fedora Update System 2025-08-27 01:00:49 UTC
FEDORA-2025-3e882d87dd has been pushed to the Fedora 43 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-3e882d87dd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-3e882d87dd

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

Comment 3 Adam Williamson 2025-08-28 17:02:16 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/1884 , marking accepted FE.

Comment 4 Fedora Update System 2025-08-30 18:13:51 UTC
FEDORA-2025-3e882d87dd (python-domdf-python-tools-3.9.0-7.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.