Bug 2322698

Summary: python-boolean.py fails to build with Python 3.14: TypeError: NotImplemented should not be used in a boolean context
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-boolean.pyAssignee: Lumír Balhar <lbalhar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, lbalhar, maxwell, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-12 07:08:55 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: 2322407    

Description Karolina Surma 2024-10-30 10:19:15 UTC
python-boolean.py fails to build with Python 3.14.0a1.

_________________________ DualBaseTestCase.test_order __________________________

self = <boolean.test_boolean.DualBaseTestCase testMethod=test_order>

    def test_order(self):
        algebra = BooleanAlgebra()
        x, y, z = algebra.Symbol(1), algebra.Symbol(2), algebra.Symbol(3)
        assert algebra.AND(x, y) < algebra.AND(x, y, z)
        assert not algebra.AND(x, y) > algebra.AND(x, y, z)
        assert algebra.AND(x, y) < algebra.AND(x, z)
        assert not algebra.AND(x, y) > algebra.AND(x, z)
        assert algebra.AND(x, y) < algebra.AND(y, z)
        assert not algebra.AND(x, y) > algebra.AND(y, z)
>       assert not algebra.AND(x, y) < algebra.AND(x, y)

boolean/test_boolean.py:1046: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = AND(Symbol(1), Symbol(2)), other = AND(Symbol(1), Symbol(2))

    def __gt__(self, other):
        lt = other.__lt__(self)
        if lt is NotImplemented:
>           return not self.__lt__(other)
E           TypeError: NotImplemented should not be used in a boolean context

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

Using NotImplemented in a boolean context will now raise a TypeError. It had previously raised a DeprecationWarning since Python 3.9. (Contributed by Jelle Zijlstra in gh-118767.)


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

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

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.