Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove overlapping slots from AbstractKey subclasses #189

Closed
wants to merge 1 commit into from

Conversation

ariebovenberg
Copy link
Contributor

Hi there!

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.

$ 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.

@sybrenstuvel
Copy link
Owner

Thanks! This was merged in 3b31182

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jul 24, 2022
## Version 4.9 - release 2022-07-20

- Remove debug logging from `rsa/key.py`
  ([#194](sybrenstuvel/python-rsa#194)).
- Remove overlapping slots in `PrivateKey` and `PublicKey`.
  ([#189](sybrenstuvel/python-rsa#189)).
- Do not include CHANGELOG/LICENSE/README.md in wheel
  ([#191](sybrenstuvel/python-rsa#191)).
- Fixed Key Generation Unittest: Public and Private keys are assigned the wrong way around
  ([#188](sybrenstuvel/python-rsa#188)).
mtremer pushed a commit to ipfire/ipfire-2.x that referenced this pull request Nov 11, 2022
- Updated from version 4.8 to 4.9
- Update of rootfile
- Changelog
    ## Version 4.9 - release 2022-07-20
	- Remove debug logging from `rsa/key.py`
	  ([#194](sybrenstuvel/python-rsa#194)).
	- Remove overlapping slots in `PrivateKey` and `PublicKey`.
	  ([#189](sybrenstuvel/python-rsa#189)).
	- Do not include CHANGELOG/LICENSE/README.md in wheel
	  ([#191](sybrenstuvel/python-rsa#191)).
	- Fixed Key Generation Unittest: Public and Private keys are assigned the wrong way around
	  ([#188](sybrenstuvel/python-rsa#188)).

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants