From 8e92b3054dc50a376daad944014621cca628bb8d Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Mon, 10 Aug 2020 23:50:12 -0700 Subject: [PATCH 1/2] other fixes --- sdk/eventgrid/azure-eventgrid/MANIFEST.in | 1 + sdk/eventgrid/azure-eventgrid/setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/eventgrid/azure-eventgrid/MANIFEST.in b/sdk/eventgrid/azure-eventgrid/MANIFEST.in index cad40fe06b5f..abba13db8db2 100644 --- a/sdk/eventgrid/azure-eventgrid/MANIFEST.in +++ b/sdk/eventgrid/azure-eventgrid/MANIFEST.in @@ -1,4 +1,5 @@ recursive-include tests *.py *.yaml +recursive-include samples *.py include *.md include azure/__init__.py diff --git a/sdk/eventgrid/azure-eventgrid/setup.py b/sdk/eventgrid/azure-eventgrid/setup.py index 9c3b4b10b03e..294e7b213eca 100644 --- a/sdk/eventgrid/azure-eventgrid/setup.py +++ b/sdk/eventgrid/azure-eventgrid/setup.py @@ -75,6 +75,7 @@ zip_safe=False, packages=find_packages(exclude=[ 'tests', + 'samples', # Exclude packages that will be covered by PEP420 or nspkg 'azure', ]), From 8e5c958308218f5f9ce8dba14bd3e16edeeb0458 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Tue, 11 Aug 2020 00:15:29 -0700 Subject: [PATCH 2/2] p2 compat --- sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py index 417f35384946..89de8b5deaec 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py @@ -36,7 +36,7 @@ "specversion":"1.0" } cloud_storage_string = json.dumps(cloud_storage_dict) -cloud_storage_bytes = bytes(cloud_storage_string, "utf-8") +cloud_storage_bytes = cloud_storage_string.encode("utf-8") # custom cloud event cloud_custom_dict = { @@ -48,7 +48,7 @@ "specversion":"1.0" } cloud_custom_string = json.dumps(cloud_custom_dict) -cloud_custom_bytes = bytes(cloud_custom_string, "utf-8") +cloud_custom_bytes = cloud_custom_string.encode("utf-8") # storage eg event eg_storage_dict = { @@ -74,7 +74,7 @@ } eg_storage_string = json.dumps(eg_storage_dict) -eg_storage_bytes = bytes(eg_storage_string, "utf-8") +eg_storage_bytes = eg_storage_string.encode("utf-8") # custom eg event eg_custom_dict = { @@ -88,7 +88,7 @@ "topic":"/subscriptions/f8aa80ae-d1c8-60ad-9bce-e1a850ba5b67/resourceGroups/sample-resource-group-test/providers/Microsoft.EventGrid/topics/egtopicsamplesub" } eg_custom_string = json.dumps(eg_custom_dict) -eg_custom_bytes = bytes(eg_custom_string, "utf-8") +eg_custom_bytes = eg_custom_string.encode("utf-8") class EventGridConsumerTests(AzureMgmtTestCase):