python / python/cpython

Improve usage of `_setSSLError` in `_ssl.c`

Offen
#138,634 0 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@picnixz arbeitet bereits daran.

Seit 08.9.2025.

extension-modules sprint topic-SSL type-refactor
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Proposal:

Based on https://github.com/python/cpython/pull/137198#discussion_r2282082902, we should refactor _setSSLError as the errcode argument is redundant. In addition, we should:

  • Change _ssl__SSLContext_set_ciphers_impl to use _setSSLError as in _ssl__SSLContext_set_ciphersuites_impl.
  • If possible, ease the use of _setSSLError.
  • If possible, ease how we indicate that a functionality is not implemented and document which exception is being actually raised (this needs to be synchronized with https://github.com/python/cpython/issues/138633).
Has this already been discussed elsewhere?

I have already discussed this feature proposal.

Links to previous discussion of this feature:

[!NOTE]
I will take care of this myself.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.