Sitelet https://github.com/python/typeshed/pull/13493
Skip to content

remove pyOpenSSL stubs - #13493

Merged
srittau merged 1 commit into
python:mainfrom
ashm-dev:feature-12392
Feb 12, 2025
Merged

srittau merged 1 commit into
python:mainfrom
ashm-dev:feature-12392

Conversation

@ashm-dev

Copy link
Copy Markdown
Contributor

Closes #12392

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

urllib3 (https://github.com/urllib3/urllib3)
- src/urllib3/contrib/pyopenssl.py:43: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:64: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:322: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:326: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:353: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:392: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:392: error: Incompatible return value type (got "X509 | None", expected "dict[str, list[Any]] | None")  [return-value]
- src/urllib3/contrib/pyopenssl.py:392: note: Error code "return-value" not covered by "type: ignore" comment
- src/urllib3/contrib/pyopenssl.py:395: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:395: error: Incompatible return value type (got "bytes", expected "dict[str, list[Any]] | None")  [return-value]
- src/urllib3/contrib/pyopenssl.py:395: note: Error code "return-value" not covered by "type: ignore" comment
- src/urllib3/contrib/pyopenssl.py:403: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:466: error: Argument 1 to "load_verify_locations" of "Context" has incompatible type "BytesIO"; expected "str | None"  [arg-type]
- src/urllib3/contrib/pyopenssl.py:488: error: Unused "type: ignore" comment  [unused-ignore]
- src/urllib3/contrib/pyopenssl.py:488: error: Argument 1 to "set_alpn_protos" of "Context" has incompatible type "list[bytes | str]"; expected "Sequence[bytes]"  [arg-type]
- src/urllib3/contrib/pyopenssl.py:488: note: Error code "arg-type" not covered by "type: ignore" comment
- test/contrib/test_pyopenssl.py:10: error: Unused "type: ignore" comment  [unused-ignore]
- test/contrib/test_pyopenssl.py:99: error: Argument 2 to "load_certificate" has incompatible type "str"; expected "bytes"  [arg-type]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/certs.py:16: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/certs.py:412: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:415: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:416: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:417: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:419: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:420: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:421: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/certs.py:423: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/net/tls.py:13: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/net/tls.py:15: error: Library stubs not installed for "OpenSSL.crypto"  [import-untyped]
+ mitmproxy/net/tls.py:36: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/net/tls.py:134: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/net/tls.py:135: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/net/tls.py:261: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/net/tls.py:262: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/utils/debug.py:13: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/tls.py:5: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/proxy/layers/tls.py:11: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/proxy/layers/tls.py:243: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/proxy/layers/tls.py:318: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/proxy/layers/tls.py:319: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/proxy/layers/tls.py:320: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/proxy/layers/quic/_stream_layers.py:588: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/proxy/server.py:23: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/addons/tlsconfig.py:13: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ mitmproxy/addons/tlsconfig.py:13: note: Hint: "python3 -m pip install types-pyOpenSSL"
+ mitmproxy/addons/tlsconfig.py:13: note: (or run "mypy --install-types" to install all missing stub packages)
+ mitmproxy/addons/tlsconfig.py:13: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ mitmproxy/addons/tlsconfig.py:80: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:81: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:352: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:356: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:363: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:366: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:370: error: Unused "type: ignore" comment  [unused-ignore]
+ mitmproxy/addons/tlsconfig.py:371: error: Unused "type: ignore" comment  [unused-ignore]

aiortc (https://github.com/aiortc/aiortc)
+ src/aiortc/rtcdtlstransport.py:16: error: Library stubs not installed for "OpenSSL"  [import-untyped]
+ src/aiortc/rtcdtlstransport.py:16: note: Hint: "python3 -m pip install types-pyOpenSSL"
+ src/aiortc/rtcdtlstransport.py:16: note: (or run "mypy --install-types" to install all missing stub packages)
+ src/aiortc/rtcdtlstransport.py:16: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
- src/aiortc/rtcdtlstransport.py:190: error: Argument 1 to "from_cryptography_key" of "PKey" has incompatible type "EllipticCurvePrivateKey"; expected "DSAPrivateKey | DSAPublicKey | RSAPrivateKey | RSAPublicKey"  [arg-type]
- src/aiortc/rtcdtlstransport.py:476: error: Argument 1 to "get_key_and_salt" of "SRTPProtectionProfile" has incompatible type "buffer"; expected "bytes"  [arg-type]
- src/aiortc/rtcdtlstransport.py:477: error: Argument 1 to "get_key_and_salt" of "SRTPProtectionProfile" has incompatible type "buffer"; expected "bytes"  [arg-type]
- src/aiortc/rtcdtlstransport.py:479: error: Argument 1 to "get_key_and_salt" of "SRTPProtectionProfile" has incompatible type "buffer"; expected "bytes"  [arg-type]
- src/aiortc/rtcdtlstransport.py:480: error: Argument 1 to "get_key_and_salt" of "SRTPProtectionProfile" has incompatible type "buffer"; expected "bytes"  [arg-type]

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau
srittau merged commit a410f25 into python:main Feb 12, 2025
@ashm-dev
ashm-dev deleted the feature-12392 branch February 12, 2025 09:43
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.

Remove pyOpenSSL (not before February 2025)

2 participants