-m trace --count missing lines
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 36k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Bug report
Bug description:
def x() -> tuple[
int,
]:
return (1, 'fred')
x()
python 3.13 (good):
xju@xjutv:~/tmp$ python3 --version
Python 3.13.1
xju@xjutv:~/tmp$ rm -f xxx.cover
xju@xjutv:~/tmp$ python3 -m trace --count -m xxx.py
xju@xjutv:~/tmp$ cat xxx.cover
2: def x() -> tuple[
1: int,
]:
1: return (1, 'fred')
1: x()
python 3.14 (bad):
xju@xjutv:~/tmp$ python3 --version
Python 3.14.2
xju@xjutv:~/tmp$ rm -f xxx.cover
xju@xjutv:~/tmp$ python3 -m trace --count -m xxx.py
xju@xjutv:~/tmp$ cat xxx.cover
1: def x() -> tuple[
>>>>>> int,
]:
1: return (1, 'fred')
1: x()
... trace._get_executable_linenos returns the same in both 3.13 and 3.14; seems that Trace.run does not see that the type hint is "executed"? Could equally have trace._get_executable_linenos not report the type hint... they just need to agree.
Above is about the simplest example I came up with, but similar disagreement with class attribute hints like:
class X:
a: int
... a: int is reported as "not covered".
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
- gh-143161
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza a discrepância com o snippet Python e compare a saída de coverage do 3.13 e do 3.14. Inspecione trace.Trace.run e trace._get_executable_linenos, que o relatório identifica como discordando sobre anotações executadas. Considera-se concluído quando ambos os caminhos concordarem e as linhas com type hints, incluindo hints de atributos de classe, receberem resultados de coverage consistentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- tooling
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 25/100