pyopenssl icon indicating copy to clipboard operation
pyopenssl copied to clipboard

Add more type definitions for `SSL` module, check with mypy

Open jlaine opened this issue 1 year ago • 4 comments

We want to ensure that from now on, any public API comes with proper type definitions.

jlaine avatar Jun 28 '24 12:06 jlaine

The CI failure should be fixed by #1314

jlaine avatar Jun 28 '24 12:06 jlaine

Not sure why readthedocs is still marked "in progress", the build seems complete.

jlaine avatar Jun 28 '24 14:06 jlaine

@alex Would you like an additional commit which strips out the now-redundant :rtype ?

The type definitions are being correctly extract to the docs, see:

https://pyopenssl--1313.org.readthedocs.build/en/1313/api/ssl.html

jlaine avatar Jun 28 '24 14:06 jlaine

Let's hold that for a separate PR. The more moving pieces, the harder to review.

On Fri, Jun 28, 2024 at 10:38 AM Jeremy Lainé @.***> wrote:

@alex https://github.com/alex Would you like an additional commit which strips out the now-redundant :rtype ?

The type definitions are being correctly extract to the docs, see:

https://pyopenssl--1313.org.readthedocs.build/en/1313/api/ssl.html

— Reply to this email directly, view it on GitHub https://github.com/pyca/pyopenssl/pull/1313#issuecomment-2197091119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBBULMXUE5UEON6O543ZJVYO5AVCNFSM6AAAAABKBY3ZISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGA4TCMJRHE . You are receiving this because you were mentioned.Message ID: @.***>

-- All that is necessary for evil to succeed is for good people to do nothing.

alex avatar Jun 28 '24 14:06 alex

Is there anything more (or less) I can do for this PR ?

jlaine avatar Jul 07 '24 09:07 jlaine

Thank you @alex!

Do you think it would be possible to slate a release for the near future? We now have a consistent story regarding type hints:

  • downstream projects can do a minor version update of pyOpenSSL and get full type checking
  • types-pyOpenSSL can be retired

jlaine avatar Jul 09 '24 08:07 jlaine

We intend to release a new cryptography soon and we'll do a pyOpenSSL release alongside that (since we need to update version bounds for pyOpenSSL anyway).

reaperhulk avatar Jul 09 '24 16:07 reaperhulk