python / python/cpython

Split up _testcapimodule.c

Aperta
#93,649 38 commenti 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

tests topic-C-API type-refactor
Lingua principale
Python
Stelle
77.2k
Fork
36k
Merge medio
1g 9h
PR unite (30g)
558

Descrizione

Modules/_testcapimodule.c is a nearly-8000-line behemoth with no clear structure or organization. It is getting hard to maintain.

It also doesn't work well with testing (a) feature macros that affect Python.h and (b) module initialization, so we have additional C-API testing modules: _testmultiphase, _testimportmultiple, _testinternalcapi.
_testbuffer is already split out, but there are many other aspects of the API that would use a similar dedicated test suite.

We should split and combine these, ideally without polluting the namespace of top-level modules.

  • PR: gh-94549
  • PR: gh-94695
  • PR: gh-94702
  • PR: gh-95386
  • PR: gh-95793
  • PR: gh-95819
  • PR: gh-99346
  • PR: gh-99494
  • PR: gh-99517
  • PR: gh-99532
  • PR: gh-99549
  • PR: gh-99551
  • PR: gh-102173
  • PR: gh-104403
  • PR: gh-129400
  • PR: gh-129512
  • PR: gh-129516
  • PR: gh-129521
  • PR: gh-129544

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.

Direzione di ricerca

Inizia esaminando Modules/_testcapimodule.c e i moduli esistenti _testmultiphase, _testimportmultiple, _testinternalcapi e _testbuffer, quindi esamina le PR collegate elencate nell’issue. Il lavoro è completato quando i test della C-API sono suddivisi in moduli coerenti, la copertura di test rilevante è preservata e si evita l’inquinamento del namespace dei moduli di primo livello.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, python
Ambito
testing-qa
Tipo di issue
Refactoring
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.