Skip to content

Commit a68da7f

Browse files
authored
Merge pull request #34 from intezer/feature/python-3.10
feat: bump minimum python version to 3.10
2 parents 6e9bc8c + 8259c02 commit a68da7f

9 files changed

Lines changed: 25 additions & 24 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-24.04
1515
strategy:
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818

1919
steps:
2020
- uses: actions/checkout@v3

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
1.14.0
2+
-----
3+
- Drop support for Python 3.9
4+
- Add support for Python 3.14
5+
- Bump intezer-SDK to 1.25
6+
- Modernize type hints to use Python 3.10+ syntax
7+
18
1.13.0
29
-----
310
- Add command for notifying alerts by CSV

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A cross-platform CLI tool which enables analyzing files with Intezer Analyze.
44

55
# Prerequisites
6-
Python 3.6 and above
6+
Python 3.10 and above
77

88
Python and pip should be available in your path
99

intezer_analyze_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.13.0'
1+
__version__ = '1.14.0'

intezer_analyze_cli/commands.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
import logging
33
import os
44
from io import BytesIO
5-
from typing import Dict
6-
from typing import List
7-
from typing import Optional
85
from email.utils import parsedate_to_datetime
96

107
import click
@@ -216,7 +213,7 @@ def get_hashes_from_file(path):
216213
return hashes
217214

218215

219-
def index_hash_command(sha256: str, index_as: str, family_name: Optional[str]):
216+
def index_hash_command(sha256: str, index_as: str, family_name: str | None):
220217
try:
221218
index_operation = Index(index_as=sdk_consts.IndexType.from_str(index_as),
222219
sha256=sha256,
@@ -228,7 +225,7 @@ def index_hash_command(sha256: str, index_as: str, family_name: Optional[str]):
228225
return None, f'Index error: {e} Error occurred with hash: {sha256}'
229226

230227

231-
def index_file_command(file_path: str, index_as: str, family_name: Optional[str]):
228+
def index_file_command(file_path: str, index_as: str, family_name: str | None):
232229
if not utilities.is_supported_file(file_path):
233230
click.echo('File is not PE, ELF, DEX or APK')
234231
return
@@ -243,7 +240,7 @@ def index_file_command(file_path: str, index_as: str, family_name: Optional[str]
243240

244241
def index_directory_command(directory_path: str,
245242
index_as: str,
246-
family_name: Optional[str],
243+
family_name: str | None,
247244
ignore_directory_count_limit: bool):
248245
indexes_results = []
249246

@@ -521,7 +518,7 @@ def notify_alerts_from_csv_command(csv_path: str):
521518
raise click.Abort()
522519

523520

524-
def _read_alerts_from_csv(csv_path: str) -> List[Dict[str, Optional[str]]]:
521+
def _read_alerts_from_csv(csv_path: str) -> list[dict[str, str | None]]:
525522
"""
526523
Read alert IDs and environments from CSV file.
527524

intezer_analyze_cli/utilities.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
import logging
44
import os
55
import zipfile
6-
from email import parser
76
from typing import BinaryIO
8-
from typing import Tuple
9-
from typing import Union
107

118
import click
129

@@ -109,7 +106,7 @@ def is_supported_file(file_path):
109106
return is_supported
110107

111108

112-
def is_eml_file(stream: BinaryIO) -> Tuple[bool, Union[str, None]]:
109+
def is_eml_file(stream: BinaryIO) -> tuple[bool, str | None]:
113110
mail_parser = email.parser.BytesParser()
114111
received_headers = ['To', 'Received']
115112
required_headers = ['From', 'Date']

requirements-prod.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
click==7.1.2
2-
intezer-sdk==1.23.0
2+
intezer-sdk==1.25.0

requirements-test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pytest>=8.4.1
2-
responses==0.25.8
1+
pytest==9.0.2
2+
responses==0.26.0

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def rel(*xs):
1919

2020
install_requires = [
2121
'click==7.1.2',
22-
'intezer-sdk>=1.23.0,<2'
22+
'intezer-sdk>=1.25.0,<2'
2323
]
2424
tests_require = [
25-
'pytest==8.4.1',
26-
'responses==0.25.8'
25+
'pytest==9.0.2',
26+
'responses==0.26.0'
2727
]
2828

2929
with open('README.md') as f:
@@ -35,11 +35,11 @@ def rel(*xs):
3535
description='Client library for Intezer cloud service',
3636
author='Intezer Labs ltd.',
3737
classifiers=[
38-
'Programming Language :: Python :: 3.9',
3938
'Programming Language :: Python :: 3.10',
4039
'Programming Language :: Python :: 3.11',
41-
'Programming Language :: Python :: 3.12'
42-
'Programming Language :: Python :: 3.13'
40+
'Programming Language :: Python :: 3.12',
41+
'Programming Language :: Python :: 3.13',
42+
'Programming Language :: Python :: 3.14',
4343
],
4444
keywords='intezer',
4545
packages=['intezer_analyze_cli'],
@@ -52,6 +52,6 @@ def rel(*xs):
5252
license='Apache License v2',
5353
long_description=long_description,
5454
long_description_content_type='text/markdown',
55-
python_requires='>=3.9',
55+
python_requires='>=3.10',
5656
zip_safe=False
5757
)

0 commit comments

Comments
 (0)