python / python/cpython

Add structured version info for ssl

Open
#157,513 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.16 extension-modules topic-SSL type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

ssl.OPENSSL_VERSION_INFO is a plain tuple of five integers. The version of the OpenSSL library that the module was built against is available only as the private ssl._OPENSSL_API_VERSION.

Make ssl.OPENSSL_VERSION_INFO a named tuple with fields major, minor, fix, patch and status, and add ssl.OPENSSL_API_VERSION_INFO for the build-time version, a named tuple of the same type. The existing names describe the runtime library, so the naming scheme of gh-117404 cannot be applied to ssl without renaming; "API version" is OpenSSL's own term for the headers the module was compiled with. _OPENSSL_API_VERSION is kept as an alias.

Linked PRs
  • gh-157515

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ssl.OPENSSL_VERSION_INFO and _OPENSSL_API_VERSION entry points, then review linked PR gh-157515 because the work is already under way. Done means the runtime and build-time versions expose the requested named fields while _OPENSSL_API_VERSION remains an alias.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.