From b38b805bf03c83a8d208c0a0b1bc8d10353f6036 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sun, 17 Oct 2021 06:11:52 +0000 Subject: [PATCH 01/62] Use assertEqual instead of assertEquals for Python 3.11 compatibility. --- .../tests/unit/core/messages/test_messages.py | 132 +++++++++--------- kmip/tests/unit/core/test_enums.py | 8 +- .../unit/pie/objects/test_opaque_object.py | 38 ++--- .../unit/pie/objects/test_private_key.py | 38 ++--- .../tests/unit/pie/objects/test_public_key.py | 38 ++--- .../unit/pie/objects/test_secret_data.py | 38 ++--- .../unit/pie/objects/test_symmetric_key.py | 38 ++--- .../unit/pie/objects/test_x509_certificate.py | 38 ++--- 8 files changed, 184 insertions(+), 184 deletions(-) diff --git a/kmip/tests/unit/core/messages/test_messages.py b/kmip/tests/unit/core/messages/test_messages.py index 1576e62a..5d62769d 100644 --- a/kmip/tests/unit/core/messages/test_messages.py +++ b/kmip/tests/unit/core/messages/test_messages.py @@ -431,9 +431,9 @@ def test_create_request_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) batch_item = batch_items[0] msg = "Bad batch item type: expected {0}, received {1}" @@ -479,9 +479,9 @@ def test_create_request_read(self): self.assertIsInstance(attributes, list, self.msg.format('attributes', 'type', list, type(attributes))) - self.assertEquals(3, len(attributes), - self.msg.format('attributes', 'length', - 3, len(attributes))) + self.assertEqual(3, len(attributes), + self.msg.format('attributes', 'length', + 3, len(attributes))) attribute_a = attributes[0] self.assertIsInstance(attribute_a, objects.Attribute, @@ -494,10 +494,10 @@ def test_create_request_read(self): self.msg.format('attribute name', 'type', objects.Attribute.AttributeName, type(attribute_name))) - self.assertEquals('Cryptographic Algorithm', attribute_name.value, - self.msg.format('attribute name', 'value', - 'Cryptographic Algorithm', - attribute_name.value)) + self.assertEqual('Cryptographic Algorithm', attribute_name.value, + self.msg.format('attribute name', 'value', + 'Cryptographic Algorithm', + attribute_name.value)) attribute_value = attribute_a.attribute_value exp_type = attr.CryptographicAlgorithm @@ -505,11 +505,11 @@ def test_create_request_read(self): self.assertIsInstance(attribute_value, exp_type, self.msg.format('attribute value', 'type', exp_type, rcv_type)) - self.assertEquals(attribute_value.value, - enums.CryptographicAlgorithm.AES, - self.msg.format('cryptographic algorithm', 'value', - enums.CryptographicAlgorithm.AES, - attribute_value.value)) + self.assertEqual(attribute_value.value, + enums.CryptographicAlgorithm.AES, + self.msg.format('cryptographic algorithm', 'value', + enums.CryptographicAlgorithm.AES, + attribute_value.value)) attribute_b = attributes[1] self.assertIsInstance(attribute_b, objects.Attribute, @@ -522,10 +522,10 @@ def test_create_request_read(self): self.msg.format('attribute name', 'type', objects.Attribute.AttributeName, type(attribute_name))) - self.assertEquals('Cryptographic Length', attribute_name.value, - self.msg.format('attribute name', 'value', - 'Cryptographic Length', - attribute_name.value)) + self.assertEqual('Cryptographic Length', attribute_name.value, + self.msg.format('attribute name', 'value', + 'Cryptographic Length', + attribute_name.value)) attribute_value = attribute_b.attribute_value exp_type = attr.CryptographicLength @@ -533,9 +533,9 @@ def test_create_request_read(self): self.assertIsInstance(attribute_value, exp_type, self.msg.format('attribute value', 'type', exp_type, rcv_type)) - self.assertEquals(attribute_value.value, 128, - self.msg.format('cryptographic length', 'value', - 128, attribute_value.value)) + self.assertEqual(attribute_value.value, 128, + self.msg.format('cryptographic length', 'value', + 128, attribute_value.value)) attribute_c = attributes[2] self.assertIsInstance(attribute_c, objects.Attribute, @@ -548,10 +548,10 @@ def test_create_request_read(self): self.msg.format('attribute name', 'type', objects.Attribute.AttributeName, type(attribute_name))) - self.assertEquals('Cryptographic Usage Mask', attribute_name.value, - self.msg.format('attribute name', 'value', - 'Cryptographic Usage Mask', - attribute_name.value)) + self.assertEqual('Cryptographic Usage Mask', attribute_name.value, + self.msg.format('attribute name', 'value', + 'Cryptographic Usage Mask', + attribute_name.value)) attribute_value = attribute_c.attribute_value exp_type = attr.CryptographicUsageMask @@ -562,9 +562,9 @@ def test_create_request_read(self): flag_encrypt = CryptographicUsageMask.ENCRYPT flag_decrypt = CryptographicUsageMask.DECRYPT exp_value = flag_encrypt.value | flag_decrypt.value - self.assertEquals(attribute_value.value, exp_value, - self.msg.format('cryptographic usage mask', 'value', - exp_value, attribute_value.value)) + self.assertEqual(attribute_value.value, exp_value, + self.msg.format('cryptographic usage mask', 'value', + exp_value, attribute_value.value)) def test_create_request_write(self): prot_ver = contents.ProtocolVersion(1, 1) @@ -662,9 +662,9 @@ def test_get_request_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) batch_item = batch_items[0] msg = "Bad batch item type: expected {0}, received {1}" @@ -780,9 +780,9 @@ def test_destroy_request_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) batch_item = batch_items[0] msg = "Bad batch item type: expected {0}, received {1}" @@ -899,9 +899,9 @@ def test_register_request_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) for batch_item in batch_items: msg = "Bad batch item type: expected {0}, received {1}" @@ -1113,9 +1113,9 @@ def test_locate_request_read(self): batch_items = request_message.batch_items msg = "Bad batch items type: expected {0}, received {1}" - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) batch_item = batch_items[0] msg = "Bad batch item type: expected {0}, received {1}" @@ -1164,9 +1164,9 @@ def test_locate_request_read(self): self.msg.format('attribute name', 'type', objects.Attribute.AttributeName, type(attribute_name))) - self.assertEquals('Object Type', attribute_name.value, - self.msg.format('attribute name', 'value', - 'Object Type', + self.assertEqual('Object Type', attribute_name.value, + self.msg.format('attribute name', 'value', + 'Object Type', attribute_name.value)) attribute_value = attribute_a.attribute_value @@ -1175,7 +1175,7 @@ def test_locate_request_read(self): self.assertIsInstance(attribute_value, exp_type, self.msg.format('attribute value', 'type', exp_type, rcv_type)) - self.assertEquals( + self.assertEqual( attribute_value.value, enums.ObjectType.SYMMETRIC_KEY, self.msg.format( @@ -1193,10 +1193,10 @@ def test_locate_request_read(self): self.msg.format('attribute name', 'type', objects.Attribute.AttributeName, type(attribute_name))) - self.assertEquals('Name', attribute_name.value, - self.msg.format('attribute name', 'value', - 'Name', - attribute_name.value)) + self.assertEqual('Name', attribute_name.value, + self.msg.format('attribute name', 'value', + 'Name', + attribute_name.value)) attribute_value = attribute_b.attribute_value exp_type = Name @@ -1204,10 +1204,10 @@ def test_locate_request_read(self): self.assertIsInstance(attribute_value, exp_type, self.msg.format('attribute value', 'type', exp_type, rcv_type)) - self.assertEquals('Key1', attribute_value.name_value.value, - self.msg.format('name value', 'value', - 'Key1', - attribute_value.name_value.value)) + self.assertEqual('Key1', attribute_value.name_value.value, + self.msg.format('name value', 'value', + 'Key1', + attribute_value.name_value.value)) def test_mac_request_read(self): self.stream = BytearrayStream(self.mac) @@ -1260,9 +1260,9 @@ def test_mac_request_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) batch_item = batch_items[0] msg = "Bad batch item type: expected {0}, received {1}" @@ -1310,10 +1310,10 @@ def test_mac_request_read(self): msg.format(enums.CryptographicAlgorithm, type(cryptographic_algorithm))) msg = "Bad cryptographic algorithm value: expected {0}, received {1}" - self.assertEquals(cryptographic_algorithm, - enums.CryptographicAlgorithm.HMAC_SHA512, - msg.format(cryptographic_algorithm, - enums.CryptographicAlgorithm.HMAC_SHA512)) + self.assertEqual(cryptographic_algorithm, + enums.CryptographicAlgorithm.HMAC_SHA512, + msg.format(cryptographic_algorithm, + enums.CryptographicAlgorithm.HMAC_SHA512)) data = request_payload.data msg = "Bad data type: expected {0}, received {1}" @@ -1922,9 +1922,9 @@ def test_destroy_response_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) for batch_item in batch_items: msg = "Bad batch item type: expected {0}, received {1}" @@ -2065,9 +2065,9 @@ def test_register_response_read(self): msg = "Bad batch items type: expected {0}, received {1}" self.assertIsInstance(batch_items, list, msg.format(list, type(batch_items))) - self.assertEquals(1, len(batch_items), - self.msg.format('batch items', 'length', - 1, len(batch_items))) + self.assertEqual(1, len(batch_items), + self.msg.format('batch items', 'length', + 1, len(batch_items))) for batch_item in batch_items: msg = "Bad batch item type: expected {0}, received {1}" diff --git a/kmip/tests/unit/core/test_enums.py b/kmip/tests/unit/core/test_enums.py index c0c91977..e6c7198d 100644 --- a/kmip/tests/unit/core/test_enums.py +++ b/kmip/tests/unit/core/test_enums.py @@ -34,7 +34,7 @@ def test_greater_than_or_equal(self): enums.KMIPVersion.KMIP_1_0 >= enums.KMIPVersion.KMIP_2_0 ) - self.assertEquals( + self.assertEqual( NotImplemented, enums.KMIPVersion.KMIP_2_0.__ge__(enums.WrappingMethod.ENCRYPT) ) @@ -47,7 +47,7 @@ def test_greater_than(self): enums.KMIPVersion.KMIP_1_1 > enums.KMIPVersion.KMIP_1_3 ) - self.assertEquals( + self.assertEqual( NotImplemented, enums.KMIPVersion.KMIP_2_0.__gt__(enums.WrappingMethod.ENCRYPT) ) @@ -60,7 +60,7 @@ def test_less_than_or_equal(self): enums.KMIPVersion.KMIP_1_4 <= enums.KMIPVersion.KMIP_1_3 ) - self.assertEquals( + self.assertEqual( NotImplemented, enums.KMIPVersion.KMIP_2_0.__le__(enums.WrappingMethod.ENCRYPT) ) @@ -73,7 +73,7 @@ def test_less_than(self): enums.KMIPVersion.KMIP_2_0 < enums.KMIPVersion.KMIP_1_3 ) - self.assertEquals( + self.assertEqual( NotImplemented, enums.KMIPVersion.KMIP_2_0.__lt__(enums.WrappingMethod.ENCRYPT) ) diff --git a/kmip/tests/unit/pie/objects/test_opaque_object.py b/kmip/tests/unit/pie/objects/test_opaque_object.py index f41f1b0e..6a7542ce 100644 --- a/kmip/tests/unit/pie/objects/test_opaque_object.py +++ b/kmip/tests/unit/pie/objects/test_opaque_object.py @@ -253,11 +253,11 @@ def test_add_multiple_names(self): self.bytes_a, enums.OpaqueDataType.NONE, name=expected_names[0]) obj.names.append(expected_names[1]) obj.names.append(expected_names[2]) - self.assertEquals(3, obj.name_index) + self.assertEqual(3, obj.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -269,7 +269,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -284,7 +284,7 @@ def test_remove_name(self): obj.names.append(names[1]) obj.names.append(names[2]) obj.names.pop(remove_index) - self.assertEquals(3, obj.name_index) + self.assertEqual(3, obj.name_index) expected_names = list() expected_mo_names = list() @@ -292,8 +292,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, obj.names) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_names, obj.names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -305,8 +305,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -323,7 +323,7 @@ def test_remove_and_add_name(self): obj.names.pop() obj.names.pop() obj.names.append('dog') - self.assertEquals(4, obj.name_index) + self.assertEqual(4, obj.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -331,8 +331,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, obj.names) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_names, obj.names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -344,8 +344,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -385,8 +385,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -426,8 +426,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -470,5 +470,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) diff --git a/kmip/tests/unit/pie/objects/test_private_key.py b/kmip/tests/unit/pie/objects/test_private_key.py index 0ad425f4..d03fbdb2 100644 --- a/kmip/tests/unit/pie/objects/test_private_key.py +++ b/kmip/tests/unit/pie/objects/test_private_key.py @@ -597,11 +597,11 @@ def test_add_multiple_names(self): enums.KeyFormatType.PKCS_1, name=expected_names[0]) key.names.append(expected_names[1]) key.names.append(expected_names[2]) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -613,7 +613,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -629,7 +629,7 @@ def test_remove_name(self): key.names.append(names[1]) key.names.append(names[2]) key.names.pop(remove_index) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_names = list() expected_mo_names = list() @@ -637,8 +637,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -650,8 +650,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -669,7 +669,7 @@ def test_remove_and_add_name(self): key.names.pop() key.names.pop() key.names.append('dog') - self.assertEquals(4, key.name_index) + self.assertEqual(4, key.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -677,8 +677,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -690,8 +690,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -732,8 +732,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -774,8 +774,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -819,5 +819,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) diff --git a/kmip/tests/unit/pie/objects/test_public_key.py b/kmip/tests/unit/pie/objects/test_public_key.py index cf71833b..be63da38 100644 --- a/kmip/tests/unit/pie/objects/test_public_key.py +++ b/kmip/tests/unit/pie/objects/test_public_key.py @@ -495,11 +495,11 @@ def test_add_multiple_names(self): enums.KeyFormatType.PKCS_1, name=expected_names[0]) key.names.append(expected_names[1]) key.names.append(expected_names[2]) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -511,7 +511,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -527,7 +527,7 @@ def test_remove_name(self): key.names.append(names[1]) key.names.append(names[2]) key.names.pop(remove_index) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_names = list() expected_mo_names = list() @@ -535,8 +535,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -548,8 +548,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -567,7 +567,7 @@ def test_remove_and_add_name(self): key.names.pop() key.names.pop() key.names.append('dog') - self.assertEquals(4, key.name_index) + self.assertEqual(4, key.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -575,8 +575,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -588,8 +588,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -630,8 +630,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -672,8 +672,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -717,5 +717,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) diff --git a/kmip/tests/unit/pie/objects/test_secret_data.py b/kmip/tests/unit/pie/objects/test_secret_data.py index 1cfe075d..c11317b3 100644 --- a/kmip/tests/unit/pie/objects/test_secret_data.py +++ b/kmip/tests/unit/pie/objects/test_secret_data.py @@ -272,11 +272,11 @@ def test_add_multiple_names(self): name=expected_names[0]) obj.names.append(expected_names[1]) obj.names.append(expected_names[2]) - self.assertEquals(3, obj.name_index) + self.assertEqual(3, obj.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -288,7 +288,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -303,7 +303,7 @@ def test_remove_name(self): obj.names.append(names[1]) obj.names.append(names[2]) obj.names.pop(remove_index) - self.assertEquals(3, obj.name_index) + self.assertEqual(3, obj.name_index) expected_names = list() expected_mo_names = list() @@ -311,8 +311,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, obj.names) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_names, obj.names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -324,8 +324,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -342,7 +342,7 @@ def test_remove_and_add_name(self): obj.names.pop() obj.names.pop() obj.names.append('dog') - self.assertEquals(4, obj.name_index) + self.assertEqual(4, obj.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -350,8 +350,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, obj.names) - self.assertEquals(expected_mo_names, obj._names) + self.assertEqual(expected_names, obj.names) + self.assertEqual(expected_mo_names, obj._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -363,8 +363,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -404,8 +404,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -445,8 +445,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -489,5 +489,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == obj.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) diff --git a/kmip/tests/unit/pie/objects/test_symmetric_key.py b/kmip/tests/unit/pie/objects/test_symmetric_key.py index cf7f5dff..f0c7ebad 100644 --- a/kmip/tests/unit/pie/objects/test_symmetric_key.py +++ b/kmip/tests/unit/pie/objects/test_symmetric_key.py @@ -442,11 +442,11 @@ def test_add_multiple_names(self): name=expected_names[0]) key.names.append(expected_names[1]) key.names.append(expected_names[2]) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -458,7 +458,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -474,7 +474,7 @@ def test_remove_name(self): key.names.append(names[1]) key.names.append(names[2]) key.names.pop(remove_index) - self.assertEquals(3, key.name_index) + self.assertEqual(3, key.name_index) expected_names = list() expected_mo_names = list() @@ -482,8 +482,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -495,8 +495,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -514,7 +514,7 @@ def test_remove_and_add_name(self): key.names.pop() key.names.pop() key.names.append('dog') - self.assertEquals(4, key.name_index) + self.assertEqual(4, key.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -522,8 +522,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, key.names) - self.assertEquals(expected_mo_names, key._names) + self.assertEqual(expected_names, key.names) + self.assertEqual(expected_mo_names, key._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -535,8 +535,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -577,8 +577,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -619,8 +619,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -664,5 +664,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == key.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) diff --git a/kmip/tests/unit/pie/objects/test_x509_certificate.py b/kmip/tests/unit/pie/objects/test_x509_certificate.py index f4d76ada..dba77617 100644 --- a/kmip/tests/unit/pie/objects/test_x509_certificate.py +++ b/kmip/tests/unit/pie/objects/test_x509_certificate.py @@ -348,11 +348,11 @@ def test_add_multiple_names(self): cert = X509Certificate(self.bytes_a, name=expected_names[0]) cert.names.append(expected_names[1]) cert.names.append(expected_names[2]) - self.assertEquals(3, cert.name_index) + self.assertEqual(3, cert.name_index) expected_mo_names = list() for i, name in enumerate(expected_names): expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_mo_names, cert._names) + self.assertEqual(expected_mo_names, cert._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -364,7 +364,7 @@ def test_add_multiple_names(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_name(self): """ @@ -378,7 +378,7 @@ def test_remove_name(self): cert.names.append(names[1]) cert.names.append(names[2]) cert.names.pop(remove_index) - self.assertEquals(3, cert.name_index) + self.assertEqual(3, cert.name_index) expected_names = list() expected_mo_names = list() @@ -386,8 +386,8 @@ def test_remove_name(self): if i != remove_index: expected_names.append(name) expected_mo_names.append(sqltypes.ManagedObjectName(name, i)) - self.assertEquals(expected_names, cert.names) - self.assertEquals(expected_mo_names, cert._names) + self.assertEqual(expected_names, cert.names) + self.assertEqual(expected_mo_names, cert._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -399,8 +399,8 @@ def test_remove_name(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_remove_and_add_name(self): """ @@ -416,7 +416,7 @@ def test_remove_and_add_name(self): cert.names.pop() cert.names.pop() cert.names.append('dog') - self.assertEquals(4, cert.name_index) + self.assertEqual(4, cert.name_index) expected_names = ['bowser', 'dog'] expected_mo_names = list() @@ -424,8 +424,8 @@ def test_remove_and_add_name(self): 0)) expected_mo_names.append(sqltypes.ManagedObjectName(expected_names[1], 3)) - self.assertEquals(expected_names, cert.names) - self.assertEquals(expected_mo_names, cert._names) + self.assertEqual(expected_names, cert.names) + self.assertEqual(expected_mo_names, cert._names) Session = sessionmaker(bind=self.engine, expire_on_commit=False) session = Session() @@ -437,8 +437,8 @@ def test_remove_and_add_name(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_add_name(self): """ @@ -477,8 +477,8 @@ def test_update_with_add_name(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_name(self): """ @@ -517,8 +517,8 @@ def test_update_with_remove_name(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) def test_update_with_remove_and_add_name(self): """ @@ -560,5 +560,5 @@ def test_update_with_remove_and_add_name(self): ManagedObject.unique_identifier == cert.unique_identifier ).one() session.commit() - self.assertEquals(expected_names, get_obj.names) - self.assertEquals(expected_mo_names, get_obj._names) + self.assertEqual(expected_names, get_obj.names) + self.assertEqual(expected_mo_names, get_obj._names) From 69b127c24dbee3946e3395d02b8e42677656e338 Mon Sep 17 00:00:00 2001 From: arp102 <92389169+arp102@users.noreply.github.com> Date: Thu, 17 Feb 2022 11:36:42 -0500 Subject: [PATCH 02/62] Add a Subject Alternative Name to the example server cert. This is often required for hostname verification. --- bin/create_certificates.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/create_certificates.py b/bin/create_certificates.py index 0bd15698..bc7e5b33 100755 --- a/bin/create_certificates.py +++ b/bin/create_certificates.py @@ -47,7 +47,8 @@ def create_certificate(subject_name, signing_certificate, signing_key, days_valid=365, - client_auth=False): + client_auth=False, + hostname=None): subject = x509.Name([ x509.NameAttribute(x509.NameOID.ORGANIZATION_NAME, u"Test, Inc."), x509.NameAttribute(x509.NameOID.COMMON_NAME, subject_name) @@ -72,6 +73,12 @@ def create_certificate(subject_name, critical=True ) + if hostname: + builder = builder.add_extension( + x509.SubjectAlternativeName([x509.DNSName(hostname)]), + critical=False, + ) + certificate = builder.sign( signing_key, hashes.SHA256(), @@ -92,7 +99,8 @@ def main(): u"Server Certificate", server_key, root_certificate, - root_key + root_key, + hostname=u"localhost" ) john_doe_client_key = create_rsa_private_key() From 4d1e9c633c62d252375eea3bfc2f23e415ce0003 Mon Sep 17 00:00:00 2001 From: Konstantin Trushin Date: Sun, 8 May 2022 21:20:53 +0300 Subject: [PATCH 03/62] Repair some demos Pass the required argument to the `build_cli_parser` function where it was missed. Pass the missed argument in the `objects.SecretData` initialization. --- kmip/demos/pie/register_certificate.py | 2 +- kmip/demos/pie/register_opaque_object.py | 2 +- kmip/demos/pie/register_private_key.py | 2 +- kmip/demos/pie/register_public_key.py | 2 +- kmip/demos/pie/register_secret_data.py | 4 ++-- kmip/demos/pie/register_symmetric_key.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kmip/demos/pie/register_certificate.py b/kmip/demos/pie/register_certificate.py index ffaa38ad..5f2aca73 100644 --- a/kmip/demos/pie/register_certificate.py +++ b/kmip/demos/pie/register_certificate.py @@ -26,7 +26,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config diff --git a/kmip/demos/pie/register_opaque_object.py b/kmip/demos/pie/register_opaque_object.py index e0523c89..48cf48cd 100644 --- a/kmip/demos/pie/register_opaque_object.py +++ b/kmip/demos/pie/register_opaque_object.py @@ -26,7 +26,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config diff --git a/kmip/demos/pie/register_private_key.py b/kmip/demos/pie/register_private_key.py index ee27ffb0..e6f62b03 100644 --- a/kmip/demos/pie/register_private_key.py +++ b/kmip/demos/pie/register_private_key.py @@ -26,7 +26,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config diff --git a/kmip/demos/pie/register_public_key.py b/kmip/demos/pie/register_public_key.py index bc867dd9..17469a75 100644 --- a/kmip/demos/pie/register_public_key.py +++ b/kmip/demos/pie/register_public_key.py @@ -26,7 +26,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config diff --git a/kmip/demos/pie/register_secret_data.py b/kmip/demos/pie/register_secret_data.py index 2ac7072f..86d5f780 100644 --- a/kmip/demos/pie/register_secret_data.py +++ b/kmip/demos/pie/register_secret_data.py @@ -27,7 +27,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config @@ -37,7 +37,7 @@ usage_mask = [enums.CryptographicUsageMask.VERIFY] name = 'Demo Secret Data' - secret = objects.SecretData(value, data_type, usage_mask, name) + secret = objects.SecretData(value, data_type, None, usage_mask, name) secret.operation_policy_name = opts.operation_policy_name # Build the client and connect to the server diff --git a/kmip/demos/pie/register_symmetric_key.py b/kmip/demos/pie/register_symmetric_key.py index 38a0689b..5234e6d3 100644 --- a/kmip/demos/pie/register_symmetric_key.py +++ b/kmip/demos/pie/register_symmetric_key.py @@ -26,7 +26,7 @@ if __name__ == '__main__': logger = utils.build_console_logger(logging.INFO) - parser = utils.build_cli_parser() + parser = utils.build_cli_parser(enums.Operation.REGISTER) opts, args = parser.parse_args(sys.argv[1:]) config = opts.config From b7814959a42fe3fce5d5b7cfed526ba8d5a29aa5 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 22 Sep 2021 12:53:42 -0700 Subject: [PATCH 04/62] Copy README.rst to long_description This should provide a useful project description on PyPI the next time we publish a release. --- setup.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index eba36b10..19904f1a 100644 --- a/setup.py +++ b/setup.py @@ -18,11 +18,8 @@ import setuptools # Dynamically set __version__ -version_path = os.path.join( - os.path.dirname(os.path.realpath(__file__)), - "kmip", - "version.py" -) +this_dir = os.path.dirname(os.path.realpath(__file__)) +version_path = os.path.join(this_dir, "kmip", "version.py") with open(version_path, 'r') as f: m = re.search( r"^__version__ = \"(\d+\.\d+\..*)\"$", @@ -30,6 +27,9 @@ re.MULTILINE ) __version__ = m.group(1) +readme_path = os.path.join(this_dir, "README.rst") +with open(readme_path, 'r') as f: + long_description = f.read() setuptools.setup( name='PyKMIP', @@ -40,6 +40,8 @@ author_email='peter.hamilton@jhuapl.edu', url='https://github.com/OpenKMIP/PyKMIP', license='Apache License, Version 2.0', + long_description=long_description, + long_description_content_type="text/x-rst", packages=setuptools.find_packages(exclude=["kmip.tests", "kmip.tests.*"]), package_data={'kmip': ['kmipconfig.ini', 'logconfig.ini'], 'kmip.demos': ['certs/server.crt', 'certs/server.key']}, From a7a5f3775553669f59c116d98c9f7abfb11d4e26 Mon Sep 17 00:00:00 2001 From: Satya Kommula Date: Tue, 7 Jun 2022 12:38:55 +0530 Subject: [PATCH 05/62] Bump codeql action v1 tov2 --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9bb8b0d9..6c67931d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,7 +50,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -64,4 +64,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 8a2289c9bd18da956933941d5ea588a4f32b60ae Mon Sep 17 00:00:00 2001 From: Pranathi Locula Date: Wed, 8 Sep 2021 14:41:31 -0400 Subject: [PATCH 06/62] custom attributes for SymmetricKey --- kmip/pie/client.py | 1 + kmip/pie/objects.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kmip/pie/client.py b/kmip/pie/client.py index 0205ea8e..c9fd721f 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -20,6 +20,7 @@ from kmip.core import primitives from kmip.core import objects as cobjects +from kmip.core.objects import Attribute from kmip.core.factories import attributes from kmip.core.attributes import CryptographicParameters diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index e0ab00df..1186fc9f 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -657,7 +657,7 @@ class SymmetricKey(Key): 'sqlite_autoincrement': True } - def __init__(self, algorithm, length, value, masks=None, + def __init__(self, algorithm, length, value, app_specific_info=None, masks=None, name='Symmetric Key', key_wrapping_data=None): """ Create a SymmetricKey. @@ -690,6 +690,9 @@ def __init__(self, algorithm, length, value, masks=None, if masks: self.cryptographic_usage_masks.extend(masks) + if app_specific_info: + self._application_specific_informations = app_specific_info + # All remaining attributes are not considered part of the public API # and are subject to change. From 19a901d0beaee43b69433695ec8c36e9e2e0365b Mon Sep 17 00:00:00 2001 From: Pranathi Locula Date: Mon, 18 Oct 2021 13:26:08 -0400 Subject: [PATCH 07/62] add custom attribute support --- kmip/pie/client.py | 1 - kmip/pie/objects.py | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kmip/pie/client.py b/kmip/pie/client.py index c9fd721f..4944cac8 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -565,7 +565,6 @@ def register(self, managed_object): template = cobjects.TemplateAttribute(attributes=object_attributes) object_type = managed_object.object_type - # Register the managed object and handle the results secret = self.object_factory.convert(managed_object) result = self.proxy.register(object_type, template, secret) diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 1186fc9f..f239a68c 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -658,7 +658,7 @@ class SymmetricKey(Key): } def __init__(self, algorithm, length, value, app_specific_info=None, masks=None, - name='Symmetric Key', key_wrapping_data=None): + name='Symmetric Key2', key_wrapping_data=None): """ Create a SymmetricKey. @@ -824,7 +824,7 @@ class PublicKey(Key): def __init__(self, algorithm, length, value, format_type=enums.KeyFormatType.X_509, masks=None, - name='Public Key', key_wrapping_data=None): + name='Public Key', app_specific_info = None, key_wrapping_data=None): """ Create a PublicKey. @@ -862,6 +862,9 @@ def __init__(self, algorithm, length, value, if masks: self.cryptographic_usage_masks = masks + if app_specific_info: + self._application_specific_informations = app_specific_info + # All remaining attributes are not considered part of the public API # and are subject to change. @@ -989,7 +992,7 @@ class PrivateKey(Key): } def __init__(self, algorithm, length, value, format_type, masks=None, - name='Private Key', key_wrapping_data=None): + name='Private Key', app_specific_info = None, key_wrapping_data=None): """ Create a PrivateKey. @@ -1026,6 +1029,9 @@ def __init__(self, algorithm, length, value, format_type, masks=None, if masks: self.cryptographic_usage_masks = masks + if app_specific_info: + self._application_specific_informations = app_specific_info + # All remaining attributes are not considered part of the public API # and are subject to change. From 95b54707f7afd789020a146f7aadd4a003f66672 Mon Sep 17 00:00:00 2001 From: Pranathi Locula Date: Mon, 18 Oct 2021 13:32:35 -0400 Subject: [PATCH 08/62] add app_specific_info --- kmip/pie/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index f239a68c..33892c04 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -658,7 +658,7 @@ class SymmetricKey(Key): } def __init__(self, algorithm, length, value, app_specific_info=None, masks=None, - name='Symmetric Key2', key_wrapping_data=None): + name='Symmetric Key', key_wrapping_data=None): """ Create a SymmetricKey. From 20f20b0e29a37d68dafcbc363e778e3922549b90 Mon Sep 17 00:00:00 2001 From: gracelombardi Date: Fri, 8 Jul 2022 13:07:21 -0400 Subject: [PATCH 09/62] Code consistency updated --- kmip/pie/client.py | 1 - kmip/pie/objects.py | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kmip/pie/client.py b/kmip/pie/client.py index 4944cac8..8e3ba3af 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -20,7 +20,6 @@ from kmip.core import primitives from kmip.core import objects as cobjects -from kmip.core.objects import Attribute from kmip.core.factories import attributes from kmip.core.attributes import CryptographicParameters diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 33892c04..882a95e0 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -657,8 +657,8 @@ class SymmetricKey(Key): 'sqlite_autoincrement': True } - def __init__(self, algorithm, length, value, app_specific_info=None, masks=None, - name='Symmetric Key', key_wrapping_data=None): + def __init__(self, algorithm, length, value, masks=None, + name='Symmetric Key', key_wrapping_data=None, app_specific_info=None): """ Create a SymmetricKey. @@ -824,7 +824,7 @@ class PublicKey(Key): def __init__(self, algorithm, length, value, format_type=enums.KeyFormatType.X_509, masks=None, - name='Public Key', app_specific_info = None, key_wrapping_data=None): + name='Public Key', key_wrapping_data=None, app_specific_info=None): """ Create a PublicKey. @@ -992,7 +992,7 @@ class PrivateKey(Key): } def __init__(self, algorithm, length, value, format_type, masks=None, - name='Private Key', app_specific_info = None, key_wrapping_data=None): + name='Private Key', key_wrapping_data=None, app_specific_info=None): """ Create a PrivateKey. @@ -1589,7 +1589,7 @@ class SecretData(CryptographicObject): 'sqlite_autoincrement': True } - def __init__(self, value, data_type, app_specific_info=None, masks=None, name='Secret Data'): + def __init__(self, value, data_type, masks=None, name='Secret Data', app_specific_info=None): """ Create a SecretData object. From 1773fba67c892daafb33b583248de12e53ec740b Mon Sep 17 00:00:00 2001 From: Grace Lombardi Date: Tue, 12 Jul 2022 13:54:51 -0400 Subject: [PATCH 10/62] Updated client integration tests, Added test for Application Specific Information --- .travis/run.sh | 16 +++--- .travis/server.conf | 3 +- kmip/core/factories/attribute_values.py | 10 ++-- kmip/pie/client.py | 12 +++- .../services/test_proxykmipclient.py | 57 +++++++++++++++---- 5 files changed, 72 insertions(+), 26 deletions(-) diff --git a/.travis/run.sh b/.travis/run.sh index 7baf0fbc..fd17850d 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -12,10 +12,10 @@ if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then sudo cp ./.travis/pykmip.conf /etc/pykmip/pykmip.conf sudo cp ./.travis/server.conf /etc/pykmip/server.conf sudo cp ./.travis/policy.json /etc/pykmip/policies/policy.json - sudo mkdir /var/log/pykmip + sudo mkdir -p /var/log/pykmip sudo chmod 777 /var/log/pykmip - python ./bin/run_server.py & - tox -e integration -- --config client + sudo python3 ./bin/run_server.py & + sudo tox -e integration -- --config client elif [[ "${RUN_INTEGRATION_TESTS}" == "2" ]]; then # Set up the SLUGS instance cp -r ./.travis/functional/slugs /tmp/ @@ -23,14 +23,14 @@ elif [[ "${RUN_INTEGRATION_TESTS}" == "2" ]]; then # Set up the PyKMIP server cp -r ./.travis/functional/pykmip /tmp/ - python ./bin/create_certificates.py + sudo python3 ./bin/create_certificates.py mv *.pem /tmp/pykmip/certs/ - sudo mkdir /var/log/pykmip + sudo mkdir -p /var/log/pykmip sudo chmod 777 /var/log/pykmip - pykmip-server -f /tmp/pykmip/server.conf -l /tmp/pykmip/server.log & + sudo pykmip-server -f /tmp/pykmip/server.conf -l /tmp/pykmip/server.log & # Run the functional tests - tox -e functional -- --config-file /tmp/pykmip/client.conf + sudo tox -e functional -- --config-file /tmp/pykmip/client.conf else - tox + sudo tox fi diff --git a/.travis/server.conf b/.travis/server.conf index 61f18a39..5988b422 100644 --- a/.travis/server.conf +++ b/.travis/server.conf @@ -4,6 +4,7 @@ port=5696 certificate_path=/etc/pykmip/certs/cert.pem key_path=/etc/pykmip/certs/key.pem ca_path=/etc/pykmip/certs/cert.pem -auth_suite=Basic +auth_suite=TLS1.2 enable_tls_client_auth=False policy_path=/etc/pykmip/policies/ +database_path=/tmp/pykmip.db diff --git a/kmip/core/factories/attribute_values.py b/kmip/core/factories/attribute_values.py index 4a1c4a59..20d6a5df 100644 --- a/kmip/core/factories/attribute_values.py +++ b/kmip/core/factories/attribute_values.py @@ -17,6 +17,7 @@ from kmip.core import enums from kmip.core import primitives from kmip.core import utils +import json class AttributeValueFactory(object): @@ -274,10 +275,11 @@ def _create_cryptographic_usage_mask(self, flags): def _create_application_specific_information(self, info): if info: - return attributes.ApplicationSpecificInformation( - application_namespace=info.get("application_namespace"), - application_data=info.get("application_data") - ) + for k,v in info.items(): + return attributes.ApplicationSpecificInformation( + k, + v + ) else: return attributes.ApplicationSpecificInformation() diff --git a/kmip/pie/client.py b/kmip/pie/client.py index 8e3ba3af..92ec1469 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -25,6 +25,7 @@ from kmip.core.attributes import CryptographicParameters from kmip.core.attributes import DerivationParameters + from kmip.core.messages import payloads from kmip.pie import exceptions @@ -559,8 +560,15 @@ def register(self, managed_object): if hasattr(managed_object, '_application_specific_informations'): if managed_object._application_specific_informations: - for attr in managed_object._application_specific_informations: - object_attributes.append(attr) + for attr in managed_object._application_specific_informations: + app_dict = {} + app_dict[attr] = managed_object._application_specific_informations[attr] + attribute = self.attribute_factory.create_attribute( + name=enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION, + value=app_dict, + index=1 + ) + object_attributes.append(attribute) template = cobjects.TemplateAttribute(attributes=object_attributes) object_type = managed_object.object_type diff --git a/kmip/tests/integration/services/test_proxykmipclient.py b/kmip/tests/integration/services/test_proxykmipclient.py index aeecc03e..62d7988c 100644 --- a/kmip/tests/integration/services/test_proxykmipclient.py +++ b/kmip/tests/integration/services/test_proxykmipclient.py @@ -39,7 +39,10 @@ def tearDown(self): uuids = self.client.locate() for uuid in uuids: - self.client.destroy(uid=uuid) + try: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uuid) + finally: + self.client.destroy(uid=uuid) def test_symmetric_key_create_get_destroy(self): """ @@ -57,6 +60,7 @@ def test_symmetric_key_create_get_destroy(self): enums.CryptographicAlgorithm.AES) self.assertEqual(key.cryptographic_length, 256) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -100,10 +104,8 @@ def test_create_get_wrapped_destroy(self): self.assertNotEqual(unwrapped_key.value, wrapped_key.value) - self.client.revoke( - enums.RevocationReasonCode.CESSATION_OF_OPERATION, - wrapping_id - ) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, wrapping_id) self.client.destroy(key_id) self.client.destroy(wrapping_id) @@ -131,6 +133,7 @@ def test_symmetric_key_register_get_destroy(self): self.assertEqual( result, key, "expected {0}\nobserved {1}".format(result, key)) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -181,6 +184,30 @@ def test_register_wrapped_get_destroy(self): enums.EncodingOption.NO_ENCODING, key_wrapping_data.get('encoding_option') ) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) + self.client.destroy(key_id) + + def test_register_app_specific_get(self): + """ + Test that a key with app specifc info can be registered with the server and that its + metadata is retrieved with the get operation. + """ + key = objects.SymmetricKey( + enums.CryptographicAlgorithm.AES, + 128, + (b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E' + b'\x0F'), + app_specific_info={ + 'application_namespace': 'Testing', + 'application_data': 'Testing2' + } + ) + key_id = self.client.register(key) + result = self.client.get(key_id) + app_specific_info = result.app_specific_info + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) + self.client.destroy(key_id) + def test_asymmetric_key_pair_create_get_destroy(self): """ @@ -211,6 +238,7 @@ def test_asymmetric_key_pair_create_get_destroy(self): enums.CryptographicAlgorithm.RSA) self.assertEqual(private_key.cryptographic_length, 2048) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, public_uid) self.client.destroy(public_uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, public_uid) @@ -218,6 +246,7 @@ def test_asymmetric_key_pair_create_get_destroy(self): exceptions.KmipOperationFailure, self.client.destroy, public_uid) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, private_uid) self.client.destroy(private_uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, private_uid) @@ -264,6 +293,7 @@ def test_public_key_register_get_destroy(self): self.assertEqual( result, key, "expected {0}\nobserved {1}".format(result, key)) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -371,6 +401,7 @@ def test_private_key_register_get_destroy(self): self.assertEqual( result, key, "expected {0}\nobserved {1}".format(result, key)) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -449,6 +480,7 @@ def test_x509_certificate_register_get_destroy(self): result, cert, "expected {0}\nobserved {1}".format( result, cert)) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -476,6 +508,7 @@ def test_secret_data_register_get_destroy(self): result, secret, "expected {0}\nobserved {1}".format( result, secret)) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) @@ -570,6 +603,8 @@ def test_derive_key_using_pbkdf2(self): attribute.attribute_name.value ) self.assertEqual(160, attribute.attribute_value.value) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) + self.client.destroy(key_id) def test_derive_key_using_encryption(self): """ @@ -798,10 +833,7 @@ def test_encrypt_decrypt(self): self.assertEqual(plain_text, result) # Clean up. - self.client.revoke( - enums.RevocationReasonCode.CESSATION_OF_OPERATION, - key_id - ) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) self.client.destroy(key_id) def test_create_key_pair_sign_signature_verify(self): @@ -858,11 +890,11 @@ def test_create_key_pair_sign_signature_verify(self): # Clean up. self.client.revoke( - enums.RevocationReasonCode.CESSATION_OF_OPERATION, + enums.RevocationReasonCode.KEY_COMPROMISE, public_key_id ) self.client.revoke( - enums.RevocationReasonCode.CESSATION_OF_OPERATION, + enums.RevocationReasonCode.KEY_COMPROMISE, private_key_id ) self.client.destroy(public_key_id) @@ -1293,6 +1325,8 @@ def test_create_getattributes_locate_destroy(self): self.assertEqual(0, len(result)) # Clean up the keys + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, a_id) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, b_id) self.client.destroy(a_id) self.client.destroy(b_id) @@ -1344,6 +1378,7 @@ def test_split_key_register_get_destroy(self): self.assertEqual(enums.SplitKeyMethod.XOR, result.split_key_method) self.assertIsNone(result.prime_field_size) finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, uid) From 124f7db5cb5e48e01d8f4ceac783b94cf83a8b9c Mon Sep 17 00:00:00 2001 From: Grace Lombardi Date: Thu, 14 Jul 2022 10:03:46 -0400 Subject: [PATCH 11/62] Updated test for App Specific Info for Symmetric Key and added test for App Specific Info for SecretData --- kmip/core/factories/attribute_values.py | 10 +-- kmip/pie/client.py | 15 ++-- .../services/test_proxykmipclient.py | 90 +++++++++++++++++-- 3 files changed, 94 insertions(+), 21 deletions(-) diff --git a/kmip/core/factories/attribute_values.py b/kmip/core/factories/attribute_values.py index 20d6a5df..ea15437c 100644 --- a/kmip/core/factories/attribute_values.py +++ b/kmip/core/factories/attribute_values.py @@ -275,11 +275,11 @@ def _create_cryptographic_usage_mask(self, flags): def _create_application_specific_information(self, info): if info: - for k,v in info.items(): - return attributes.ApplicationSpecificInformation( - k, - v - ) + print(info.get("application_namespace")) + return attributes.ApplicationSpecificInformation( + application_namespace=info.get("application_namespace"), + application_data=info.get("application_data") + ) else: return attributes.ApplicationSpecificInformation() diff --git a/kmip/pie/client.py b/kmip/pie/client.py index 92ec1469..1dbdaeab 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -560,16 +560,11 @@ def register(self, managed_object): if hasattr(managed_object, '_application_specific_informations'): if managed_object._application_specific_informations: - for attr in managed_object._application_specific_informations: - app_dict = {} - app_dict[attr] = managed_object._application_specific_informations[attr] - attribute = self.attribute_factory.create_attribute( - name=enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION, - value=app_dict, - index=1 - ) - object_attributes.append(attribute) - + attribute = self.attribute_factory.create_attribute( + enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION, + managed_object._application_specific_informations + ) + object_attributes.append(attribute) template = cobjects.TemplateAttribute(attributes=object_attributes) object_type = managed_object.object_type # Register the managed object and handle the results diff --git a/kmip/tests/integration/services/test_proxykmipclient.py b/kmip/tests/integration/services/test_proxykmipclient.py index 62d7988c..fbc13da0 100644 --- a/kmip/tests/integration/services/test_proxykmipclient.py +++ b/kmip/tests/integration/services/test_proxykmipclient.py @@ -198,16 +198,37 @@ def test_register_app_specific_get(self): (b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E' b'\x0F'), app_specific_info={ - 'application_namespace': 'Testing', - 'application_data': 'Testing2' - } + 'application_namespace': 'Testing', + 'application_data': 'Testing2' + } ) key_id = self.client.register(key) - result = self.client.get(key_id) - app_specific_info = result.app_specific_info + attribute_list = self.client.get_attribute_list(key_id) + self.assertIn('Application Specific Information', attribute_list) + result_id, attribute_list = self.client.get_attributes( + uid=key_id, + attribute_names=['Application Specific Information'] + ) + self.assertEqual(key_id, result_id) + self.assertEqual(1, len(attribute_list)) + + attribute = attribute_list[0] + self.assertEqual( + 'Application Specific Information', + attribute.attribute_name.value + ) + print(attribute.attribute_value) + self.assertEqual( + 'Testing', + attribute.attribute_value.application_namespace + ) + self.assertEqual( + 'Testing2', + attribute.attribute_value.application_data + ) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) self.client.destroy(key_id) - def test_asymmetric_key_pair_create_get_destroy(self): """ @@ -514,6 +535,63 @@ def test_secret_data_register_get_destroy(self): exceptions.KmipOperationFailure, self.client.get, uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.destroy, uid) + + def test_secret_data_register_get_destroy_app_specific(self): + """ + Test that the ProxyKmipClient can register, retrieve, and destroy a + secret with the app specific info field. + """ + # Secret encoding obtained from Section 3.1.5 of the KMIP 1.1 test + # documentation. + secret = objects.SecretData( + b'\x53\x65\x63\x72\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64', + enums.SecretDataType.PASSWORD, + app_specific_info={ + 'application_namespace': 'Testing', + 'application_data': 'Testing2' + } + ) + + uid = self.client.register(secret) + self.assertIsInstance(uid, six.string_types) + + try: + result = self.client.get(uid) + self.assertIsInstance(result, objects.SecretData) + self.assertEqual( + result, secret, "expected {0}\nobserved {1}".format( + result, secret)) + attribute_list = self.client.get_attribute_list(uid) + self.assertIn('Application Specific Information', attribute_list) + result_id, attribute_list = self.client.get_attributes( + uid=uid, + attribute_names=['Application Specific Information'] + ) + self.assertEqual(uid, result_id) + self.assertEqual(1, len(attribute_list)) + + attribute = attribute_list[0] + self.assertEqual( + 'Application Specific Information', + attribute.attribute_name.value + ) + print(attribute.attribute_value) + self.assertEqual( + 'Testing', + attribute.attribute_value.application_namespace + ) + self.assertEqual( + 'Testing2', + attribute.attribute_value.application_data + ) + + finally: + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) + self.client.destroy(uid) + self.assertRaises( + exceptions.KmipOperationFailure, self.client.get, uid) + self.assertRaises( + exceptions.KmipOperationFailure, self.client.destroy, uid) def test_opaque_object_register_get_destroy(self): """ From 5920dca210d761a0cdaac1dfc8cea90e67f531f8 Mon Sep 17 00:00:00 2001 From: Grace Lombardi Date: Thu, 14 Jul 2022 10:06:48 -0400 Subject: [PATCH 12/62] Removed uneeded important and code cleanup --- kmip/core/factories/attribute_values.py | 2 -- kmip/pie/client.py | 1 - 2 files changed, 3 deletions(-) diff --git a/kmip/core/factories/attribute_values.py b/kmip/core/factories/attribute_values.py index ea15437c..4a1c4a59 100644 --- a/kmip/core/factories/attribute_values.py +++ b/kmip/core/factories/attribute_values.py @@ -17,7 +17,6 @@ from kmip.core import enums from kmip.core import primitives from kmip.core import utils -import json class AttributeValueFactory(object): @@ -275,7 +274,6 @@ def _create_cryptographic_usage_mask(self, flags): def _create_application_specific_information(self, info): if info: - print(info.get("application_namespace")) return attributes.ApplicationSpecificInformation( application_namespace=info.get("application_namespace"), application_data=info.get("application_data") diff --git a/kmip/pie/client.py b/kmip/pie/client.py index 1dbdaeab..d87b8922 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -25,7 +25,6 @@ from kmip.core.attributes import CryptographicParameters from kmip.core.attributes import DerivationParameters - from kmip.core.messages import payloads from kmip.pie import exceptions From 6bf55b98f539eb8f980ea95ec961f971c10b1978 Mon Sep 17 00:00:00 2001 From: Grace Lombardi Date: Thu, 14 Jul 2022 10:16:56 -0400 Subject: [PATCH 13/62] Added app_specific_info to init comments --- kmip/pie/objects.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 882a95e0..588aef51 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -674,6 +674,8 @@ def __init__(self, algorithm, length, value, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. + app_specific_info(dict): A dictionary containing application_namespace and application_data. + Optional, defaults to None. """ super(SymmetricKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -842,6 +844,8 @@ def __init__(self, algorithm, length, value, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. + app_specific_info(dict): A dictionary containing application_namespace and application_data. + Optional, defaults to None. """ super(PublicKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -1009,6 +1013,8 @@ def __init__(self, algorithm, length, value, format_type, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. + app_specific_info(dict): A dictionary containing application_namespace and application_data. + Optional, defaults to None. """ super(PrivateKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -1600,6 +1606,8 @@ def __init__(self, value, data_type, masks=None, name='Secret Data', app_specifi masks(list): A list of CryptographicUsageMask enumerations defining how the key will be used. name(string): The string name of the key. + app_specific_info(dict): A dictionary containing application_namespace and application_data. + Optional, defaults to None. """ super(SecretData, self).__init__() From 0a3e39143f541775a4f8d0c6398069c4b412f24b Mon Sep 17 00:00:00 2001 From: Grace Lombardi Date: Mon, 18 Jul 2022 08:45:20 -0400 Subject: [PATCH 14/62] Updated app specific info to be a list of dictionaries, removed unneeded sudo in run.sh, updated server.conf to remove db, updated tests and comments to reflect app specific info being a list --- .travis/run.sh | 12 ++-- .travis/server.conf | 1 - kmip/pie/client.py | 12 ++-- kmip/pie/objects.py | 8 +-- .../services/test_proxykmipclient.py | 66 ++++++++++++++----- 5 files changed, 67 insertions(+), 32 deletions(-) diff --git a/.travis/run.sh b/.travis/run.sh index fd17850d..c20338a5 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -14,8 +14,8 @@ if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then sudo cp ./.travis/policy.json /etc/pykmip/policies/policy.json sudo mkdir -p /var/log/pykmip sudo chmod 777 /var/log/pykmip - sudo python3 ./bin/run_server.py & - sudo tox -e integration -- --config client + python3 ./bin/run_server.py & + tox -e integration -- --config client elif [[ "${RUN_INTEGRATION_TESTS}" == "2" ]]; then # Set up the SLUGS instance cp -r ./.travis/functional/slugs /tmp/ @@ -23,14 +23,14 @@ elif [[ "${RUN_INTEGRATION_TESTS}" == "2" ]]; then # Set up the PyKMIP server cp -r ./.travis/functional/pykmip /tmp/ - sudo python3 ./bin/create_certificates.py + python3 ./bin/create_certificates.py mv *.pem /tmp/pykmip/certs/ sudo mkdir -p /var/log/pykmip sudo chmod 777 /var/log/pykmip - sudo pykmip-server -f /tmp/pykmip/server.conf -l /tmp/pykmip/server.log & + pykmip-server -f /tmp/pykmip/server.conf -l /tmp/pykmip/server.log & # Run the functional tests - sudo tox -e functional -- --config-file /tmp/pykmip/client.conf + tox -e functional -- --config-file /tmp/pykmip/client.conf else - sudo tox + tox fi diff --git a/.travis/server.conf b/.travis/server.conf index 5988b422..a162ca2b 100644 --- a/.travis/server.conf +++ b/.travis/server.conf @@ -7,4 +7,3 @@ ca_path=/etc/pykmip/certs/cert.pem auth_suite=TLS1.2 enable_tls_client_auth=False policy_path=/etc/pykmip/policies/ -database_path=/tmp/pykmip.db diff --git a/kmip/pie/client.py b/kmip/pie/client.py index d87b8922..d27ad4b1 100644 --- a/kmip/pie/client.py +++ b/kmip/pie/client.py @@ -559,11 +559,13 @@ def register(self, managed_object): if hasattr(managed_object, '_application_specific_informations'): if managed_object._application_specific_informations: - attribute = self.attribute_factory.create_attribute( - enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION, - managed_object._application_specific_informations - ) - object_attributes.append(attribute) + for info in managed_object._application_specific_informations: + attribute = self.attribute_factory.create_attribute( + enums.AttributeType.APPLICATION_SPECIFIC_INFORMATION, + info, + index=0 + ) + object_attributes.append(attribute) template = cobjects.TemplateAttribute(attributes=object_attributes) object_type = managed_object.object_type # Register the managed object and handle the results diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 588aef51..9c14616b 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -674,7 +674,7 @@ def __init__(self, algorithm, length, value, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(dict): A dictionary containing application_namespace and application_data. + app_specific_info(list): A list of dictionaries containing application_namespace and application_data. Optional, defaults to None. """ super(SymmetricKey, self).__init__( @@ -844,7 +844,7 @@ def __init__(self, algorithm, length, value, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(dict): A dictionary containing application_namespace and application_data. + app_specific_info(list): A list of dictionaries containing application_namespace and application_data. Optional, defaults to None. """ super(PublicKey, self).__init__( @@ -1013,7 +1013,7 @@ def __init__(self, algorithm, length, value, format_type, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(dict): A dictionary containing application_namespace and application_data. + app_specific_info(list): A list of dictionaries containing application_namespace and application_data. Optional, defaults to None. """ super(PrivateKey, self).__init__( @@ -1606,7 +1606,7 @@ def __init__(self, value, data_type, masks=None, name='Secret Data', app_specifi masks(list): A list of CryptographicUsageMask enumerations defining how the key will be used. name(string): The string name of the key. - app_specific_info(dict): A dictionary containing application_namespace and application_data. + app_specific_info(list): A list of dictionaries containing application_namespace and application_data. Optional, defaults to None. """ super(SecretData, self).__init__() diff --git a/kmip/tests/integration/services/test_proxykmipclient.py b/kmip/tests/integration/services/test_proxykmipclient.py index fbc13da0..f36c8c45 100644 --- a/kmip/tests/integration/services/test_proxykmipclient.py +++ b/kmip/tests/integration/services/test_proxykmipclient.py @@ -39,10 +39,8 @@ def tearDown(self): uuids = self.client.locate() for uuid in uuids: - try: - self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uuid) - finally: - self.client.destroy(uid=uuid) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uuid) + self.client.destroy(uid=uuid) def test_symmetric_key_create_get_destroy(self): """ @@ -197,10 +195,16 @@ def test_register_app_specific_get(self): 128, (b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E' b'\x0F'), - app_specific_info={ - 'application_namespace': 'Testing', - 'application_data': 'Testing2' - } + app_specific_info=[ + { + 'application_namespace': 'Testing', + 'application_data': 'Testing2' + }, + { + 'application_namespace': 'Testing3', + 'application_data': 'Testing4' + } + ] ) key_id = self.client.register(key) attribute_list = self.client.get_attribute_list(key_id) @@ -210,14 +214,12 @@ def test_register_app_specific_get(self): attribute_names=['Application Specific Information'] ) self.assertEqual(key_id, result_id) - self.assertEqual(1, len(attribute_list)) attribute = attribute_list[0] self.assertEqual( 'Application Specific Information', attribute.attribute_name.value ) - print(attribute.attribute_value) self.assertEqual( 'Testing', attribute.attribute_value.application_namespace @@ -227,6 +229,20 @@ def test_register_app_specific_get(self): attribute.attribute_value.application_data ) + attribute2 = attribute_list[1] + self.assertEqual( + 'Application Specific Information', + attribute2.attribute_name.value + ) + self.assertEqual( + 'Testing3', + attribute2.attribute_value.application_namespace + ) + self.assertEqual( + 'Testing4', + attribute2.attribute_value.application_data + ) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) self.client.destroy(key_id) @@ -546,10 +562,16 @@ def test_secret_data_register_get_destroy_app_specific(self): secret = objects.SecretData( b'\x53\x65\x63\x72\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64', enums.SecretDataType.PASSWORD, - app_specific_info={ - 'application_namespace': 'Testing', - 'application_data': 'Testing2' - } + app_specific_info=[ + { + 'application_namespace': 'Testing', + 'application_data': 'Testing2' + }, + { + 'application_namespace': 'Testing3', + 'application_data': 'Testing4' + } + ] ) uid = self.client.register(secret) @@ -568,14 +590,12 @@ def test_secret_data_register_get_destroy_app_specific(self): attribute_names=['Application Specific Information'] ) self.assertEqual(uid, result_id) - self.assertEqual(1, len(attribute_list)) attribute = attribute_list[0] self.assertEqual( 'Application Specific Information', attribute.attribute_name.value ) - print(attribute.attribute_value) self.assertEqual( 'Testing', attribute.attribute_value.application_namespace @@ -585,6 +605,20 @@ def test_secret_data_register_get_destroy_app_specific(self): attribute.attribute_value.application_data ) + attribute2 = attribute_list[1] + self.assertEqual( + 'Application Specific Information', + attribute2.attribute_name.value + ) + self.assertEqual( + 'Testing3', + attribute2.attribute_value.application_namespace + ) + self.assertEqual( + 'Testing4', + attribute2.attribute_value.application_data + ) + finally: self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, uid) self.client.destroy(uid) From 652d5cab67dbc28c96af4eb4ed8bcf2b47c95e12 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 26 Jan 2023 13:07:54 +0100 Subject: [PATCH 15/62] Add cryptography >= 39.0.0 support The cryptography release 39.0.0 added a new parameter to the backend.load_pem_private_key and backend.load_der_private_key that's required. This patch uses the serialization method to load keys because there the new parameter is optional. https://cryptography.io/en/latest/changelog/#v39-0-0 This patch fixes the tests test_encrypt_decrypt_asymmetric --- kmip/services/server/crypto/engine.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kmip/services/server/crypto/engine.py b/kmip/services/server/crypto/engine.py index 838e1b92..02a1c344 100644 --- a/kmip/services/server/crypto/engine.py +++ b/kmip/services/server/crypto/engine.py @@ -929,18 +929,18 @@ def _decrypt_asymmetric( "decryption.".format(padding_method) ) - backend = default_backend() - try: - private_key = backend.load_der_private_key( + private_key = serialization.load_der_private_key( decryption_key, - None + password=None, + backend=default_backend() ) except Exception: try: - private_key = backend.load_pem_private_key( + private_key = serialization.load_pem_private_key( decryption_key, - None + password=None, + backend=default_backend() ) except Exception: raise exceptions.CryptographicFailure( From a339b97add102d812a9b9eb3c49261c33bf3e18a Mon Sep 17 00:00:00 2001 From: dsmith-qlik <113043123+dsmith-qlik@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:06:44 -0700 Subject: [PATCH 16/62] Update enums.py --- kmip/core/enums.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kmip/core/enums.py b/kmip/core/enums.py index 4195d2be..5118d3ad 100644 --- a/kmip/core/enums.py +++ b/kmip/core/enums.py @@ -127,6 +127,9 @@ class AttributeType(enum.Enum): KEY_VALUE_LOCATION = 'Key Value Location' ORIGINAL_CREATION_DATE = 'Original Creation Date' SENSITIVE = "Sensitive" + ALWAYS_SENSITIVE = 'Always Sensitive' + EXTRACTABLE = 'Extractable' + NEVER_EXTRACTABLE = 'Never Extractable' class AuthenticationSuite(enum.Enum): From 155c05069f5dc40ea9620e8c12c86817a10a5b69 Mon Sep 17 00:00:00 2001 From: dsmith-qlik <113043123+dsmith-qlik@users.noreply.github.com> Date: Mon, 19 Sep 2022 13:08:14 -0700 Subject: [PATCH 17/62] Update attribute_values.py --- kmip/core/factories/attribute_values.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmip/core/factories/attribute_values.py b/kmip/core/factories/attribute_values.py index 4a1c4a59..c2b711e0 100644 --- a/kmip/core/factories/attribute_values.py +++ b/kmip/core/factories/attribute_values.py @@ -106,6 +106,12 @@ def create_attribute_value(self, name, value): return primitives.DateTime(value, enums.Tags.LAST_CHANGE_DATE) elif name is enums.AttributeType.SENSITIVE: return primitives.Boolean(value, enums.Tags.SENSITIVE) + elif name is enums.AttributeType.ALWAYS_SENSITIVE: + return primitives.Boolean(value, enums.Tags.ALWAYS_SENSITIVE) + elif name is enums.AttributeType.EXTRACTABLE: + return primitives.Boolean(value, enums.Tags.EXTRACTABLE) + elif name is enums.AttributeType.NEVER_EXTRACTABLE: + return primitives.Boolean(value, enums.Tags.NEVER_EXTRACTABLE) elif name is enums.AttributeType.CUSTOM_ATTRIBUTE: return attributes.CustomAttribute(value) else: From 263cb346621d2be37526b6a350d60733c08ae32a Mon Sep 17 00:00:00 2001 From: Konstantin Trushin Date: Mon, 27 Mar 2023 18:24:34 +0400 Subject: [PATCH 18/62] Fix source code style to comply with PEP8 --- .../messages/payloads/discover_versions.py | 4 +-- kmip/core/messages/payloads/query.py | 28 ++++++++------- kmip/pie/objects.py | 34 ++++++++++++------- kmip/services/server/crypto/engine.py | 2 +- kmip/services/server/engine.py | 2 +- kmip/services/server/session.py | 2 +- .../services/test_proxykmipclient.py | 17 ++++++---- .../tests/unit/core/messages/test_messages.py | 3 +- kmip/tests/unit/core/test_enums.py | 2 +- 9 files changed, 54 insertions(+), 40 deletions(-) diff --git a/kmip/core/messages/payloads/discover_versions.py b/kmip/core/messages/payloads/discover_versions.py index 8df74a53..92166d5e 100644 --- a/kmip/core/messages/payloads/discover_versions.py +++ b/kmip/core/messages/payloads/discover_versions.py @@ -40,7 +40,7 @@ def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0): ) tstream = BytearrayStream(istream.read(self.length)) - while(self.is_tag_next(enums.Tags.PROTOCOL_VERSION, tstream)): + while (self.is_tag_next(enums.Tags.PROTOCOL_VERSION, tstream)): protocol_version = ProtocolVersion() protocol_version.read(tstream, kmip_version=kmip_version) self.protocol_versions.append(protocol_version) @@ -99,7 +99,7 @@ def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0): ) tstream = BytearrayStream(istream.read(self.length)) - while(self.is_tag_next(enums.Tags.PROTOCOL_VERSION, tstream)): + while (self.is_tag_next(enums.Tags.PROTOCOL_VERSION, tstream)): protocol_version = ProtocolVersion() protocol_version.read(tstream, kmip_version=kmip_version) self.protocol_versions.append(protocol_version) diff --git a/kmip/core/messages/payloads/query.py b/kmip/core/messages/payloads/query.py index 6c3d7bd2..8c65d2e2 100644 --- a/kmip/core/messages/payloads/query.py +++ b/kmip/core/messages/payloads/query.py @@ -105,7 +105,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): local_buffer = utils.BytearrayStream(input_buffer.read(self.length)) query_functions = [] - while(self.is_tag_next(enums.Tags.QUERY_FUNCTION, local_buffer)): + while (self.is_tag_next(enums.Tags.QUERY_FUNCTION, local_buffer)): query_function = primitives.Enumeration( enums.QueryFunction, tag=enums.Tags.QUERY_FUNCTION @@ -709,7 +709,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): local_buffer = utils.BytearrayStream(input_buffer.read(self.length)) operations = [] - while(self.is_tag_next(enums.Tags.OPERATION, local_buffer)): + while (self.is_tag_next(enums.Tags.OPERATION, local_buffer)): operation = primitives.Enumeration( enums.Operation, tag=enums.Tags.OPERATION @@ -719,7 +719,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._operations = operations object_types = [] - while(self.is_tag_next(enums.Tags.OBJECT_TYPE, local_buffer)): + while (self.is_tag_next(enums.Tags.OBJECT_TYPE, local_buffer)): object_type = primitives.Enumeration( enums.ObjectType, tag=enums.Tags.OBJECT_TYPE @@ -747,7 +747,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._server_information = server_information application_namespaces = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.APPLICATION_NAMESPACE, local_buffer ) @@ -761,7 +761,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): if kmip_version >= enums.KMIPVersion.KMIP_1_1: extensions_information = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.EXTENSION_INFORMATION, local_buffer ) @@ -776,7 +776,11 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): if kmip_version >= enums.KMIPVersion.KMIP_1_2: attestation_types = [] - while(self.is_tag_next(enums.Tags.ATTESTATION_TYPE, local_buffer)): + while (self.is_tag_next( + enums.Tags.ATTESTATION_TYPE, + local_buffer + ) + ): attestation_type = primitives.Enumeration( enums.AttestationType, tag=enums.Tags.ATTESTATION_TYPE @@ -787,14 +791,14 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): if kmip_version >= enums.KMIPVersion.KMIP_1_3: rngs_parameters = [] - while(self.is_tag_next(enums.Tags.RNG_PARAMETERS, local_buffer)): + while (self.is_tag_next(enums.Tags.RNG_PARAMETERS, local_buffer)): rng_parameters = objects.RNGParameters() rng_parameters.read(local_buffer, kmip_version=kmip_version) rngs_parameters.append(rng_parameters) self._rng_parameters = rngs_parameters profiles_information = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.PROFILE_INFORMATION, local_buffer ) @@ -808,7 +812,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._profile_information = profiles_information validations_information = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.VALIDATION_INFORMATION, local_buffer ) @@ -822,7 +826,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._validation_information = validations_information capabilities_information = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.CAPABILITY_INFORMATION, local_buffer ) @@ -836,7 +840,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._capability_information = capabilities_information client_registration_methods = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.CLIENT_REGISTRATION_METHOD, local_buffer ) @@ -862,7 +866,7 @@ def read(self, input_buffer, kmip_version=enums.KMIPVersion.KMIP_1_0): self._defaults_information = defaults_information protection_storage_masks = [] - while(self.is_tag_next( + while (self.is_tag_next( enums.Tags.PROTECTION_STORAGE_MASK, local_buffer ) diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 9c14616b..4089ebbb 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -658,7 +658,8 @@ class SymmetricKey(Key): } def __init__(self, algorithm, length, value, masks=None, - name='Symmetric Key', key_wrapping_data=None, app_specific_info=None): + name='Symmetric Key', key_wrapping_data=None, + app_specific_info=None): """ Create a SymmetricKey. @@ -674,8 +675,9 @@ def __init__(self, algorithm, length, value, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(list): A list of dictionaries containing application_namespace and application_data. - Optional, defaults to None. + app_specific_info(list): A list of dictionaries containing + application_namespace and application_data. Optional, defaults + to None. """ super(SymmetricKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -826,7 +828,8 @@ class PublicKey(Key): def __init__(self, algorithm, length, value, format_type=enums.KeyFormatType.X_509, masks=None, - name='Public Key', key_wrapping_data=None, app_specific_info=None): + name='Public Key', key_wrapping_data=None, + app_specific_info=None): """ Create a PublicKey. @@ -844,8 +847,9 @@ def __init__(self, algorithm, length, value, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(list): A list of dictionaries containing application_namespace and application_data. - Optional, defaults to None. + app_specific_info(list): A list of dictionaries containing + application_namespace and application_data. Optional, defaults + to None. """ super(PublicKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -996,7 +1000,8 @@ class PrivateKey(Key): } def __init__(self, algorithm, length, value, format_type, masks=None, - name='Private Key', key_wrapping_data=None, app_specific_info=None): + name='Private Key', key_wrapping_data=None, + app_specific_info=None): """ Create a PrivateKey. @@ -1013,8 +1018,9 @@ def __init__(self, algorithm, length, value, format_type, masks=None, key_wrapping_data(dict): A dictionary containing key wrapping data settings, describing how the key value has been wrapped. Optional, defaults to None. - app_specific_info(list): A list of dictionaries containing application_namespace and application_data. - Optional, defaults to None. + app_specific_info(list): A list of dictionaries containing + application_namespace and application_data. Optional, defaults + to None. """ super(PrivateKey, self).__init__( key_wrapping_data=key_wrapping_data @@ -1595,7 +1601,8 @@ class SecretData(CryptographicObject): 'sqlite_autoincrement': True } - def __init__(self, value, data_type, masks=None, name='Secret Data', app_specific_info=None): + def __init__(self, value, data_type, masks=None, name='Secret Data', + app_specific_info=None): """ Create a SecretData object. @@ -1606,8 +1613,9 @@ def __init__(self, value, data_type, masks=None, name='Secret Data', app_specifi masks(list): A list of CryptographicUsageMask enumerations defining how the key will be used. name(string): The string name of the key. - app_specific_info(list): A list of dictionaries containing application_namespace and application_data. - Optional, defaults to None. + app_specific_info(list): A list of dictionaries containing + application_namespace and application_data. Optional, defaults + to None. """ super(SecretData, self).__init__() @@ -1616,7 +1624,7 @@ def __init__(self, value, data_type, masks=None, name='Secret Data', app_specifi self.value = value self.data_type = data_type self.names = [name] - + if app_specific_info: self._application_specific_informations = app_specific_info diff --git a/kmip/services/server/crypto/engine.py b/kmip/services/server/crypto/engine.py index 02a1c344..e6527e4b 100644 --- a/kmip/services/server/crypto/engine.py +++ b/kmip/services/server/crypto/engine.py @@ -274,7 +274,7 @@ def mac(self, algorithm, key, data): c = cmac.CMAC(cipher_algorithm(key), backend=default_backend()) c.update(data) mac_data = c.finalize() - except Exception as e: + except Exception: raise exceptions.CryptographicFailure( "An error occurred while computing a CMAC. " "See the server log for more information." diff --git a/kmip/services/server/engine.py b/kmip/services/server/engine.py index 4c5ff508..818b414b 100644 --- a/kmip/services/server/engine.py +++ b/kmip/services/server/engine.py @@ -439,7 +439,7 @@ def _get_object_type(self, unique_identifier): ).filter( objects.ManagedObject.unique_identifier == unique_identifier ).one()[0] - except exc.NoResultFound as e: + except exc.NoResultFound: self._logger.warning( "Could not identify object type for object: {0}".format( unique_identifier diff --git a/kmip/services/server/session.py b/kmip/services/server/session.py index 32f369eb..85fba68e 100644 --- a/kmip/services/server/session.py +++ b/kmip/services/server/session.py @@ -107,7 +107,7 @@ def run(self): while True: try: self._handle_message_loop() - except exceptions.ConnectionClosed as e: + except exceptions.ConnectionClosed: break except Exception as e: self._logger.info("Failure handling message loop") diff --git a/kmip/tests/integration/services/test_proxykmipclient.py b/kmip/tests/integration/services/test_proxykmipclient.py index f36c8c45..9af12636 100644 --- a/kmip/tests/integration/services/test_proxykmipclient.py +++ b/kmip/tests/integration/services/test_proxykmipclient.py @@ -103,7 +103,8 @@ def test_create_get_wrapped_destroy(self): self.assertNotEqual(unwrapped_key.value, wrapped_key.value) self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) - self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, wrapping_id) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, + wrapping_id) self.client.destroy(key_id) self.client.destroy(wrapping_id) @@ -184,11 +185,11 @@ def test_register_wrapped_get_destroy(self): ) self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, key_id) self.client.destroy(key_id) - + def test_register_app_specific_get(self): """ - Test that a key with app specifc info can be registered with the server and that its - metadata is retrieved with the get operation. + Test that a key with app specifc info can be registered with the + server and that its metadata is retrieved with the get operation. """ key = objects.SymmetricKey( enums.CryptographicAlgorithm.AES, @@ -275,7 +276,8 @@ def test_asymmetric_key_pair_create_get_destroy(self): enums.CryptographicAlgorithm.RSA) self.assertEqual(private_key.cryptographic_length, 2048) finally: - self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, public_uid) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, + public_uid) self.client.destroy(public_uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, public_uid) @@ -283,7 +285,8 @@ def test_asymmetric_key_pair_create_get_destroy(self): exceptions.KmipOperationFailure, self.client.destroy, public_uid) - self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, private_uid) + self.client.revoke(enums.RevocationReasonCode.KEY_COMPROMISE, + private_uid) self.client.destroy(private_uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.get, private_uid) @@ -551,7 +554,7 @@ def test_secret_data_register_get_destroy(self): exceptions.KmipOperationFailure, self.client.get, uid) self.assertRaises( exceptions.KmipOperationFailure, self.client.destroy, uid) - + def test_secret_data_register_get_destroy_app_specific(self): """ Test that the ProxyKmipClient can register, retrieve, and destroy a diff --git a/kmip/tests/unit/core/messages/test_messages.py b/kmip/tests/unit/core/messages/test_messages.py index 5d62769d..0e3feda1 100644 --- a/kmip/tests/unit/core/messages/test_messages.py +++ b/kmip/tests/unit/core/messages/test_messages.py @@ -1166,8 +1166,7 @@ def test_locate_request_read(self): type(attribute_name))) self.assertEqual('Object Type', attribute_name.value, self.msg.format('attribute name', 'value', - 'Object Type', - attribute_name.value)) + 'Object Type', attribute_name.value)) attribute_value = attribute_a.attribute_value exp_type = attr.Enumeration diff --git a/kmip/tests/unit/core/test_enums.py b/kmip/tests/unit/core/test_enums.py index e6c7198d..9a419309 100644 --- a/kmip/tests/unit/core/test_enums.py +++ b/kmip/tests/unit/core/test_enums.py @@ -174,7 +174,7 @@ def test_convert_attribute_name_to_tag(self): args = ("invalid", ) self.assertRaisesRegex( ValueError, - "Unrecognized attribute name: 'invalid'".format(args[0]), + "Unrecognized attribute name: 'invalid'", enums.convert_attribute_name_to_tag, *args ) From fc5917365b9c539eeb037b9bf5274b6a61c9bd96 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Fri, 23 Jun 2023 09:10:28 -0400 Subject: [PATCH 19/62] check if shared_ciphers() is None before logging --- kmip/services/server/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmip/services/server/session.py b/kmip/services/server/session.py index 85fba68e..545ea9c6 100644 --- a/kmip/services/server/session.py +++ b/kmip/services/server/session.py @@ -127,7 +127,7 @@ def _handle_message_loop(self): ) try: - if hasattr(self._connection, 'shared_ciphers'): + if hasattr(self._connection, 'shared_ciphers') and self._connection.shared_ciphers() is not None: shared_ciphers = self._connection.shared_ciphers() self._logger.debug( "Possible session ciphers: {0}".format(len(shared_ciphers)) From 1a0f63af6108c29cb97a9604ad64765ca1d911b1 Mon Sep 17 00:00:00 2001 From: locula <72814028+locula@users.noreply.github.com> Date: Wed, 14 Jun 2023 11:04:16 -0400 Subject: [PATCH 20/62] add original --- kmip/core/factories/attribute_values.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmip/core/factories/attribute_values.py b/kmip/core/factories/attribute_values.py index c2b711e0..1bc1e208 100644 --- a/kmip/core/factories/attribute_values.py +++ b/kmip/core/factories/attribute_values.py @@ -114,6 +114,8 @@ def create_attribute_value(self, name, value): return primitives.Boolean(value, enums.Tags.NEVER_EXTRACTABLE) elif name is enums.AttributeType.CUSTOM_ATTRIBUTE: return attributes.CustomAttribute(value) + elif name is enums.AttributeType.ORIGINAL_CREATION_DATE: + return primitives.DateTime(value, enums.Tags.ORIGINAL_CREATION_DATE) else: if not isinstance(name, str): raise ValueError('Unrecognized attribute type: ' From 5f34baee0dea5742ceeee99756a0a03edac8f4dd Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Wed, 12 Apr 2023 14:02:28 +0200 Subject: [PATCH 21/62] Do not leak database connections --- kmip/services/server/engine.py | 131 +++++++++++++++++---------------- kmip/version.py | 2 +- 2 files changed, 67 insertions(+), 66 deletions(-) diff --git a/kmip/services/server/engine.py b/kmip/services/server/engine.py index 818b414b..43fdbe93 100644 --- a/kmip/services/server/engine.py +++ b/kmip/services/server/engine.py @@ -355,80 +355,81 @@ def build_error_response(self, version, reason, message): def _process_batch(self, request_batch, batch_handling, batch_order): response_batch = list() - self._data_session = self._data_store_session_factory() + with self._data_store_session_factory() as session: + self._data_session = session - for batch_item in request_batch: - error_occurred = False + for batch_item in request_batch: + error_occurred = False - response_payload = None - result_status = None - result_reason = None - result_message = None + response_payload = None + result_status = None + result_reason = None + result_message = None - operation = batch_item.operation - request_payload = batch_item.request_payload + operation = batch_item.operation + request_payload = batch_item.request_payload - # Process batch item ID. - if len(request_batch) > 1: - if not batch_item.unique_batch_item_id: - raise exceptions.InvalidMessage( - "Batch item ID is undefined." + # Process batch item ID. + if len(request_batch) > 1: + if not batch_item.unique_batch_item_id: + raise exceptions.InvalidMessage( + "Batch item ID is undefined." + ) + + # Process batch message extension. + # TODO (peterhamilton) Add support for message extension handling. + # 1. Extract the vendor identification and criticality indicator. + # 2. If the indicator is True, raise an error. + # 3. If the indicator is False, ignore the extension. + + # Process batch payload. + try: + response_payload = self._process_operation( + operation.value, + request_payload ) - # Process batch message extension. - # TODO (peterhamilton) Add support for message extension handling. - # 1. Extract the vendor identification and criticality indicator. - # 2. If the indicator is True, raise an error. - # 3. If the indicator is False, ignore the extension. - - # Process batch payload. - try: - response_payload = self._process_operation( - operation.value, - request_payload - ) + result_status = enums.ResultStatus.SUCCESS + except exceptions.KmipError as e: + error_occurred = True + result_status = e.status + result_reason = e.reason + result_message = str(e) + except Exception as e: + self._logger.warning( + "Error occurred while processing operation." + ) + self._logger.exception(e) - result_status = enums.ResultStatus.SUCCESS - except exceptions.KmipError as e: - error_occurred = True - result_status = e.status - result_reason = e.reason - result_message = str(e) - except Exception as e: - self._logger.warning( - "Error occurred while processing operation." - ) - self._logger.exception(e) - - error_occurred = True - result_status = enums.ResultStatus.OPERATION_FAILED - result_reason = enums.ResultReason.GENERAL_FAILURE - result_message = ( - "Operation failed. See the server logs for more " - "information." + error_occurred = True + result_status = enums.ResultStatus.OPERATION_FAILED + result_reason = enums.ResultReason.GENERAL_FAILURE + result_message = ( + "Operation failed. See the server logs for more " + "information." + ) + + # Compose operation result. + result_status = contents.ResultStatus(result_status) + if result_reason: + result_reason = contents.ResultReason(result_reason) + if result_message: + result_message = contents.ResultMessage(result_message) + + batch_item = messages.ResponseBatchItem( + operation=batch_item.operation, + unique_batch_item_id=batch_item.unique_batch_item_id, + result_status=result_status, + result_reason=result_reason, + result_message=result_message, + response_payload=response_payload ) + response_batch.append(batch_item) - # Compose operation result. - result_status = contents.ResultStatus(result_status) - if result_reason: - result_reason = contents.ResultReason(result_reason) - if result_message: - result_message = contents.ResultMessage(result_message) - - batch_item = messages.ResponseBatchItem( - operation=batch_item.operation, - unique_batch_item_id=batch_item.unique_batch_item_id, - result_status=result_status, - result_reason=result_reason, - result_message=result_message, - response_payload=response_payload - ) - response_batch.append(batch_item) - - # Handle batch error if necessary. - if error_occurred: - if batch_handling == enums.BatchErrorContinuationOption.STOP: - break + # Handle batch error if necessary. + if error_occurred: + if batch_handling == enums.BatchErrorContinuationOption.STOP: + break return response_batch diff --git a/kmip/version.py b/kmip/version.py index f4e53cd9..7d6667c0 100644 --- a/kmip/version.py +++ b/kmip/version.py @@ -13,4 +13,4 @@ # License for the specific language governing permissions and limitations # under the License. -__version__ = "0.11.0dev1" +__version__ = "0.11.0.dev1" From f0a44b26ce902d8b9c330634d5b3603959edf1d4 Mon Sep 17 00:00:00 2001 From: Litao Xia Date: Fri, 28 Apr 2023 16:01:34 +0800 Subject: [PATCH 22/62] Fix pykmip client error with server_correlation_value issue --- kmip/core/messages/contents.py | 7 +++++++ kmip/core/messages/messages.py | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/kmip/core/messages/contents.py b/kmip/core/messages/contents.py index 2912dbe6..470c4318 100644 --- a/kmip/core/messages/contents.py +++ b/kmip/core/messages/contents.py @@ -506,6 +506,13 @@ def __init__(self): super(MessageExtension, self).__init__(enums.Tags.MESSAGE_EXTENSION) +# 6.19 +class ServerCorrelationValue(TextString): + def __init__(self, value=None): + super(ServerCorrelationValue, self).__init__( + value, enums.Tags.SERVER_CORRELATION_VALUE) + + # 9.1.3.2.2 class KeyCompressionType(Enumeration): diff --git a/kmip/core/messages/messages.py b/kmip/core/messages/messages.py index e2e37cf6..c1b4c6bc 100644 --- a/kmip/core/messages/messages.py +++ b/kmip/core/messages/messages.py @@ -150,12 +150,14 @@ def __init__(self, protocol_version=None, time_stamp=None, batch_count=None, - server_hashed_password=None): + server_hashed_password=None, + server_correlation_value=None): super(ResponseHeader, self).__init__(tag=Tags.RESPONSE_HEADER) self.protocol_version = protocol_version self.time_stamp = time_stamp self.batch_count = batch_count self.server_hashed_password = server_hashed_password + self.server_correlation_value = server_correlation_value self.validate() @@ -204,6 +206,10 @@ def read(self, istream, kmip_version=enums.KMIPVersion.KMIP_1_0): server_hashed_password.read(tstream, kmip_version=kmip_version) self._server_hashed_password = server_hashed_password + if self.is_tag_next(enums.Tags.SERVER_CORRELATION_VALUE, tstream): + self.server_correlation_value = contents.ServerCorrelationValue() + self.server_correlation_value.read(tstream, kmip_version=kmip_version) + self.batch_count = contents.BatchCount() self.batch_count.read(tstream, kmip_version=kmip_version) From 0b63de97ee4afc0bd34674cd83974ca4023ee791 Mon Sep 17 00:00:00 2001 From: arp102 <92389169+arp102@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:35:21 -0400 Subject: [PATCH 23/62] Fix test_mac_with_cryptographic_failure unit test. This test is meant to intentionally trigger an exception in the cryptography library by creating a CMAC with a non-block cipher algorithm, IDEA. That doesn't work any more because IDEA is now treated as a block cipher algorithm. To fix this, we now use the ARC4 algorithm instead, which does trigger the expected exception. --- kmip/services/server/crypto/engine.py | 3 +-- kmip/tests/unit/services/server/crypto/test_engine.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kmip/services/server/crypto/engine.py b/kmip/services/server/crypto/engine.py index e6527e4b..15527701 100644 --- a/kmip/services/server/crypto/engine.py +++ b/kmip/services/server/crypto/engine.py @@ -269,8 +269,7 @@ def mac(self, algorithm, key, data): ) cipher_algorithm = self._symmetric_key_algorithms.get(algorithm) try: - # ARC4 and IDEA algorithms will raise exception as CMAC - # requires block ciphers + # ARC4 and other non-block cipher algorithms will raise TypeError exceptions c = cmac.CMAC(cipher_algorithm(key), backend=default_backend()) c.update(data) mac_data = c.finalize() diff --git a/kmip/tests/unit/services/server/crypto/test_engine.py b/kmip/tests/unit/services/server/crypto/test_engine.py index 4adb222b..edb52832 100644 --- a/kmip/tests/unit/services/server/crypto/test_engine.py +++ b/kmip/tests/unit/services/server/crypto/test_engine.py @@ -247,8 +247,8 @@ def __init__(self): engine = crypto.CryptographyEngine() - # IDEA is not block cipher so cmac should raise exception - args = [enums.CryptographicAlgorithm.IDEA, key, data] + # RC4 is not block cipher so cmac should raise exception + args = [enums.CryptographicAlgorithm.RC4, key, data] self.assertRaises( exceptions.CryptographicFailure, engine.mac, From 111f1e5361a49c5d7e52c4d5bcb5d93506b5d582 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Mon, 31 Jul 2023 17:43:05 -0400 Subject: [PATCH 24/62] Run travis.yml workflow --- .github/workflows/run_travis.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/run_travis.yml diff --git a/.github/workflows/run_travis.yml b/.github/workflows/run_travis.yml new file mode 100644 index 00000000..5a25eebc --- /dev/null +++ b/.github/workflows/run_travis.yml @@ -0,0 +1,21 @@ +name: "Run Travis.yml" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + name: test + runs-on: ubuntu-latest + steps: + - name: Run .travis.yml build script + uses: ktomk/run-travis-yml@v1.8.1 + with: + file: .travis.yml + steps: | + install + script + allow-failure: false \ No newline at end of file From 4c65eb8326bc98496c3e18375bb1a6429d427f67 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Mon, 31 Jul 2023 20:59:12 -0400 Subject: [PATCH 25/62] Changing file path of .travis workflow --- .github/workflows/run_travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_travis.yml b/.github/workflows/run_travis.yml index 5a25eebc..a394dc07 100644 --- a/.github/workflows/run_travis.yml +++ b/.github/workflows/run_travis.yml @@ -14,7 +14,7 @@ jobs: - name: Run .travis.yml build script uses: ktomk/run-travis-yml@v1.8.1 with: - file: .travis.yml + file: ../../.travis.yml steps: | install script From 142ee4f0d0db5489619243444901022f77927156 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Mon, 31 Jul 2023 22:38:21 -0400 Subject: [PATCH 26/62] Added converted git action version of travis.yml --- .github/workflows/.travis.yml | 628 +++++++++++++++++++++++++++++++ .github/workflows/run_travis.yml | 2 +- 2 files changed, 629 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/.travis.yml diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml new file mode 100644 index 00000000..47981950 --- /dev/null +++ b/.github/workflows/.travis.yml @@ -0,0 +1,628 @@ +name: ".travis.yml" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-1: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=0 + build-2: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trusty + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=0 + build-3: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=0 + build-4: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=1 + build-5: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trusty + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=1 + build-6: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=1 + build-7: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=2 + build-8: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trusty + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=2 + build-9: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py27 RUN_INTEGRATION_TESTS=2 + build-10: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - precise + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=0 + build-11: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - trusty + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=0 + build-12: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - xenial + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=0 + build-13: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - precise + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=1 + build-14: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - trusty + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=1 + build-15: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - xenial + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=1 + build-16: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - precise + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=2 + build-17: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - trusty + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=2 + build-18: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.4' + os: + - linux + dist: + - xenial + env: + - TOXENV=py34 RUN_INTEGRATION_TESTS=2 + build-19: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - precise + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=0 + build-20: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - trusty + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=0 + build-21: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - xenial + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=0 + build-22: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - precise + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=1 + build-23: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - trusty + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=1 + build-24: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - xenial + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=1 + build-25: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - precise + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=2 + build-26: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - trusty + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=2 + build-27: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.5' + os: + - linux + dist: + - xenial + env: + - TOXENV=py35 RUN_INTEGRATION_TESTS=2 + build-28: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - precise + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=0 + build-29: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - trusty + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=0 + build-30: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - xenial + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=0 + build-31: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - precise + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=1 + build-32: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - trusty + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=1 + build-33: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - xenial + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=1 + build-34: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - precise + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=2 + build-35: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - trusty + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=2 + build-36: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.6' + os: + - linux + dist: + - xenial + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=2 + # python: 3.7 + # os: linux + # dist: + # - precise + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=0 + # python: 3.7 + # os: linux + # dist: + # - trusty + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=0 + build-37: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py37 RUN_INTEGRATION_TESTS=0 + # python: 3.7 + # os: linux + # dist: precise + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=1 + # python: 3.7 + # os: linux + # dist: + # - trusty + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=1 + build-38: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py36 RUN_INTEGRATION_TESTS=1 + # python: 3.7 + # os: linux + # dist: precise + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=2 + # python: 3.7 + # os: linux + # dist: trusty + # env: TOXENV=py37 RUN_INTEGRATION_TESTS=2 + build-39: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=py37 RUN_INTEGRATION_TESTS=2 + build-40: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 + build-41: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trust + env: + - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 + build-42: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 + build-43: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=bandit RUN_INTEGRATION_TESTS=0 + build-44: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trust + env: + - TOXENV=bandit RUN_INTEGRATION_TESTS=0 + build-45: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=bandit RUN_INTEGRATION_TESTS=0 + build-46: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - precise + env: + - TOXENV=docs RUN_INTEGRATION_TESTS=0 + build-47: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - trust + env: + - TOXENV=docs RUN_INTEGRATION_TESTS=0 + build-48: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=docs RUN_INTEGRATION_TESTS=0 + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov + # if [ -f "/tmp/pykmip/server.log" ]; then cat /tmp/pykmip/server.log; fi + # if [ -f "/tmp/slugs/access.log" ]; then cat /tmp/slugs/access.log; fi + # if [ -f "/tmp/slugs/error.log" ]; then cat /tmp/slugs/error.log; fi + diff --git a/.github/workflows/run_travis.yml b/.github/workflows/run_travis.yml index a394dc07..5a25eebc 100644 --- a/.github/workflows/run_travis.yml +++ b/.github/workflows/run_travis.yml @@ -14,7 +14,7 @@ jobs: - name: Run .travis.yml build script uses: ktomk/run-travis-yml@v1.8.1 with: - file: ../../.travis.yml + file: .travis.yml steps: | install script From 46986498f94d8f7e28dc5df7cd8f873351f79112 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Mon, 31 Jul 2023 23:18:23 -0400 Subject: [PATCH 27/62] .travis.yml build fix --- .github/workflows/.travis.yml | 589 +++++++++++++++++++++++++++++++++- 1 file changed, 575 insertions(+), 14 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 47981950..19718aaa 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -9,6 +9,18 @@ on: jobs: build-1: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -21,6 +33,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=0 build-2: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -33,6 +57,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=0 build-3: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -45,6 +81,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=0 build-4: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -57,6 +105,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=1 build-5: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -69,6 +129,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=1 build-6: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -81,6 +153,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=1 build-7: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -93,6 +177,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=2 build-8: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -105,6 +201,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=2 build-9: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -117,6 +225,18 @@ jobs: - TOXENV=py27 RUN_INTEGRATION_TESTS=2 build-10: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -129,6 +249,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=0 build-11: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -141,6 +273,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=0 build-12: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -153,6 +297,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=0 build-13: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -165,6 +321,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=1 build-14: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -177,6 +345,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=1 build-15: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -189,6 +369,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=1 build-16: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -201,6 +393,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=2 build-17: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -213,6 +417,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=2 build-18: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -225,6 +441,18 @@ jobs: - TOXENV=py34 RUN_INTEGRATION_TESTS=2 build-19: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -237,6 +465,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=0 build-20: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -249,6 +489,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=0 build-21: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -261,6 +513,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=0 build-22: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -273,6 +537,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=1 build-23: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -285,6 +561,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=1 build-24: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -297,6 +585,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=1 build-25: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -309,6 +609,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=2 build-26: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -321,6 +633,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=2 build-27: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -333,6 +657,18 @@ jobs: - TOXENV=py35 RUN_INTEGRATION_TESTS=2 build-28: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -345,6 +681,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=0 build-29: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -357,6 +705,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=0 build-30: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -369,6 +729,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=0 build-31: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -381,6 +753,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=1 build-32: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -393,6 +777,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=1 build-33: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -405,6 +801,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=1 build-34: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -417,6 +825,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=2 build-35: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -429,6 +849,18 @@ jobs: - TOXENV=py36 RUN_INTEGRATION_TESTS=2 build-36: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -451,6 +883,18 @@ jobs: # env: TOXENV=py37 RUN_INTEGRATION_TESTS=0 build-37: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -472,6 +916,18 @@ jobs: # env: TOXENV=py37 RUN_INTEGRATION_TESTS=1 build-38: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -492,6 +948,18 @@ jobs: # env: TOXENV=py37 RUN_INTEGRATION_TESTS=2 build-39: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -504,6 +972,18 @@ jobs: - TOXENV=py37 RUN_INTEGRATION_TESTS=2 build-40: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -516,6 +996,18 @@ jobs: - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 build-41: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -528,6 +1020,18 @@ jobs: - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 build-42: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -540,6 +1044,18 @@ jobs: - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 build-43: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -552,6 +1068,18 @@ jobs: - TOXENV=bandit RUN_INTEGRATION_TESTS=0 build-44: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -564,6 +1092,18 @@ jobs: - TOXENV=bandit RUN_INTEGRATION_TESTS=0 build-45: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -576,6 +1116,18 @@ jobs: - TOXENV=bandit RUN_INTEGRATION_TESTS=0 build-46: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -588,6 +1140,18 @@ jobs: - TOXENV=docs RUN_INTEGRATION_TESTS=0 build-47: runs-on: ubuntu-latest + steps: + - run: pip uninstall -y six + - run: pip install six>=1.11.0 + - run: pip install "more_itertools<=7.2.0" + - run: pip install "tox<=3.14.1" + - run: pip install "PyYAML<=5.2" + - run: pip install bandit + - run: pip install codecov + - run: pip install slugs + - run: python setup.py install + - run: ./.travis/run.sh + - run: codecov strategy: matrix: python-version: @@ -600,16 +1164,6 @@ jobs: - TOXENV=docs RUN_INTEGRATION_TESTS=0 build-48: runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=docs RUN_INTEGRATION_TESTS=0 steps: - run: pip uninstall -y six - run: pip install six>=1.11.0 @@ -622,7 +1176,14 @@ jobs: - run: python setup.py install - run: ./.travis/run.sh - run: codecov - # if [ -f "/tmp/pykmip/server.log" ]; then cat /tmp/pykmip/server.log; fi - # if [ -f "/tmp/slugs/access.log" ]; then cat /tmp/slugs/access.log; fi - # if [ -f "/tmp/slugs/error.log" ]; then cat /tmp/slugs/error.log; fi - + strategy: + matrix: + python-version: + - '2.7' + os: + - linux + dist: + - xenial + env: + - TOXENV=docs RUN_INTEGRATION_TESTS=0 + \ No newline at end of file From a7d035e985adfde38096301cec6dbb5fd6a99d41 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 00:41:10 -0400 Subject: [PATCH 28/62] Directory fix in .travis.yml action --- .github/workflows/.travis.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 19718aaa..457e73a3 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -10,6 +10,7 @@ jobs: build-1: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -34,6 +35,7 @@ jobs: build-2: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -58,6 +60,7 @@ jobs: build-3: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -82,6 +85,7 @@ jobs: build-4: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -106,6 +110,7 @@ jobs: build-5: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -130,6 +135,7 @@ jobs: build-6: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -154,6 +160,7 @@ jobs: build-7: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -178,6 +185,7 @@ jobs: build-8: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -202,6 +210,7 @@ jobs: build-9: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -226,6 +235,7 @@ jobs: build-10: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -250,6 +260,7 @@ jobs: build-11: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -274,6 +285,7 @@ jobs: build-12: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -298,6 +310,7 @@ jobs: build-13: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -322,6 +335,7 @@ jobs: build-14: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -346,6 +360,7 @@ jobs: build-15: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -370,6 +385,7 @@ jobs: build-16: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -394,6 +410,7 @@ jobs: build-17: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -418,6 +435,7 @@ jobs: build-18: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -442,6 +460,7 @@ jobs: build-19: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -466,6 +485,7 @@ jobs: build-20: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -490,6 +510,7 @@ jobs: build-21: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -514,6 +535,7 @@ jobs: build-22: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -538,6 +560,7 @@ jobs: build-23: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -562,6 +585,7 @@ jobs: build-24: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -586,6 +610,7 @@ jobs: build-25: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -610,6 +635,7 @@ jobs: build-26: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -634,6 +660,7 @@ jobs: build-27: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -658,6 +685,7 @@ jobs: build-28: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -682,6 +710,7 @@ jobs: build-29: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -706,6 +735,7 @@ jobs: build-30: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -730,6 +760,7 @@ jobs: build-31: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -754,6 +785,7 @@ jobs: build-32: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -778,6 +810,7 @@ jobs: build-33: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -802,6 +835,7 @@ jobs: build-34: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -826,6 +860,7 @@ jobs: build-35: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -850,6 +885,7 @@ jobs: build-36: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -884,6 +920,7 @@ jobs: build-37: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -917,6 +954,7 @@ jobs: build-38: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -949,6 +987,7 @@ jobs: build-39: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -973,6 +1012,7 @@ jobs: build-40: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -997,6 +1037,7 @@ jobs: build-41: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1021,6 +1062,7 @@ jobs: build-42: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1045,6 +1087,7 @@ jobs: build-43: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1069,6 +1112,7 @@ jobs: build-44: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1093,6 +1137,7 @@ jobs: build-45: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1117,6 +1162,7 @@ jobs: build-46: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1141,6 +1187,7 @@ jobs: build-47: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1165,6 +1212,7 @@ jobs: build-48: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" From 2eb3f784c883c7767e5dbf7d45b380d44ffecae9 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 00:51:53 -0400 Subject: [PATCH 29/62] Permissions fix in .travis.yml action --- .github/workflows/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 457e73a3..b5264920 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -1221,7 +1221,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: python setup.py install --user - run: ./.travis/run.sh - run: codecov strategy: From fd25dda1b82fc6645fb240468b0fe91f7f9f9328 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 01:01:06 -0400 Subject: [PATCH 30/62] Setup virtualenv inside builds in .travis.yml action --- .github/workflows/.travis.yml | 99 ++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index b5264920..94663998 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -36,6 +38,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -61,6 +65,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -86,6 +92,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -111,6 +119,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -136,6 +146,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -161,6 +173,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -186,6 +200,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -211,6 +227,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -236,6 +254,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -261,6 +281,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -286,6 +308,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -311,6 +335,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -336,6 +362,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -361,6 +389,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -386,6 +416,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -411,6 +443,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -436,6 +470,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -461,6 +497,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -486,6 +524,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -511,6 +551,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -536,6 +578,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -561,6 +605,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -586,6 +632,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -611,6 +659,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -636,6 +686,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -661,6 +713,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -686,6 +740,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -711,6 +767,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -736,6 +794,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -761,6 +821,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -786,6 +848,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -811,6 +875,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -836,6 +902,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -861,6 +929,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -886,6 +956,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -921,6 +993,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -955,6 +1029,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -988,6 +1064,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1013,6 +1091,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1038,6 +1118,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1063,6 +1145,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1088,6 +1172,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1113,6 +1199,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1138,6 +1226,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1163,6 +1253,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1188,6 +1280,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1213,6 +1307,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: virtualenv .venv + - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1221,7 +1317,8 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install --user + - run: pip install virtualenv + - run: python setup.py install - run: ./.travis/run.sh - run: codecov strategy: From 059e8c4fb15533b5cf3cfb76a1458938c0343112 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 01:03:16 -0400 Subject: [PATCH 31/62] Add missing virtualenv install for builds in .travis.yml action --- .github/workflows/.travis.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 94663998..35470737 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -38,6 +39,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -65,6 +67,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -92,6 +95,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -119,6 +123,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -146,6 +151,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -173,6 +179,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -200,6 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -227,6 +235,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -254,6 +263,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -281,6 +291,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -308,6 +319,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -335,6 +347,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -362,6 +375,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -389,6 +403,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -416,6 +431,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -443,6 +459,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -470,6 +487,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -497,6 +515,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -524,6 +543,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -551,6 +571,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -578,6 +599,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -605,6 +627,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -632,6 +655,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -659,6 +683,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -686,6 +711,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -713,6 +739,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -740,6 +767,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -767,6 +795,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -794,6 +823,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -821,6 +851,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -848,6 +879,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -875,6 +907,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -902,6 +935,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -929,6 +963,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -956,6 +991,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -993,6 +1029,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1029,6 +1066,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1064,6 +1102,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1091,6 +1130,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1118,6 +1158,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1145,6 +1186,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1172,6 +1214,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1199,6 +1242,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1226,6 +1270,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1253,6 +1298,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1280,6 +1326,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six @@ -1307,6 +1354,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - run: pip install virtualenv - run: virtualenv .venv - run: source .venv/bin/activate - run: pip uninstall -y six From 01b3e54c505a67eb4348c435172c00648ef57b98 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 01:13:19 -0400 Subject: [PATCH 32/62] Backtrack to try using sudo instead for setup in .travis.yml action --- .github/workflows/.travis.yml | 241 +++++++--------------------------- 1 file changed, 48 insertions(+), 193 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 35470737..5ee98bce 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -11,9 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -22,7 +19,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -39,9 +36,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -50,7 +44,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -67,9 +61,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -78,7 +69,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -95,9 +86,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -106,7 +94,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -123,9 +111,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -134,7 +119,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -151,9 +136,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -162,7 +144,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -179,9 +161,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -190,7 +169,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -207,9 +186,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -218,7 +194,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -235,9 +211,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -246,7 +219,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -263,9 +236,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -274,7 +244,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -291,9 +261,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -302,7 +269,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -319,9 +286,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -330,7 +294,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -347,9 +311,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -358,7 +319,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -375,9 +336,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -386,7 +344,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -403,9 +361,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -414,7 +369,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -431,9 +386,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -442,7 +394,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -459,9 +411,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -470,7 +419,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -487,9 +436,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -498,7 +444,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -515,9 +461,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -526,7 +469,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -543,9 +486,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -554,7 +494,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -571,9 +511,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -582,7 +519,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -599,9 +536,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -610,7 +544,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -627,9 +561,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -638,7 +569,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -655,9 +586,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -666,7 +594,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -683,9 +611,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -694,7 +619,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -711,9 +636,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -722,7 +644,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -739,9 +661,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -750,7 +669,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -767,9 +686,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -778,7 +694,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -795,9 +711,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -806,7 +719,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -823,9 +736,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -834,7 +744,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -851,9 +761,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -862,7 +769,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -879,9 +786,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -890,7 +794,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -907,9 +811,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -918,7 +819,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -935,9 +836,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -946,7 +844,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -963,9 +861,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -974,7 +869,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -991,9 +886,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1002,7 +894,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1029,9 +921,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1040,7 +929,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1066,9 +955,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1077,7 +963,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1102,9 +988,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1113,7 +996,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1130,9 +1013,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1141,7 +1021,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1158,9 +1038,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1169,7 +1046,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1186,9 +1063,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1197,7 +1071,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1214,9 +1088,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1225,7 +1096,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1242,9 +1113,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1253,7 +1121,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1270,9 +1138,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1281,7 +1146,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1298,9 +1163,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1309,7 +1171,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1326,9 +1188,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1337,7 +1196,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: @@ -1354,9 +1213,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: pip install virtualenv - - run: virtualenv .venv - - run: source .venv/bin/activate - run: pip uninstall -y six - run: pip install six>=1.11.0 - run: pip install "more_itertools<=7.2.0" @@ -1365,8 +1221,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: pip install virtualenv - - run: python setup.py install + - run: sudo python setup.py install - run: ./.travis/run.sh - run: codecov strategy: From 7339254e52f94490fe44810b8f93871bdc06862f Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 01:16:34 -0400 Subject: [PATCH 33/62] File permissions for run.sh in .travis.yml action --- .github/workflows/.travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 5ee98bce..ca291bd0 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -20,6 +20,7 @@ jobs: - run: pip install codecov - run: pip install slugs - run: sudo python setup.py install + - run: sudo chmod +x ./.travis/run.sh - run: ./.travis/run.sh - run: codecov strategy: From 4041e77693812c724a192d2a490e7485f5a79712 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 01:30:52 -0400 Subject: [PATCH 34/62] Folder permissions for run.sh in .travis.yml action --- .github/workflows/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index ca291bd0..68997317 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -20,7 +20,7 @@ jobs: - run: pip install codecov - run: pip install slugs - run: sudo python setup.py install - - run: sudo chmod +x ./.travis/run.sh + - run: sudo chmod +rwx ./ - run: ./.travis/run.sh - run: codecov strategy: From 8692e346cdd838f5d4677a8b8298b060ef2f0c75 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 15:45:29 -0400 Subject: [PATCH 35/62] Remove setup.py in .travis setup --- .github/workflows/.travis.yml | 97 +++++++++++++++++------------------ 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 68997317..3faba722 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -19,8 +19,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install - - run: sudo chmod +rwx ./ + - run: ./.travis/run.sh - run: codecov strategy: @@ -45,7 +44,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -70,7 +69,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -95,7 +94,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -120,7 +119,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -145,7 +144,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -170,7 +169,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -195,7 +194,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -220,7 +219,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -245,7 +244,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -270,7 +269,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -295,7 +294,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -320,7 +319,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -345,7 +344,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -370,7 +369,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -395,7 +394,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -420,7 +419,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -445,7 +444,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -470,7 +469,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -495,7 +494,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -520,7 +519,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -545,7 +544,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -570,7 +569,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -595,7 +594,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -620,7 +619,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -645,7 +644,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -670,7 +669,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -695,7 +694,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -720,7 +719,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -745,7 +744,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -770,7 +769,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -795,7 +794,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -820,7 +819,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -845,7 +844,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -870,7 +869,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -895,7 +894,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -930,7 +929,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -964,7 +963,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -997,7 +996,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1022,7 +1021,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1047,7 +1046,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1072,7 +1071,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1097,7 +1096,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1122,7 +1121,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1147,7 +1146,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1172,7 +1171,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1197,7 +1196,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: @@ -1222,7 +1221,7 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: sudo python setup.py install + - run: ./.travis/run.sh - run: codecov strategy: From ec5f138c437cc9ffdf33aab3a18205d6a1342b55 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 16:10:35 -0400 Subject: [PATCH 36/62] code reduction --- .github/workflows/.travis.yml | 1223 +-------------------------------- 1 file changed, 10 insertions(+), 1213 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 3faba722..c32d8e4f 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -7,8 +7,11 @@ on: branches: [ master ] jobs: - build-1: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }} + env: + TOXENV: ${{ matrix.python-version }} + RUN_INTEGRATION_TESTS: ${{ matrix.test_number }} steps: - uses: actions/checkout@v2 - run: pip uninstall -y six @@ -24,1214 +27,8 @@ jobs: - run: codecov strategy: matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=0 - build-2: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trusty - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=0 - build-3: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=0 - build-4: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=1 - build-5: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trusty - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=1 - build-6: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=1 - build-7: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=2 - build-8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trusty - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=2 - build-9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py27 RUN_INTEGRATION_TESTS=2 - build-10: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - precise - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=0 - build-11: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - trusty - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=0 - build-12: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - xenial - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=0 - build-13: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - precise - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=1 - build-14: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - trusty - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=1 - build-15: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - xenial - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=1 - build-16: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - precise - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=2 - build-17: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - trusty - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=2 - build-18: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.4' - os: - - linux - dist: - - xenial - env: - - TOXENV=py34 RUN_INTEGRATION_TESTS=2 - build-19: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - precise - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=0 - build-20: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - trusty - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=0 - build-21: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - xenial - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=0 - build-22: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - precise - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=1 - build-23: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - trusty - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=1 - build-24: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - xenial - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=1 - build-25: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - precise - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=2 - build-26: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - trusty - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=2 - build-27: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.5' - os: - - linux - dist: - - xenial - env: - - TOXENV=py35 RUN_INTEGRATION_TESTS=2 - build-28: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - precise - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=0 - build-29: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - trusty - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=0 - build-30: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - xenial - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=0 - build-31: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - precise - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=1 - build-32: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - trusty - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=1 - build-33: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - xenial - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=1 - build-34: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - precise - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=2 - build-35: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - trusty - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=2 - build-36: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.6' - os: - - linux - dist: - - xenial - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=2 - # python: 3.7 - # os: linux - # dist: - # - precise - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=0 - # python: 3.7 - # os: linux - # dist: - # - trusty - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=0 - build-37: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py37 RUN_INTEGRATION_TESTS=0 - # python: 3.7 - # os: linux - # dist: precise - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=1 - # python: 3.7 - # os: linux - # dist: - # - trusty - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=1 - build-38: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py36 RUN_INTEGRATION_TESTS=1 - # python: 3.7 - # os: linux - # dist: precise - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=2 - # python: 3.7 - # os: linux - # dist: trusty - # env: TOXENV=py37 RUN_INTEGRATION_TESTS=2 - build-39: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '3.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=py37 RUN_INTEGRATION_TESTS=2 - build-40: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 - build-41: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trust - env: - - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 - build-42: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=pep8 RUN_INTEGRATION_TESTS=0 - build-43: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=bandit RUN_INTEGRATION_TESTS=0 - build-44: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trust - env: - - TOXENV=bandit RUN_INTEGRATION_TESTS=0 - build-45: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=bandit RUN_INTEGRATION_TESTS=0 - build-46: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - precise - env: - - TOXENV=docs RUN_INTEGRATION_TESTS=0 - build-47: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - trust - env: - - TOXENV=docs RUN_INTEGRATION_TESTS=0 - build-48: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" - - run: pip install bandit - - run: pip install codecov - - run: pip install slugs - - - run: ./.travis/run.sh - - run: codecov - strategy: - matrix: - python-version: - - '2.7' - os: - - linux - dist: - - xenial - env: - - TOXENV=docs RUN_INTEGRATION_TESTS=0 - \ No newline at end of file + python-version: ['27', '34', '35', '36', '37'] + test_number: ['0', '1' , '2'] + os: [ubuntu-12.04, ubuntu-14.04, ubuntu-16.04] + + \ No newline at end of file From 77620f34be914c1805e242954ebe101f58d2dd6c Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 16:32:15 -0400 Subject: [PATCH 37/62] Changing ubuntu image versions --- .github/workflows/.travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index c32d8e4f..84470eb3 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -27,8 +27,8 @@ jobs: - run: codecov strategy: matrix: - python-version: ['27', '34', '35', '36', '37'] + python-version: ['27', '34', '35', '36', '37', '38' ,'39' ,'310', '311'] test_number: ['0', '1' , '2'] - os: [ubuntu-12.04, ubuntu-14.04, ubuntu-16.04] + os: [ubuntu-20.04, ubuntu-22.04] \ No newline at end of file From 8f681ba45788be3e13566384e9c42f5695a3ffd4 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 16:38:45 -0400 Subject: [PATCH 38/62] Changing python versions --- .github/workflows/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 84470eb3..a8a0eb15 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -27,7 +27,7 @@ jobs: - run: codecov strategy: matrix: - python-version: ['27', '34', '35', '36', '37', '38' ,'39' ,'310', '311'] + python-version: ['py27', 'py34', 'py35', 'py36', 'py37', 'pep8', 'bandit'] test_number: ['0', '1' , '2'] os: [ubuntu-20.04, ubuntu-22.04] From 5fbf13fd459f14f78fd01b76d91398463b2f09f2 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 16:57:38 -0400 Subject: [PATCH 39/62] Adding test number conditions --- .github/workflows/.travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index a8a0eb15..fd79580c 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -10,8 +10,8 @@ jobs: build: runs-on: ${{ matrix.os }} env: - TOXENV: ${{ matrix.python-version }} - RUN_INTEGRATION_TESTS: ${{ matrix.test_number }} + TOXENV: ${{ matrix.test }} + RUN_INTEGRATION_TESTS: ${{ (matrix.test == 'bandit' || matrix.test == 'pep8' || matrix.test == 'docs') && '0' || matrix.test_number}} steps: - uses: actions/checkout@v2 - run: pip uninstall -y six @@ -27,7 +27,7 @@ jobs: - run: codecov strategy: matrix: - python-version: ['py27', 'py34', 'py35', 'py36', 'py37', 'pep8', 'bandit'] + test: ['py27', 'py34', 'py35', 'py36', 'py37', 'pep8', 'bandit', 'docs'] test_number: ['0', '1' , '2'] os: [ubuntu-20.04, ubuntu-22.04] From 19c57b257c16768037710257be8e10a24ceb6d19 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 17:09:10 -0400 Subject: [PATCH 40/62] Reformat test number conditions --- .github/workflows/.travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index fd79580c..06e3a3a6 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} env: TOXENV: ${{ matrix.test }} - RUN_INTEGRATION_TESTS: ${{ (matrix.test == 'bandit' || matrix.test == 'pep8' || matrix.test == 'docs') && '0' || matrix.test_number}} + RUN_INTEGRATION_TESTS: ${{ contains(fromJSON('["docs","pep8","bandit"]'), matrix.test) && '0' || matrix.test_number}} steps: - uses: actions/checkout@v2 - run: pip uninstall -y six @@ -27,8 +27,8 @@ jobs: - run: codecov strategy: matrix: - test: ['py27', 'py34', 'py35', 'py36', 'py37', 'pep8', 'bandit', 'docs'] - test_number: ['0', '1' , '2'] + test: ["py27", "py34", "py35", "py36", "py37", "pep8", "bandit", "docs"] + test_number: ["0", "1" , "2"] os: [ubuntu-20.04, ubuntu-22.04] \ No newline at end of file From f7043f7a7258b0d69cca83ec68632ef65686067f Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 17:33:12 -0400 Subject: [PATCH 41/62] test number conditions --- .github/workflows/.travis.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 06e3a3a6..328c7324 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} env: TOXENV: ${{ matrix.test }} - RUN_INTEGRATION_TESTS: ${{ contains(fromJSON('["docs","pep8","bandit"]'), matrix.test) && '0' || matrix.test_number}} + RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} steps: - uses: actions/checkout@v2 - run: pip uninstall -y six @@ -22,13 +22,20 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: ./.travis/run.sh - run: codecov strategy: matrix: - test: ["py27", "py34", "py35", "py36", "py37", "pep8", "bandit", "docs"] + test: ["py27", "py34", "py35", "py36", "py37"] test_number: ["0", "1" , "2"] os: [ubuntu-20.04, ubuntu-22.04] + include: + - test_number: "0" + test: "pep8" + - test_number: "0" + test: "bandit" + - test_number: "0" + test: "docs" + \ No newline at end of file From 11db2e5b85d071b452d5d35f72d3f16cf356829a Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 17:35:09 -0400 Subject: [PATCH 42/62] test number conditions --- .github/workflows/.travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 328c7324..377828ad 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -31,11 +31,11 @@ jobs: os: [ubuntu-20.04, ubuntu-22.04] include: - test_number: "0" - test: "pep8" + test: "pep8" - test_number: "0" - test: "bandit" + test: "bandit" - test_number: "0" - test: "docs" + test: "docs" \ No newline at end of file From 66e7b331c18a267dcecd0f824e655375c1921e4b Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 1 Aug 2023 17:47:28 -0400 Subject: [PATCH 43/62] test reduction --- .github/workflows/.travis.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 377828ad..018ea5f5 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -26,16 +26,6 @@ jobs: - run: codecov strategy: matrix: - test: ["py27", "py34", "py35", "py36", "py37"] - test_number: ["0", "1" , "2"] - os: [ubuntu-20.04, ubuntu-22.04] - include: - - test_number: "0" - test: "pep8" - - test_number: "0" - test: "bandit" - - test_number: "0" - test: "docs" - - - \ No newline at end of file + test: ["py310", "pep8", "bandit", "docs"] + test_number: ["0"] + os: [ubuntu-22.04] \ No newline at end of file From 0fd1e1f27599936a5d5f88452fee5ecc19546081 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 8 Aug 2023 11:05:56 -0400 Subject: [PATCH 44/62] Remove old installs and attempt at doc test fix --- .github/workflows/.travis.yml | 6 +----- docs/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 018ea5f5..662a4b49 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -14,11 +14,7 @@ jobs: RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} steps: - uses: actions/checkout@v2 - - run: pip uninstall -y six - - run: pip install six>=1.11.0 - - run: pip install "more_itertools<=7.2.0" - - run: pip install "tox<=3.14.1" - - run: pip install "PyYAML<=5.2" + - run: pip install "tox" - run: pip install bandit - run: pip install codecov - run: pip install slugs diff --git a/docs/source/conf.py b/docs/source/conf.py index 37e90381..3e713e21 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -64,7 +64,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. From a10215191abf75a468b9c20d709f70b7b97ac22f Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 8 Aug 2023 11:17:03 -0400 Subject: [PATCH 45/62] tox passenv change --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index f7b61c10..bc40ee63 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] -envlist = pep8,py27,py34,py35,py36,py37,bandit,docs +envlist = pep8,py310,bandit,docs [testenv] -passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH +passenv = * deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt From bfa3c018932c7046e94e48aa2f51008bc7066854 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 8 Aug 2023 15:13:43 -0400 Subject: [PATCH 46/62] Extending flake8 test max line length --- kmip/services/server/session.py | 4 +++- tox.ini | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kmip/services/server/session.py b/kmip/services/server/session.py index 545ea9c6..3664d93f 100644 --- a/kmip/services/server/session.py +++ b/kmip/services/server/session.py @@ -127,7 +127,9 @@ def _handle_message_loop(self): ) try: - if hasattr(self._connection, 'shared_ciphers') and self._connection.shared_ciphers() is not None: + if hasattr(self._connection, 'shared_ciphers') \ + and self._connection.shared_ciphers() is not None: + shared_ciphers = self._connection.shared_ciphers() self._logger.debug( "Possible session ciphers: {0}".format(len(shared_ciphers)) diff --git a/tox.ini b/tox.ini index bc40ee63..d2d13de7 100644 --- a/tox.ini +++ b/tox.ini @@ -48,3 +48,4 @@ commands = [flake8] exclude = .git,.tox,dist,rpmbuild,*.egg-info +max-line-length = 88 From 084fbcdb61d88bebfa57e88df347fcdbf977f529 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 15 Aug 2023 16:14:55 -0400 Subject: [PATCH 47/62] Make unit tests use default config --- .github/workflows/.travis.yml | 1 + .github/workflows/run_travis.yml | 21 --------------------- kmip/core/config_helper.py | 2 ++ kmip/services/server/session.py | 3 +-- 4 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/run_travis.yml diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 662a4b49..eef34b8b 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -10,6 +10,7 @@ jobs: build: runs-on: ${{ matrix.os }} env: + UNITTEST: ${{ true }} TOXENV: ${{ matrix.test }} RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} steps: diff --git a/.github/workflows/run_travis.yml b/.github/workflows/run_travis.yml deleted file mode 100644 index 5a25eebc..00000000 --- a/.github/workflows/run_travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Run Travis.yml" - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - test: - name: test - runs-on: ubuntu-latest - steps: - - name: Run .travis.yml build script - uses: ktomk/run-travis-yml@v1.8.1 - with: - file: .travis.yml - steps: | - install - script - allow-failure: false \ No newline at end of file diff --git a/kmip/core/config_helper.py b/kmip/core/config_helper.py index a204666d..a816dcde 100644 --- a/kmip/core/config_helper.py +++ b/kmip/core/config_helper.py @@ -27,6 +27,8 @@ os.path.normpath(os.path.join(FILE_PATH, '../pykmip.conf')), os.path.normpath(os.path.join(FILE_PATH, '../kmipconfig.ini'))] +if os.environ.get("UNITTEST"): + CONFIG_FILE = [] class ConfigHelper(object): NONE_VALUE = 'None' diff --git a/kmip/services/server/session.py b/kmip/services/server/session.py index 3664d93f..2b17ef02 100644 --- a/kmip/services/server/session.py +++ b/kmip/services/server/session.py @@ -128,8 +128,7 @@ def _handle_message_loop(self): try: if hasattr(self._connection, 'shared_ciphers') \ - and self._connection.shared_ciphers() is not None: - + and self._connection.shared_ciphers() is not None: shared_ciphers = self._connection.shared_ciphers() self._logger.debug( "Possible session ciphers: {0}".format(len(shared_ciphers)) From ff69f8509154a6bcb34c219459a3acc17774e18e Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 15 Aug 2023 16:23:23 -0400 Subject: [PATCH 48/62] pep8 fixes --- kmip/core/config_helper.py | 1 + kmip/services/server/crypto/engine.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kmip/core/config_helper.py b/kmip/core/config_helper.py index a816dcde..24c2353b 100644 --- a/kmip/core/config_helper.py +++ b/kmip/core/config_helper.py @@ -30,6 +30,7 @@ if os.environ.get("UNITTEST"): CONFIG_FILE = [] + class ConfigHelper(object): NONE_VALUE = 'None' DEFAULT_HOST = "127.0.0.1" diff --git a/kmip/services/server/crypto/engine.py b/kmip/services/server/crypto/engine.py index 15527701..0821826d 100644 --- a/kmip/services/server/crypto/engine.py +++ b/kmip/services/server/crypto/engine.py @@ -269,7 +269,8 @@ def mac(self, algorithm, key, data): ) cipher_algorithm = self._symmetric_key_algorithms.get(algorithm) try: - # ARC4 and other non-block cipher algorithms will raise TypeError exceptions + # ARC4 and other non-block cipher algorithms will + # raise TypeError exceptions c = cmac.CMAC(cipher_algorithm(key), backend=default_backend()) c.update(data) mac_data = c.finalize() From 483fc6c57f633b6b9345b381798820d3ba779689 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 15 Aug 2023 16:49:54 -0400 Subject: [PATCH 49/62] alternate config unit test fix --- .github/workflows/.travis.yml | 1 - kmip/core/config_helper.py | 3 --- kmip/tests/unit/services/test_kmip_client.py | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index eef34b8b..662a4b49 100644 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -10,7 +10,6 @@ jobs: build: runs-on: ${{ matrix.os }} env: - UNITTEST: ${{ true }} TOXENV: ${{ matrix.test }} RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} steps: diff --git a/kmip/core/config_helper.py b/kmip/core/config_helper.py index 24c2353b..a204666d 100644 --- a/kmip/core/config_helper.py +++ b/kmip/core/config_helper.py @@ -27,9 +27,6 @@ os.path.normpath(os.path.join(FILE_PATH, '../pykmip.conf')), os.path.normpath(os.path.join(FILE_PATH, '../kmipconfig.ini'))] -if os.environ.get("UNITTEST"): - CONFIG_FILE = [] - class ConfigHelper(object): NONE_VALUE = 'None' diff --git a/kmip/tests/unit/services/test_kmip_client.py b/kmip/tests/unit/services/test_kmip_client.py index d2b0f823..fa13a204 100644 --- a/kmip/tests/unit/services/test_kmip_client.py +++ b/kmip/tests/unit/services/test_kmip_client.py @@ -81,7 +81,7 @@ def setUp(self): self.cred_factory = CredentialFactory() self.secret_factory = SecretFactory() - self.client = KMIPProxy() + self.client = KMIPProxy(config_file="/dev/null") KMIP_PORT = 9090 CA_CERTS_PATH = os.path.normpath(os.path.join(os.path.dirname( From ab580ee81387cf96edf6fb1dd13a20b8c8c51eac Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 16:09:48 -0400 Subject: [PATCH 50/62] Adding integration tests to git actions --- .github/workflows/.travis.yml | 5 +++-- .travis/run.sh | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) mode change 100644 => 100755 .github/workflows/.travis.yml diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml old mode 100644 new mode 100755 index 662a4b49..d7e867ee --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -18,10 +18,11 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: ./.travis/run.sh + - run: python3 setup.py install + - run: RUN_INTEGRATION_TESTS=${{ matrix.test_number }} ./.travis/run.sh - run: codecov strategy: matrix: test: ["py310", "pep8", "bandit", "docs"] - test_number: ["0"] + test_number: ["0","1"] os: [ubuntu-22.04] \ No newline at end of file diff --git a/.travis/run.sh b/.travis/run.sh index c20338a5..e4065bd3 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -3,6 +3,9 @@ set -e set -x +pkill -f run_server.py || true +sleep 1 + if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then sudo mkdir -p /etc/pykmip/certs sudo mkdir -p /etc/pykmip/policies @@ -14,6 +17,7 @@ if [[ "${RUN_INTEGRATION_TESTS}" == "1" ]]; then sudo cp ./.travis/policy.json /etc/pykmip/policies/policy.json sudo mkdir -p /var/log/pykmip sudo chmod 777 /var/log/pykmip + sudo chmod -R 777 /etc/pykmip/ python3 ./bin/run_server.py & tox -e integration -- --config client elif [[ "${RUN_INTEGRATION_TESTS}" == "2" ]]; then From 7299fa7305215a1c4fc60c13323f2e86df39d5f2 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 16:12:57 -0400 Subject: [PATCH 51/62] Removing setup.py install for test --- .github/workflows/.travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index d7e867ee..d0ca13e6 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -18,7 +18,6 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs - - run: python3 setup.py install - run: RUN_INTEGRATION_TESTS=${{ matrix.test_number }} ./.travis/run.sh - run: codecov strategy: From 0cf89ebbcbe8294607528b39b43668392b66d9b8 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 16:20:27 -0400 Subject: [PATCH 52/62] Readding setup.py and adding permissions to /usr/local/lib/ --- .github/workflows/.travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index d0ca13e6..26f3b89e 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -18,6 +18,8 @@ jobs: - run: pip install bandit - run: pip install codecov - run: pip install slugs + - run: sudo chmod -R 777 /usr/local/lib/ + - run: python3 setup.py install - run: RUN_INTEGRATION_TESTS=${{ matrix.test_number }} ./.travis/run.sh - run: codecov strategy: From 6130e18cf161800e72c37039a701b77c862fe834 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 16:46:05 -0400 Subject: [PATCH 53/62] Update git actions to node16 runtime --- .github/workflows/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 26f3b89e..69c32f47 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -13,7 +13,7 @@ jobs: TOXENV: ${{ matrix.test }} RUN_INTEGRATION_TESTS: ${{ matrix.test_number}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: pip install "tox" - run: pip install bandit - run: pip install codecov From 8783e881befb44d97e33751f0e3998417c285a2d Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 17:04:47 -0400 Subject: [PATCH 54/62] Adding ubuntu20 and extra python versions to git actions --- .github/workflows/.travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 69c32f47..8cd340c7 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -24,6 +24,6 @@ jobs: - run: codecov strategy: matrix: - test: ["py310", "pep8", "bandit", "docs"] + test: ["py38", "py39", "py310", "py311", "pep8", "bandit", "docs"] test_number: ["0","1"] - os: [ubuntu-22.04] \ No newline at end of file + os: [ubuntu-22.04,ubuntu-20.04] \ No newline at end of file From d275a68d3f326b59233f7f3fce59124e1adf4df7 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 17:32:31 -0400 Subject: [PATCH 55/62] (tox.ini): Forgot to add python versions to tox envlist --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d2d13de7..8d90f53b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,py310,bandit,docs +envlist = pep8,py38,py39,py310,py311,bandit,docs [testenv] passenv = * From 8800e0b641d465d509afeb22db6b71319f68a9cf Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 17:38:55 -0400 Subject: [PATCH 56/62] Test fix --- .github/workflows/.travis.yml | 9 +++++++-- tox.ini | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index 8cd340c7..bf289481 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -24,6 +24,11 @@ jobs: - run: codecov strategy: matrix: - test: ["py38", "py39", "py310", "py311", "pep8", "bandit", "docs"] + test: ["pep8", "bandit", "docs"] test_number: ["0","1"] - os: [ubuntu-22.04,ubuntu-20.04] \ No newline at end of file + os: [ubuntu-22.04,ubuntu-20.04] + include: + - test: "py38" + os: ubuntu-20.04 + - test: "py310" + os: ubuntu-22.04 \ No newline at end of file diff --git a/tox.ini b/tox.ini index 8d90f53b..31cb52fd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,py38,py39,py310,py311,bandit,docs +envlist = pep8,py38,py310,bandit,docs [testenv] passenv = * From 4f8b3161e3bdd9588d3614bacc427e4b752b5516 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 22 Aug 2023 17:47:29 -0400 Subject: [PATCH 57/62] Fix to include integration tests for py builds --- .github/workflows/.travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/.travis.yml b/.github/workflows/.travis.yml index bf289481..5e3875d3 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/.travis.yml @@ -29,6 +29,14 @@ jobs: os: [ubuntu-22.04,ubuntu-20.04] include: - test: "py38" + test_number: "0" os: ubuntu-20.04 + - test: "py38" + test_number: "1" + os: ubuntu-20.04 + - test: "py310" + test_number: "0" + os: ubuntu-22.04 - test: "py310" + test_number: "1" os: ubuntu-22.04 \ No newline at end of file From e9a63e26594ffff4f2dbcf03ffdece1879798e5d Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 29 Aug 2023 15:08:09 -0400 Subject: [PATCH 58/62] Actions file name change and fixes --- .github/workflows/{.travis.yml => tox.yml} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename .github/workflows/{.travis.yml => tox.yml} (89%) diff --git a/.github/workflows/.travis.yml b/.github/workflows/tox.yml similarity index 89% rename from .github/workflows/.travis.yml rename to .github/workflows/tox.yml index 5e3875d3..678e1952 100755 --- a/.github/workflows/.travis.yml +++ b/.github/workflows/tox.yml @@ -1,4 +1,4 @@ -name: ".travis.yml" +name: "tox.yml" on: push: @@ -20,12 +20,11 @@ jobs: - run: pip install slugs - run: sudo chmod -R 777 /usr/local/lib/ - run: python3 setup.py install - - run: RUN_INTEGRATION_TESTS=${{ matrix.test_number }} ./.travis/run.sh + - run: ./.travis/run.sh - run: codecov strategy: matrix: test: ["pep8", "bandit", "docs"] - test_number: ["0","1"] os: [ubuntu-22.04,ubuntu-20.04] include: - test: "py38" From a664187bc46e875b6d3926a6ab9d166884441951 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 29 Aug 2023 15:13:53 -0400 Subject: [PATCH 59/62] Fix code syntax and docs --- kmip/services/server/crypto/engine.py | 3 +-- kmip/services/server/session.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kmip/services/server/crypto/engine.py b/kmip/services/server/crypto/engine.py index 0821826d..3c6534a6 100644 --- a/kmip/services/server/crypto/engine.py +++ b/kmip/services/server/crypto/engine.py @@ -269,8 +269,7 @@ def mac(self, algorithm, key, data): ) cipher_algorithm = self._symmetric_key_algorithms.get(algorithm) try: - # ARC4 and other non-block cipher algorithms will - # raise TypeError exceptions + # ARC4 and other non-block cipher algorithm will raise TypeError c = cmac.CMAC(cipher_algorithm(key), backend=default_backend()) c.update(data) mac_data = c.finalize() diff --git a/kmip/services/server/session.py b/kmip/services/server/session.py index 2b17ef02..c6a5f70c 100644 --- a/kmip/services/server/session.py +++ b/kmip/services/server/session.py @@ -127,8 +127,8 @@ def _handle_message_loop(self): ) try: - if hasattr(self._connection, 'shared_ciphers') \ - and self._connection.shared_ciphers() is not None: + if (hasattr(self._connection, 'shared_ciphers') + and self._connection.shared_ciphers() is not None): shared_ciphers = self._connection.shared_ciphers() self._logger.debug( "Possible session ciphers: {0}".format(len(shared_ciphers)) From 400c29bc4f0674c0eb7bf8e265991a966ac2c8f0 Mon Sep 17 00:00:00 2001 From: justin-h-loi Date: Tue, 29 Aug 2023 16:19:16 -0400 Subject: [PATCH 60/62] Removing bandit/pyaml version requirements --- kmip/services/server/auth/slugs.py | 4 ++-- kmip/tests/unit/services/server/auth/test_slugs.py | 4 ++-- test-requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kmip/services/server/auth/slugs.py b/kmip/services/server/auth/slugs.py index 0bf15e22..5046313a 100644 --- a/kmip/services/server/auth/slugs.py +++ b/kmip/services/server/auth/slugs.py @@ -88,7 +88,7 @@ def authenticate(self, ) try: - response = requests.get(self.users_url.format(user_id)) + response = requests.get(self.users_url.format(user_id), timeout=10) except Exception: raise exceptions.ConfigurationError( "A connection could not be established using the SLUGS URL." @@ -98,7 +98,7 @@ def authenticate(self, "Unrecognized user ID: {}".format(user_id) ) - response = requests.get(self.groups_url.format(user_id)) + response = requests.get(self.groups_url.format(user_id), timeout=10) if response.status_code == 404: raise exceptions.PermissionDenied( "Group information could not be retrieved for user ID: " diff --git a/kmip/tests/unit/services/server/auth/test_slugs.py b/kmip/tests/unit/services/server/auth/test_slugs.py index 51f56771..49fa0c99 100644 --- a/kmip/tests/unit/services/server/auth/test_slugs.py +++ b/kmip/tests/unit/services/server/auth/test_slugs.py @@ -137,10 +137,10 @@ def test_authenticate(self, mock_get_client_identity, mock_request_get): mock_get_client_identity.assert_called_once_with("test") mock_request_get.assert_any_call( - "http://127.0.0.1:8080/test/slugs/users/John Doe" + "http://127.0.0.1:8080/test/slugs/users/John Doe", timeout=10 ) mock_request_get.assert_any_call( - "http://127.0.0.1:8080/test/slugs/users/John Doe/groups" + "http://127.0.0.1:8080/test/slugs/users/John Doe/groups", timeout=10 ) self.assertEqual(('John Doe', ['Group A', 'Group B']), result) diff --git a/test-requirements.txt b/test-requirements.txt index e85409b8..1ab6197d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,5 +6,5 @@ fixtures mock slugs sphinx -PyYAML<=5.2 -bandit==1.5.1 +PyYAML +bandit From 848f88da229f68d189551972a1b4d73fba4fc4ec Mon Sep 17 00:00:00 2001 From: Ken Bassford Date: Fri, 16 Oct 2020 17:38:58 +0000 Subject: [PATCH 61/62] fixed SymmetricKey __repr__ --- kmip/pie/objects.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kmip/pie/objects.py b/kmip/pie/objects.py index 4089ebbb..a0b2172e 100644 --- a/kmip/pie/objects.py +++ b/kmip/pie/objects.py @@ -754,14 +754,18 @@ def __repr__(self): algorithm = "algorithm={0}".format(self.cryptographic_algorithm) length = "length={0}".format(self.cryptographic_length) value = "value={0}".format(binascii.hexlify(self.value)) + masks = "masks={0}".format(self.cryptographic_usage_masks) + names = "names={0}".format(self.names) key_wrapping_data = "key_wrapping_data={0}".format( self.key_wrapping_data ) - return "SymmetricKey({0}, {1}, {2}, {3})".format( + return "SymmetricKey({0}, {1}, {2}, {3}, {4}, {5})".format( algorithm, length, value, + masks, + names, key_wrapping_data ) From e6b32b2a7587171afc301010a32e12a5b2321dda Mon Sep 17 00:00:00 2001 From: arp102 <92389169+arp102@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:24:24 -0400 Subject: [PATCH 62/62] Update unit test - changed SymmetricKey repr. --- kmip/tests/unit/pie/objects/test_symmetric_key.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kmip/tests/unit/pie/objects/test_symmetric_key.py b/kmip/tests/unit/pie/objects/test_symmetric_key.py index f0c7ebad..548c535f 100644 --- a/kmip/tests/unit/pie/objects/test_symmetric_key.py +++ b/kmip/tests/unit/pie/objects/test_symmetric_key.py @@ -184,11 +184,13 @@ def test_repr(self): self.bytes_128a ) - args = "{0}, {1}, {2}, {3}".format( + args = "{0}, {1}, {2}, {3}, {4}, {5}".format( "algorithm={0}".format(enums.CryptographicAlgorithm.AES), "length={0}".format(128), "value={0}".format(binascii.hexlify(self.bytes_128a)), - "key_wrapping_data={0}".format({}) + "masks={0}".format([]), + "names={0}".format(['Symmetric Key']), + "key_wrapping_data={0}".format({}), ) expected = "SymmetricKey({0})".format(args) observed = repr(key)