hardbyte / hardbyte/python-can

Python 3.7, 3.8, 3.9, or 3.10 as minimal version

Aperta
#1,220 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
Python
Stelle
1.6k
Fork
697
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
This is continued discussion of Python3 at the end of #528 which is about Python2.
I summary pros and cons dicussed in #528 and important features in official What's new in Python 3.X

Python 3.10
___________
Pros:

- Structural Pattern Matching
- Allow writing union types as X | Y
- Parenthesized context managers

Cons:

- Latest Python version, most Linux distros now support now
- No PyPy3.10 release info available

Python 3.9
__________
Pros:
- built-in CAN_RAW_JOIN_FILTERS support
- built-in CAN_J1939 support
- Dictionary Merge & Update Operators
- Supported or built-in in recent released Linux distros
- PEP 585, type hinting generics in standard collections (update)

Cons:
- PyPy3.9 not released, but should be soon, according it's release history.

Python 3.8
__________
Pros:
- Assignment expressions
- f-strings support = for self-documenting expressions and debugging
- Positional-only parameters
- Supported or built-in in most Linux distros
- PyPy3.8 released

Cons:
- Not supported or or built-in in old Linux distros

Python 3.7
__________
Pros:
- built-in CAN_ISOTP support
- The new breakpoint() function.
- Forced UTF-8 Runtime Mode
- Python data model improvements
- New Time Functions With Nanosecond Resolution
- Best compatibility compared with 3.8~3.10

Cons:
- Some popular packages have dropped support 3.7, such as NumPy, IPython. more packages should also drop 3.7 support in furture.
- No CAN_RAW_JOIN_FILTERS & CAN_J1939 intruduced in 3.9 (best features in CAN bus in personally)
- No assignment & f-string self-documenting expressions intruduced in 3.8 (best features in language in personally)
- All new features in 3.7 are included in 3.8~3.10.

__________
Also, asyncio module is almost improved in each main version of Python.

So, in personlly, I prefer Python 3.9 or 3.8 as minimal supported version.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.