Skip to content

Commit

Permalink
maintenance: remove python3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Oct 30, 2024
1 parent 705f3a6 commit ecc87f2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
os: [ macos-latest ]

steps:
Expand Down
6 changes: 3 additions & 3 deletions ipsw_parser/build_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections import UserDict
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import List, Mapping, Optional
from typing import Optional

from cached_property import cached_property
from plumbum import ProcessExecutionError, local
Expand Down Expand Up @@ -85,7 +85,7 @@ def macos_variant(self) -> str:
return self['Info'].get('MacOSVariant')

@cached_property
def manifest(self) -> Mapping:
def manifest(self) -> dict:
return self['Manifest']

@cached_property
Expand All @@ -101,7 +101,7 @@ def has_component(self, name: str) -> bool:
def get_component(self, name: str, **args) -> Component:
return Component(self, name, **args)

def populate_tss_request_parameters(self, parameters: Mapping, additional_keys: List[str] = None):
def populate_tss_request_parameters(self, parameters: dict, additional_keys: Optional[list[str]] = None) -> None:
""" equivalent to idevicerestore:tss_parameters_add_from_manifest """
key_list = ['ApBoardID', 'ApChipID']
if additional_keys is None:
Expand Down
4 changes: 2 additions & 2 deletions ipsw_parser/build_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, ipsw, manifest: bytes):

@cached_property
def build_major(self) -> int:
build_major = str()
build_major = ''
for i in self._manifest['ProductBuildVersion']:
if i.isdigit():
build_major += i
Expand All @@ -25,7 +25,7 @@ def build_major(self) -> int:
return int(build_major)

@cached_property
def supported_product_types(self) -> List[str]:
def supported_product_types(self) -> list[str]:
return self._manifest['SupportedProductTypes']

@cached_property
Expand Down
4 changes: 2 additions & 2 deletions ipsw_parser/ipsw.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def system_version(self) -> bytes:
return self.read('SystemVersion.plist')

@cached_property
def filelist(self) -> List[zipfile.ZipInfo]:
def filelist(self) -> list[zipfile.ZipInfo]:
return self.archive.filelist

@contextmanager
Expand Down Expand Up @@ -105,7 +105,7 @@ def get_global_manifest(self, macos_variant: str, device_class: str) -> bytes:
def get_firmware(self, firmware_path: str) -> Firmware:
return Firmware(firmware_path, self)

def get_development_files(self) -> List[str]:
def get_development_files(self) -> list[str]:
result = []
for entry in self.archive.namelist():
for release in ('devel', 'kasan', 'research'):
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "ipsw-parser"
description = "python3 utility for parsing and extracting data from IPSW"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { file = "LICENSE" }
keywords = ["ios", "cli", "firmware", "ipsw"]
authors = [
Expand All @@ -15,13 +15,14 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
]
dynamic = ["dependencies","version"]
dynamic = ["dependencies", "version"]

[project.optional-dependencies]
test = ["pytest"]
Expand All @@ -38,7 +39,7 @@ exclude = ["docs*", "tests*"]

[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
version = {attr = "ipsw_parser._version.__version__"}
version = { attr = "ipsw_parser._version.__version__" }

[tool.setuptools_scm]
version_file = "ipsw_parser/_version.py"
Expand Down

0 comments on commit ecc87f2

Please sign in to comment.