Bug 2322698 - python-boolean.py fails to build with Python 3.14: TypeError: NotImplemented should not be used in a boolean context
Summary: python-boolean.py fails to build with Python 3.14: TypeError: NotImplemented ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-boolean.py
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2024-10-30 10:19 UTC by Karolina Surma
Modified: 2024-11-12 07:08 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-12 07:08:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github bastikr boolean.py issues 121 0 None open Small incompatibility with Python 3.14 2024-10-30 11:12:04 UTC

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.


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