rpm/python
Beñat Gartzia 2721a845d3 Support rpmver-py comparison operator inheritance
Although we were able to write python rpm.ver subclasses, we were not
actually able to inherit the comparison operators of the base class:
Trying to compare instances of the subclass would raise a
NotImplementedError.

The reason behind that was the verObject_Check macro checked that an
instance's type was matching rpmver_Type, rather than running a wider
check. Then, that check is applied to each of the operands of a
comparison by the function implementing the tp_richcompare slot
function.

This patch turns the type check into a PyObject_TypeCheck call, which
will also permit subclasses to go through. Then, it adds another test to
cover such behavior.

Signed-off-by: Beñat Gartzia <bgartzia@redhat.com>
2024-01-16 12:25:35 +01:00
..
examples Really handle hardlinks in the rpmunpack python example, doh 2023-06-27 15:19:49 +03:00
rpm Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
CMakeLists.txt Python Stable ABI: Build for Stable ABI, require Python 3.7+ 2023-10-05 13:39:37 +03:00
MANIFEST.in Preliminary distutils support for the python bindings 2011-03-09 15:37:07 +02:00
header-py.c Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
header-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpm.egg-info.in Generate Python egg-info from cmake builds 2022-10-20 14:02:03 +03:00
rpmarchive-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
rpmarchive-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmds-py.c Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmds-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmfd-py.c Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmfd-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmfiles-py.c Eliminate some unnecessary rpmpgp.h includes 2023-10-06 10:59:38 +03:00
rpmfiles-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmii-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
rpmii-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmkeyring-py.c Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmkeyring-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmmacro-py.c In Python 3, return all our string data as surrogate-escaped utf-8 strings 2019-02-22 20:37:20 +02:00
rpmmacro-py.h Lose the empty doxygen markers 2009-09-22 22:42:06 +03:00
rpmmi-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
rpmmi-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmmodule.c Python stable ABI: Avoid initializing the module more than once 2023-10-05 13:39:37 +03:00
rpmps-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
rpmps-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmstrpool-py.c Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmstrpool-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmsystem-py.h Python stable ABI: Define Py_TPFLAGS_IMMUTABLETYPE as no-op if missing 2023-10-05 13:39:37 +03:00
rpmtd-py.c Python stable ABI: Add error handling to Py${container}_SetItem 2023-10-05 13:39:37 +03:00
rpmtd-py.h Drop unused rpmtd python object remnants 2019-05-27 14:08:41 +02:00
rpmte-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
rpmte-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmts-py.c Eliminate some unnecessary rpmpgp.h includes 2023-10-06 10:59:38 +03:00
rpmts-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00
rpmver-py.c Add rpmver-py inequality operator 2024-01-11 12:18:04 +02:00
rpmver-py.h Support rpmver-py comparison operator inheritance 2024-01-16 12:25:35 +01:00
spec-py.c Python stable ABI: Disable instantiation "manually" for some types 2023-10-05 13:39:37 +03:00
spec-py.h Python stable ABI: Adjust type usage & declarations 2023-10-05 13:39:37 +03:00