Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.8 #741

Open
rsokl opened this issue Oct 13, 2024 · 0 comments
Open

Drop support for Python 3.8 #741

rsokl opened this issue Oct 13, 2024 · 0 comments

Comments

@rsokl
Copy link
Contributor

rsokl commented Oct 13, 2024

Dropping support for Python 3.8 allows you to take advantage of features and improvements introduced in Python 3.9 and later versions. Here are some key changes and upgrades you can consider:

  1. Type hinting improvements:
    • Use built-in collection types in annotations (e.g., list[int] instead of List[int])
    • Use typing.Annotated for adding context to type hints
  2. Dictionary merge (|) and update (|=) operators:
    • Use dict1 | dict2 to merge dictionaries
    • Use dict1 |= dict2 to update dictionaries
  3. New string methods:
    • str.removeprefix() and str.removesuffix()
  4. New math functions:
    • math.lcm() for least common multiple
    • math.gcd() for greatest common divisor with multiple arguments
  5. New functools features:
    • functools.cache() (simpler @lru_cache)
    • functools.topological_sort()
  6. Improved decorators:
    • Use @dataclass with kw_only=True parameter
  7. Enhanced zoneinfo module for working with time zones
  8. Type hinting generics in standard collections
  9. More precise error messages for attribute and index access
  10. Performance improvements in various areas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant