Skip to content

Commit 190403a

Browse files
authored
Update python version & deps (#537)
* Update deps * Update python versions
1 parent 52e4fd4 commit 190403a

10 files changed

Lines changed: 1096 additions & 819 deletions

File tree

.github/workflows/install_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1616

1717
steps:
1818
- uses: actions/checkout@v2

.github/workflows/install_test_coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, macos-latest]
14-
python-version: ['3.9', '3.10', '3.11', '3.12']
14+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1515

1616
steps:
1717
- uses: actions/checkout@v2

.github/workflows/install_test_setup_py.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, macos-latest]
14-
python-version: ['3.9', '3.10', '3.11', '3.12']
14+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
1515

1616
steps:
1717
- uses: actions/checkout@v2

.github/workflows/pylint_and_mypy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Set up Python 3.12
15+
- name: Set up Python 3.14
1616
uses: actions/setup-python@v1
1717
with:
18-
python-version: 3.12
18+
python-version: 3.14
1919
- name: Install poetry
2020
run: |
2121
python -m pip install poetry

.github/workflows/pypi_push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@master
11-
- name: Set up Python 3.12 🐍🐍🐍
11+
- name: Set up Python 3.14 🐍🐍🐍
1212
uses: actions/setup-python@v1
1313
with:
14-
python-version: 3.12
14+
python-version: 3.14
1515
- name: Install poetry
1616
run: |
1717
python -m pip install poetry

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ disable=
7171
too-many-lines,
7272
too-many-locals,
7373
too-many-nested-blocks,
74+
too-many-positional-arguments,
7475
too-many-public-methods,
7576
too-many-return-statements,
7677
too-many-statements,

poetry.lock

Lines changed: 1071 additions & 792 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "libcloudforensics"
3-
version = "20250721"
3+
version = "20260109"
44
description = "libcloudforensics is a set of tools to help acquire forensic evidence from Cloud platforms."
55
authors = ["cloud-forensics-utils development team <cloud-forensics-utils-dev@googlegroups.com>"]
66
license = "Apache-2.0"
@@ -10,7 +10,7 @@ readme = "README.md"
1010
cloudforensics = "tools.cli:Main"
1111

1212
[tool.poetry.dependencies]
13-
python = "^3.9"
13+
python = ">=3.11"
1414
google-api-core = "*"
1515
azure-common = "^1.1.28"
1616
azure-core = "^1.29.4"
@@ -35,10 +35,7 @@ sshpubkeys = "^3.3.1"
3535
requests = "^2.31.0"
3636
kubernetes = "^27.2.0"
3737
pyopenssl = "^23.2.0"
38-
urllib3 = [
39-
{version = ">=1.25.4,<1.27", python = "<3.10"},
40-
{version = ">=1.25.4,<2.1", python = ">=3.10"}
41-
]
38+
urllib3 = ">=2.6.0"
4239
google-auth = "^2.22.0"
4340
setuptools = "^75.8.0"
4441

tests/providers/azure/internal/test_compute.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AZComputeTest(unittest.TestCase):
3030
"""Test Azure compute class."""
3131
# pylint: disable=line-too-long
3232

33-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
33+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
3434
@mock.patch('libcloudforensics.providers.azure.internal.common.ExecuteRequest')
3535
@typing.no_type_check
3636
def testListInstances(self, mock_request, mock_provider):
@@ -59,7 +59,7 @@ def testListInstances(self, mock_request, mock_provider):
5959
mock_request.assert_called_with(
6060
mock.ANY, 'list', {'resource_group_name': instance.resource_group_name})
6161

62-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
62+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
6363
@mock.patch('libcloudforensics.providers.azure.internal.common.ExecuteRequest')
6464
@typing.no_type_check
6565
def testListDisks(self, mock_request, mock_provider):
@@ -91,7 +91,7 @@ def testListDisks(self, mock_request, mock_provider):
9191
'list_by_resource_group',
9292
{'resource_group_name': disk.resource_group_name})
9393

94-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
94+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
9595
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListInstances')
9696
@typing.no_type_check
9797
def testGetInstance(self, mock_list_instances, mock_provider):
@@ -107,7 +107,7 @@ def testGetInstance(self, mock_list_instances, mock_provider):
107107
self.assertEqual('fake-region', instance.region)
108108
self.assertEqual(['fake-zone'], instance.zones)
109109

