summaryrefslogtreecommitdiff
path: root/tests/test_compat.py
diff options
context:
space:
mode:
authorArie Bovenberg <a.c.bovenberg@gmail.com>2022-01-22 10:10:11 +0100
committerSybren A. Stüvel <sybren@stuvel.eu>2022-03-13 12:05:41 +0100
commit3b31182ed21415503e1950dff2be998e9852382b (patch)
tree1636194755b01fe86c4904f900ddaa1aa8e3eb6e /tests/test_compat.py
parent6391b1a03682c3493ea69c5a9698277ba9d53a9c (diff)
downloadrsa-git-3b31182ed21415503e1950dff2be998e9852382b.tar.gz
Remove overlapping slots from AbstractKey subclasses
`PublicKey` and `PrivateKey` both define the `n` and `e` slots, which are already present in their base class. This reduces the benefits of having slots. ```shell $ slotscheck -m rsa -v ERROR: 'rsa.key:PrivateKey' defines overlapping slots. - e (rsa.key:AbstractKey) - n (rsa.key:AbstractKey) ERROR: 'rsa.key:PublicKey' defines overlapping slots. - e (rsa.key:AbstractKey) - n (rsa.key:AbstractKey) ``` The Python docs say: > If a class defines a slot also defined in a base class, the instance > variable defined by the base class slot is inaccessible (except by > retrieving its descriptor directly from the base class). This renders > the meaning of the program undefined.
Diffstat (limited to 'tests/test_compat.py')
0 files changed, 0 insertions, 0 deletions