New error behaviour when calling `flush_tx_buffer` for several interface types
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 68/100
Direzione di ricerca
Inizia con la classe BusABC e il comportamento di flush_tx_buffer() introdotto da PR #1724; riproduci l'eccezione usando un'interfaccia come socketcan. Verifica che le interfacce non supportate tornino al comportamento no-op precedente senza modificare le interfacce che implementano lo svuotamento, quindi verifica che la riproduzione non generi più un'eccezione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Due to the addition of raise NotImplementedError in the BusABC class introduced with https://github.com/hardbyte/python-can/pull/1724 by @zariiii9003, trying to call flush_tx_buffer() throws an exception when called for any interface type that doesn't explicitly implement this.
There are several interface types in python-can which don't, including e.g. socketcan.
This breaks other tools which relied on the previous behaviour of "doing nothing" when flush_tx_buffer() was called on one of these interfaces.
To Reproduce
Call flush_tx_buffer() on an interface type that doesn't explicitly implement this method.
I noticed this because the tool pydronecan no longer works for socketcan if python-can is installed on the system.
Expected behavior
I expect the old behaviour where flushing does nothing. This can easily be done by removing the raise line, or more complicated, by implementing flush_tx_buffer() with a pass for all interface types in this repo where flushing is irrelevant.
If behavour was like this from the beginning, I would be OK with raising error. However, I think it's problematic when previous versions didn't behave like this, causing problems for tools like pydronecan. The behaviour of interfaces like this should be kept stable.
Additional context
This problem exists for every version after the PR linked above was merged. All releases after 4.4.0 are affected.
- Lingua principale
- Python
- Stelle
- 1.6k
- Fork
- 697
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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.
Altre issue di hardbyte/python-can
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
hardbyte/python-can#2077 · 1 commento · 1 reazione ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
hardbyte/python-can#2102 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
hardbyte/python-can#2092 ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
hardbyte/python-can#2091 ·
-
`BitTiming.from_sample_point` rejects valid timing solutions due to hardcoded register limits Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
hardbyte/python-can#2083 ·
Tutte le issue di hardbyte/python-can
Issue simili
-
bug ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
documentation
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
inmanta/inmanta-core#10835 ·
-
sponsored
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Diaoul/subliminal#1382 ·