110-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
110+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
111111
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
112112
@typing.no_type_check
113113
def testGetDisk(self, mock_list_disks, mock_provider):
@@ -123,7 +123,7 @@ def testGetDisk(self, mock_list_disks, mock_provider):
123123
self.assertEqual('fake-region', disk.region)
124124
self.assertEqual(['fake-zone'], disk.zones)
125125

126-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
126+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
127127
@mock.patch('azure.mgmt.compute.v2023_10_02.operations.DisksOperations.begin_create_or_update')
128128
@typing.no_type_check
129129
def testCreateDiskFromSnapshot(self, mock_create_disk, mock_provider):
@@ -185,7 +185,7 @@ def testCreateDiskFromSnapshot(self, mock_create_disk, mock_provider):
185185
'fake_snapshot_name_c4a46ad7_copy',
186186
expected_args)
187187

188-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
188+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
189189
@mock.patch('azure.storage.blob._container_client.ContainerClient.create_container')
190190
@mock.patch('azure.storage.blob._generated._azure_blob_storage.AzureBlobStorage.__init__')
191191
@mock.patch('azure.storage.blob._blob_service_client.BlobServiceClient.get_blob_client')
@@ -233,7 +233,7 @@ def testCreateDiskFromSnapshotUri(self,
233233
'fake_snapshot_name_c4a46ad7_copy',
234234
mock.ANY)
235235

236-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
236+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
237237
@mock.patch('sshpubkeys.SSHKey.parse')
238238
@mock.patch('libcloudforensics.scripts.utils.ReadStartupScript')
239239
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.GetInstance')
@@ -278,7 +278,7 @@ def testGetOrCreateAnalysisVm(self,
278278
self.assertEqual('fake-analysis-vm-name', vm.name)
279279
self.assertTrue(created)
280280

281-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
281+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
282282
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListInstanceTypes')
283283
@typing.no_type_check
284284
def testListVMSizes(self, mock_list, mock_provider):
@@ -292,7 +292,7 @@ def testListVMSizes(self, mock_list, mock_provider):
292292
self.assertEqual(8192, available_vms[0]['Memory'])
293293

294294
@mock.patch('azure.mgmt.reservations.operations.QuotaOperations.get')
295-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
295+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
296296
@mock.patch('azure.mgmt.compute.v2021_07_01.operations.ResourceSkusOperations.list')
297297
@typing.no_type_check
298298
def testGetInstanceType(self, mock_list_instance_types, mock_provider, mock_quota):
@@ -313,7 +313,7 @@ class AZVirtualMachineTest(unittest.TestCase):
313313
"""Test Azure virtual machine class."""
314314
# pylint: disable=line-too-long
315315

316-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
316+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
317317
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
318318
@mock.patch('azure.mgmt.compute.v2023_09_01.operations.VirtualMachinesOperations.get')
319319
@typing.no_type_check
@@ -344,7 +344,7 @@ def testGetDisk(self, mock_list_disk):
344344
'/subscriptions/sub/resourceGroups/fake-resource-group/providers/'
345345
'Microsoft.Compute/type/fake-vm-name', str(error.exception))
346346

347-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
347+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
348348
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZCompute.ListDisks')
349349
@mock.patch('azure.mgmt.compute.v2023_09_01.operations.VirtualMachinesOperations.get')
350350
@typing.no_type_check

tests/providers/azure/test_forensics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AZForensicsTest(unittest.TestCase):
3030
"""Test Azure forensics file."""
3131
# pylint: disable=line-too-long, too-many-arguments
3232

33-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
33+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
3434
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
3535
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
3636
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
@@ -82,7 +82,7 @@ def testCreateDiskCopy1(self,
8282
self.assertIsInstance(disk_copy, compute.AZComputeDisk)
8383
self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)
8484

85-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
85+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
8686
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
8787
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
8888
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
@@ -133,7 +133,7 @@ def testCreateDiskCopy2(self,
133133
self.assertIsInstance(disk_copy, compute.AZComputeDisk)
134134
self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)
135135

136-
@mock.patch('azure.mgmt.resource.resources.v2022_09_01.operations.ProvidersOperations.get')
136+
@mock.patch('azure.mgmt.resource.resources.v2025_03_01.operations.ProvidersOperations.get')
137137
@mock.patch('libcloudforensics.providers.azure.internal.compute.AZComputeDisk.GetDiskType')
138138
@mock.patch('libcloudforensics.providers.azure.internal.resource.AZResource.GetOrCreateResourceGroup')
139139
@mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')

0 commit comments

Comments
 (0)