-m trace --count missing lines
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre la discrepanza con lo snippet Python e confrontare l’output di coverage di 3.13 e 3.14. Esaminare trace.Trace.run e trace._get_executable_linenos, che il report identifica come non concordi riguardo alle annotazioni eseguite. Il lavoro è completato quando entrambi i percorsi concordano e le righe con type hint, incluse quelle con hint per gli attributi di classe, ricevono risultati di coverage coerenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100