Compare commits

...

1 Commits
i9cf ... i10ce

@ -0,0 +1,60 @@
From d4d12173f6b90e346bfe6a21bb95d6ba2a9dd73b Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Mon, 11 Nov 2024 14:12:13 +0100
Subject: [PATCH 1/2] Workaround incompatibility with Python 3.14
Using NotImplemented in a boolean context will now raise
a TypeError. It had previously raised a DeprecationWarning since
Python 3.9.
Fixes: https://github.com/bastikr/boolean.py/issues/121
---
boolean/boolean.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/boolean/boolean.py b/boolean/boolean.py
index eeffbc4..8685d4e 100644
--- a/boolean/boolean.py
+++ b/boolean/boolean.py
@@ -866,7 +866,12 @@ def __lt__(self, other):
def __gt__(self, other):
lt = other.__lt__(self)
if lt is NotImplemented:
- return not self.__lt__(other)
+ self_lt = self.__lt__(other)
+ if type(self_lt) is type(NotImplemented):
+ # `return not NotImplemented`` no longer works in Python 3.14
+ return False
+ else:
+ return not self_lt
return lt
def __and__(self, other):
From e43539f421f0da674b491f769aa678dc42d8f87b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?=
<frenzy.madness@gmail.com>
Date: Mon, 11 Nov 2024 16:15:18 +0100
Subject: [PATCH 2/2] Update boolean/boolean.py
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
---
boolean/boolean.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boolean/boolean.py b/boolean/boolean.py
index 8685d4e..cd4bdbe 100644
--- a/boolean/boolean.py
+++ b/boolean/boolean.py
@@ -867,7 +867,7 @@ def __gt__(self, other):
lt = other.__lt__(self)
if lt is NotImplemented:
self_lt = self.__lt__(other)
- if type(self_lt) is type(NotImplemented):
+ if self_lt is NotImplemented:
# `return not NotImplemented`` no longer works in Python 3.14
return False
else:

@ -1,3 +0,0 @@
# python-boolean.py
The python-boolean.py package

@ -1,16 +1,34 @@
## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 12;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global pypi_name boolean.py
Name: python-%{pypi_name}
Version: 4.0
Release: 4%{?dist}
Release: %autorelease
Summary: Define boolean algebras, and create and parse boolean expressions
License: BSD
# Automatically converted from old format: BSD - review is highly recommended.
License: LicenseRef-Callaway-BSD
URL: https://github.com/bastikr/boolean.py
Source0: %pypi_source
Patch: https://github.com/bastikr/boolean.py/pull/122.patch
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: %{py3_dist Sphinx}
BuildRequires: %{py3_dist pytest}
%global _description \
"boolean.py" is a small library implementing a boolean algebra. It defines\
two base elements, TRUE and FALSE, and a Symbol class that can take on one of\
@ -23,16 +41,13 @@ AND or and NOT. Expressions are constructed from parsed strings or in Python.
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: %{py3_dist Sphinx}
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
Python 3 version.
%prep
%autosetup -n %{pypi_name}-%{version}
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%py3_build
@ -43,7 +58,7 @@ rm -rf html/.{doctrees,buildinfo}
%py3_install
%check
%{__python3} setup.py test
%pytest
%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE.txt
@ -52,8 +67,30 @@ rm -rf html/.{doctrees,buildinfo}
%{python3_sitelib}/boolean/
%changelog
* Thu Jul 18 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 4.0-4
- Rebuilt for MSVSphere 9.4
* Fri Jan 10 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 4.0-12
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Mon Nov 11 2024 Lumir Balhar <lbalhar@redhat.com> - 4.0-12
- Fix incompatibility with Python 3.14
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 4.0-11
- convert license to SPDX
* Wed Aug 14 2024 Lumir Balhar <lbalhar@redhat.com> - 4.0-10
- Drop obsoleted setup.py test
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.0-7
- Rebuilt for Python 3.13
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
@ -105,3 +142,5 @@ rm -rf html/.{doctrees,buildinfo}
* Thu Aug 08 2019 Carmen Bianca Bakker <carmenbianca@fedoraproject.org> - 3.6-1
- New package.
## END: Generated by rpmautospec

Loading…
Cancel
Save