python / python/cpython

Split up _testcapimodule.c

Aberta
#93,649 38 comentários 4 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

tests topic-C-API type-refactor
Linguagem predominante
Python
Estrelas
77.2k
Forks
36k
Merge médio
1d 9h
PRs com merge (30d)
558

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece revisando Modules/_testcapimodule.c e os módulos existentes _testmultiphase, _testimportmultiple, _testinternalcapi e _testbuffer; em seguida, examine os PRs vinculados listados na issue. O trabalho estará concluído quando os testes da C-API estiverem divididos em módulos coerentes, a cobertura de testes relevante for preservada e a poluição do namespace dos módulos de nível superior for evitada.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
c, python
Domínio
testing-qa
Tipo de issue
Refatoração
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
20/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.