GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update ssl from v3.14.3 and add _ssl.HAS_PHA by youknowone · Pull Request #7283 · RustPython/RustPython

Conversation

@youknowone

@youknowone youknowone commented Mar 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

close #7219
fix #7228

Summary by CodeRabbit

  • New Features

    • Added a new constant to indicate Post-Handshake Authentication (PHA) support in the SSL module.
  • Bug Fixes

    • Improved error handling in SSL options configuration to provide clearer validation when invalid option values are supplied.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowone
Add missing HAS_PHA constant to _ssl module
28299e3
@coderabbitai

coderabbitai Bot commented Mar 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 919a146 and 3e3165b.

⛔ Files ignored due to path filters (23)
  • Lib/ssl.py is excluded by !Lib/**
  • Lib/test/certdata/allsans.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/capath/b1930218.0 is excluded by !Lib/**
  • Lib/test/certdata/capath/ceff1710.0 is excluded by !Lib/**
  • Lib/test/certdata/cert3.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/idnsans.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycert.passwd.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycert.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycert.pem.reference is excluded by !Lib/**
  • Lib/test/certdata/keycert2.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycert3.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycert4.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/keycertecc.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/make_ssl_certs.py is excluded by !Lib/**
  • Lib/test/certdata/nosan.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/pycacert.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/pycakey.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/revocation.crl is excluded by !Lib/**
  • Lib/test/certdata/ssl_cert.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/ssl_key.passwd.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/certdata/ssl_key.pem is excluded by !**/*.pem, !Lib/**
  • Lib/test/ssl_servers.py is excluded by !Lib/**
  • 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 changes add a new HAS_PHA (Post-Handshake Auth) constant to the _ssl module and refactor the PySslContext.set_options method to accept a signed integer with validation ensuring non-negative values, replacing the previous unsigned long parameter.

Changes

Cohort / File(s) Summary
HAS_PHA constant additions
crates/stdlib/src/openssl.rs, crates/stdlib/src/ssl.rs
Added new public HAS_PHA boolean attribute to _ssl module. In openssl.rs, conditionally set to cfg!(ossl111) for OpenSSL 1.1.1+ support; in ssl.rs, set to false by default.
set_options method refactoring
crates/stdlib/src/openssl.rs, crates/stdlib/src/ssl.rs
Updated PySslContext.set_options signature from (&self, libc::c_ulong) to (&self, i64, &VirtualMachine) -> PyResult<()> with added validation rejecting negative option values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Implement more SSL methods #6210: Adds OpenSSL 1.1.1–related feature flags and extends PySslContext functionality alongside HAS_PHA and set_options modifications in the same _ssl module surface.

Suggested reviewers

  • coolreader18
  • ShaharNaveh

Poem

🐰 A hop and a skip through SSL updates bright,
With HAS_PHA flags shining in the light,
Options now validated, no negatives allowed,
OpenSSL 1.1.1 support—we're quite proud! ✨

🚥 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 accurately summarizes the main changes: updating ssl library from CPython v3.14.3 and adding the _ssl.HAS_PHA constant, matching the PR objectives.
Linked Issues check ✅ Passed The PR addresses issue #7219 requirements: adds HAS_PHA constant, updates ssl to v3.14.3, and fixes set_options validation for negative values as intended.
Out of Scope Changes check ✅ Passed All changes relate directly to SSL module updates and HAS_PHA constant addition. No extraneous modifications detected outside the stated objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Mar 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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: 14)

dependencies:

  • ssl

dependent tests: (49 tests)

  • ssl: test_asyncio test_ftplib test_httplib test_httpservers test_imaplib test_logging 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_launcher test_pathlib test_runpy test_tarfile test_tempfile test_tomllib test_tools test_traceback test_unparse test_winapi test_zipapp test_zipfile test_zoneinfo test_zstd

[x] lib: cpython/Lib/hmac.py
[ ] test: cpython/Lib/test/test_hmac.py (TODO: 14)

dependencies:

  • hmac

dependent tests: (9 tests)

  • hmac: test_hmac test_smtplib
    • imaplib: test_imaplib
    • multiprocessing.connection:
      • concurrent.futures.process: test_compileall test_concurrent_futures
    • secrets: test_secrets
    • smtplib: test_smtpnet
      • logging.handlers: test_logging test_pkgutil

[x] lib: cpython/Lib/importlib
[ ] test: cpython/Lib/test/test_importlib (TODO: 16)

dependencies:

  • importlib

dependent tests: (111 tests)

  • importlib: test_bdb test_cmd_line_script test_codecs test_compileall test_ctypes test_doctest test_frozen test_hashlib test_importlib test_inspect test_linecache test_multiprocessing_main_handling test_pkgutil test_py_compile test_pyclbr test_pydoc test_reprlib test_runpy test_sundry test_support test_tomllib test_unittest test_zipfile test_zipimport test_zoneinfo
    • ctypes.util: test_ctypes
    • ensurepip: test_ensurepip test_venv
    • inspect: test_abc test_argparse test_asyncgen test_buffer test_builtin test_code test_collections test_coroutines test_decimal test_enum test_functools test_generators test_grammar test_monitoring test_ntpath test_operator test_patma test_posixpath test_signal test_sqlite3 test_traceback test_type_annotations test_types test_typing test_unittest test_yield_from
      • ast: test_ast test_compile test_compiler_codegen test_dis test_fstring test_future_stmt test_site test_ssl test_type_comments test_ucn test_unparse
      • asyncio: test_asyncio test_contextlib_async test_logging test_os test_sys_settrace test_unittest
      • cmd: test_cmd
      • dataclasses: test__colorize test_copy test_ctypes test_genericalias test_pprint test_regrtest
      • rlcompleter: test_rlcompleter
      • trace: test_trace
      • xmlrpc.server: test_docxmlrpc test_xmlrpc
    • py_compile: test_importlib
      • zipfile: test_shutil test_zipapp test_zipfile test_zipfile64
    • sysconfig: test_c_locale_coercion test_dtrace test_gc test_launcher test_osx_env test_posix test_pyexpat test_subprocess test_sys test_sysconfig test_time test_tools test_urllib2net
    • zipfile:
      • shutil: test_bz2 test_filecmp test_glob test_httpservers test_largefile test_sax test_string_literals test_tarfile test_tempfile test_unicode_file
    • zipimport: test_importlib

[ ] test: cpython/Lib/test/test_set.py (TODO: 5)

dependencies:

dependent tests: (no tests depend on set)

Legend:

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

CPython Developers and others added 2 commits March 1, 2026 11:36
CPython Developers @youknowone
Update ssl from v3.14.3
4d0f52a
@youknowone
Fix ssl options setter to raise ValueError for negative values and ma…
c29b96d
…rk still-failing tests
@youknowone
youknowone force-pushed the ssl branch from 57597dc to c29b96d Compare March 1, 2026 02:37
@github-actions
Auto-format: cargo fmt --all
3e3165b
@github-actions

github-actions Bot commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Code has been automatically formatted

The code in this PR has been formatted using:

  • cargo fmt --all
    Please pull the latest changes before pushing again:
git pull origin ssl
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone marked this pull request as ready for review March 1, 2026 04:22
@youknowone
youknowone merged commit e4938cf into RustPython:main Mar 1, 2026
23 of 25 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone deleted the ssl branch March 1, 2026 05:49
youknowone added a commit to youknowone/RustPython that referenced this pull request Mar 22, 2026
@youknowone
Merge pull request RustPython#7283 from youknowone/ssl
38c18b8
Update ssl from v3.14.3 and add _ssl.HAS_PHA
youknowone added a commit that referenced this pull request Sep 16, 2026
@youknowone
Merge pull request #7283 from youknowone/ssl
562d2ca
Update ssl from v3.14.3 and add _ssl.HAS_PHA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Upgrading ssl break pip

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@youknowone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.