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

Add more type definitions for SSL module, check with mypy #1313

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

jlaine
Copy link
Contributor

@jlaine jlaine commented Jun 28, 2024

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

@jlaine
Copy link
Contributor Author

jlaine commented Jun 28, 2024

The CI failure should be fixed by #1314

src/OpenSSL/SSL.py Outdated Show resolved Hide resolved
src/OpenSSL/SSL.py Outdated Show resolved Hide resolved
@jlaine jlaine force-pushed the mypy-ssl branch 3 times, most recently from d615cbf to 77f768d Compare June 28, 2024 13:32
pyproject.toml Outdated Show resolved Hide resolved
src/OpenSSL/SSL.py Outdated Show resolved Hide resolved
We want to ensure that from now on, any new public API comes with proper
type definitions.
@jlaine
Copy link
Contributor Author

jlaine commented Jun 28, 2024

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

@jlaine
Copy link
Contributor Author

jlaine commented Jun 28, 2024

@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

@alex
Copy link
Member

alex commented Jun 28, 2024 via email

@jlaine
Copy link
Contributor Author

jlaine commented Jul 7, 2024

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

@alex alex merged commit 01b9b56 into pyca:main Jul 7, 2024
35 checks passed
@jlaine jlaine deleted the mypy-ssl branch July 9, 2024 08:03
@jlaine
Copy link
Contributor Author

jlaine commented Jul 9, 2024

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

@reaperhulk
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

4 participants