Skip to content

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

@keelung-yang

Description

@keelung-yang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions