PelionIoT / manifest-tool

A tool for creating and parsing update manifests
Apache License 2.0
11 stars 14 forks source link

Python 3.12 support #52

Open JanneKiiskila opened 1 month ago

JanneKiiskila commented 1 month ago

Python 3.12 is not supported now. The code actually works and passes with Python 3.12 (as long as you use pytest 7.4.2), however issues is with pylint. Currently selected version of pylint is not compatible with Python 3.12.

pylint: Command line or configuration file:1: UserWarning: 'BaseException' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.BaseException' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released.
pylint: Command line or configuration file:1: UserWarning: 'Exception' is not a proper value for the 'overgeneral-exceptions' option. Use fully qualified name (maybe 'builtins.Exception' ?) instead. This will cease to be checked at runtime when the configuration upgrader is released.
************* Module manifesttool.package_tool.package_format.tar_package
manifesttool/package_tool/package_format/tar_package.py:69:19: E0606: Possibly using variable 'asn1_dict' before assignment (possibly-used-before-assignment)
************* Module manifesttool.dev_tool.actions.init
manifesttool/dev_tool/actions/init.py:357:0: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
************* Module manifesttool.dev_tool.actions.create
manifesttool/dev_tool/actions/create.py:207:0: R0917: Too many positional arguments (12/5) (too-many-positional-arguments)
************* Module manifesttool.dev_tool.actions.update
manifesttool/dev_tool/actions/update.py:174:0: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
manifesttool/dev_tool/actions/update.py:232:0: R0917: Too many positional arguments (17/5) (too-many-positional-arguments)

If you upgrade pylint, you run int a number of issues - which should be either suppressed or fixed. Or if you upgrade to very latest pylint, it will not work with Python 3.8 anymore.

With pytest 8.x the FOTA cases (all of them) will fail.

JanneKiiskila commented 1 month ago

Turns out this was not that difficult after all, so this could be released if need be. Our internal repository has this now, but we are not in a hurry to release it. Comes out with the next release when it comes (no schedule/plan available as of now).