BstLabs / py-dynacli

DynaCLI is a cloud-friendly Python library for converting pure Python functions into Linux Shell commands.
https://bstlabs.github.io/py-dynacli/
MIT License
98 stars 5 forks source link

Changing supported Python versions #80

Closed ShahriyarR closed 2 years ago

ShahriyarR commented 2 years ago

Change Summary

Description

Fixes #75

Type of change

Please delete options that are not relevant.

ShahriyarR commented 2 years ago

@asterkin PTAL

It is nearly impossible to support Python 3.7 due to many incompatibilities. Python 3.8 support was added tests are passed with both 3.8 and 3.9 - some tests are skipped for 3.8 version - mostly output differences caused by argparse - which is functionally not critical.

ShahriyarR commented 2 years ago

@asterkin

It could not be resolved by future annotations?

Because __future__ annotations as describe in PEP-0563

With this PEP, function and variable annotations will no longer be evaluated at definition time. Instead, a string form will be preserved in the respective __annotations__ dictionary.
This PEP proposes changing function annotations and variable annotations so that they are no longer evaluated at function definition time. Instead, they are preserved in __annotations__ in string form.

Basically this is for somehow "ignoring" new type syntax and to give no warning. In fact we can get actual type from string representation but, this requires extra tweaks.

https://www.python.org/dev/peps/pep-0563/#resolving-type-hints-at-runtime