hardbyte / hardbyte/python-can

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

オープン
#1,220 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
Python
スター
1.6k
フォーク
697
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。