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', ]), 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):