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 x509 ABCs #11437

Open
7 of 8 tasks
alex opened this issue Aug 15, 2024 · 5 comments
Open
7 of 8 tasks

Remove x509 ABCs #11437

alex opened this issue Aug 15, 2024 · 5 comments

Comments

@alex
Copy link
Member

alex commented Aug 15, 2024

In numerous places we only support the concrete classes, and there's no real use case for people to implement the ABCs themselves.

Therefore, we should just drop the ABCs, and replace them with the concrete base classes.

Tasks

@alex alex added the x509 label Aug 15, 2024
@alex alex added this to the Forty Fourth Release milestone Aug 15, 2024
@TreavVasu
Copy link

Hi @alex
Is this up for taking?

How I plan to implement this:

Taking Certificate class as an example :

Link to class

class Certificate(metaclass=abc.ABCMeta):

Removing (metaclass=abc.ABCMeta) and adding it as new-style class
class Certificate:

Addressing the changes further:

Remove @abc.abstractmethod Decorators

then

Remove @abc.abstractproperty with @property

then
Retain Property Decorators (@Property) Where Needed

I am bit confused on how to Implement methods and properties here should return as here of find the linked function it sounds a bit ddumb I know but I think with little direction I can pull this off.

Let me know if I am missing something or wrong somewhere, I'll try to cover those cases again and revert back
Thanks for reading

@alex
Copy link
Member Author

alex commented Oct 18, 2024

We'd be happy to take contributions for this yes!

In terms of what needs to be done: These classes need to be deleted, and the concrete implementations should be exposed with the same name, and then we have to make sure the mypy types work correctly for them.

(With teh small asterisk that RevokedCertificate is more complicated, and should be saved for last.)

@TreavVasu
Copy link

Thanks @alex
I'll try my best

Sure, I hope you can help me on places where RevokedCertificate gets too complex :)

@alex
Copy link
Member Author

alex commented Oct 18, 2024 via email

@TreavVasu
Copy link

Thanks I was about to ask for this too.
U saved me here XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants