python / python/cpython

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

Aperta
#138,634 0 commenti 1 reazione 1 assegnatario Vedi su GitHub

@picnixz ci sta già lavorando.

Dal 8/9/2025.

extension-modules sprint topic-SSL type-refactor
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.