Skip to content

Emit missing SSL deprecation warnings - #8418

Merged
youknowone merged 1 commit into
RustPython:mainfrom
kyokuping:codex/fix-ssl-deprecation-warnings
Aug 1, 2026
Merged

Emit missing SSL deprecation warnings#8418
youknowone merged 1 commit into
RustPython:mainfrom
kyokuping:codex/fix-ssl-deprecation-warnings

Conversation

@kyokuping

@kyokuping kyokuping commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: Codex:gpt-5.6-sol

Summary

  • enable test_ssl.test_openssl111_deprecations
  • emit CPython-compatible warnings for deprecated SSL protocols and TLS versions
  • warn when deprecated OP_NO_SSL* and OP_NO_TLS* options are enabled

Summary by CodeRabbit

  • Bug Fixes
    • Added deprecation warnings when using legacy TLS protocol constructors and versions.
    • Added warnings for deprecated protocol options.
    • Continued rejecting unsupported TLS 1.0/1.1 protocols and invalid TLS values.

Assisted-by: Codex:gpt-5.6-sol
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f957bc8-c024-4c0b-9788-1ddc82d65a08

📥 Commits

Reviewing files that changed from the base of the PR and between 04c3ecf and 02a3af0.

⛔ Files ignored due to path filters (1)
  • Lib/test/test_ssl.py is excluded by !Lib/**
📒 Files selected for processing (2)
  • crates/stdlib/src/openssl.rs
  • crates/stdlib/src/ssl.rs

📝 Walkthrough

Walkthrough

The SSL and OpenSSL implementations now emit deprecation warnings for legacy TLS protocols, versions, and disabled-protocol options while preserving existing validation and context configuration.

Changes

TLS deprecation warnings

Layer / File(s) Summary
Centralized warning helpers
crates/stdlib/src/ssl.rs, crates/stdlib/src/openssl.rs
The implementations map deprecated TLS versions to warning messages. OpenSSL imports the warnings support module.
Protocol and option warning integration
crates/stdlib/src/ssl.rs, crates/stdlib/src/openssl.rs
Context construction and version setters emit warnings for deprecated values. OpenSSL also warns when deprecated SSL_OP_NO_* options are enabled. Existing invalid and unsupported protocol handling remains in place.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: youknowone, shaharnaveh, joshuamegnauth54

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding missing SSL deprecation warnings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/ssl.py
[x] test: cpython/Lib/test/test_ssl.py (TODO: 13)

dependencies:

  • ssl

dependent tests: (53 tests)

  • ssl: test_asyncio test_ftplib test_httplib test_httpservers test_imaplib test_logging test_poplib test_ssl test_urllib test_urllib2_localnet test_venv test_xmlrpc
    • asyncio.selector_events: test_asyncio
    • ftplib: test_urllib2
      • urllib.request: test_http_cookiejar test_pathlib test_pydoc test_sax test_site test_urllib2net test_urllibnet
    • http.client: test_docxmlrpc test_hashlib test_ucn test_unicodedata test_wsgiref
      • logging.handlers: test_concurrent_futures test_pkgutil
    • http.server: test_robotparser
      • pydoc: test_enum
    • smtplib: test_smtplib test_smtpnet
    • urllib.request:
      • pathlib: test_ast test_dbm_sqlite3 test_ensurepip test_importlib test_json test_launcher test_pathlib test_peg_generator test_pyrepl test_runpy test_tarfile test_tempfile test_tomllib test_tools test_traceback test_unparse test_winapi test_zipapp test_zipfile test_zoneinfo test_zstd

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@kyokuping
kyokuping marked this pull request as ready for review July 31, 2026 16:15
@youknowone youknowone added the z-ca-2026 Tag to track Contribution Academy 2026 label Aug 1, 2026

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@youknowone
youknowone merged commit 249ae08 into RustPython:main Aug 1, 2026
28 checks passed
@kyokuping
kyokuping deleted the codex/fix-ssl-deprecation-warnings branch August 8, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

z-ca-2026 Tag to track Contribution Academy 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants