Add support for Python 3.9

This is needed for Debian 11 compatibility.

Fixes: #50

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
This commit is contained in:
Andrew Gunnerson
2023-02-15 00:03:45 -05:00
parent 1dc6f1a088
commit 7435c49f50
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ The boot-related components are signed with an AVB key and OTA-related component
### Installing dependencies
avbroot depends on `openssl` command line tool and the `lz4` and `protobuf` Python libraries.
avbroot depends on the `openssl` command line tool and the `lz4` and `protobuf` Python libraries. Also, Python 3.9 or newer is required.
#### Linux
+7 -7
View File
@@ -115,17 +115,17 @@ class WrongFormat(ValueError):
class BootImage:
def __init__(
self,
f: None | typing.BinaryIO = None,
data: None | dict[str, typing.Any] = None,
f: typing.Optional[typing.BinaryIO] = None,
data: typing.Optional[dict[str, typing.Any]] = None,
) -> None:
assert (f is None) != (data is None)
self.kernel: None | bytes = None
self.kernel: typing.Optional[bytes] = None
self.ramdisks: list[bytes] = []
self.second: None | bytes = None
self.recovery_dtbo: None | bytes = None
self.dtb: None | bytes = None
self.bootconfig: None | bytes = None
self.second: typing.Optional[bytes] = None
self.recovery_dtbo: typing.Optional[bytes] = None
self.dtb: typing.Optional[bytes] = None
self.bootconfig: typing.Optional[bytes] = None
if f:
self._from_file(f)
+1 -1
View File
@@ -155,7 +155,7 @@ class CompressedFile:
self,
fp: typing.BinaryIO,
mode: typing.Literal['rb', 'wb'] = 'rb',
format: None | Format = None,
format: typing.Optional[Format] = None,
):
if mode == 'rb' and not format:
magic = fp.read(_MAGIC_MAX_SIZE)