hardbyte / hardbyte/python-can

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

Đang mở
#1,220 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.