diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py index e8aa542e7ace..2953e453d60a 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py @@ -116,5 +116,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py index 6cd711a6ae7a..927d3fb02456 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py @@ -117,5 +117,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py index 80277195dbe8..ac359ecda61f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py @@ -122,5 +122,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py index 203edf06029a..4e5c642fada5 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py @@ -176,5 +176,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py index 4eaa88fbc3f4..85f3f9e269b7 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py @@ -118,5 +118,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py index b8e8702f8e91..dd708df9a63f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py @@ -164,5 +164,4 @@ async def main(): if __name__ == "__main__": - loop = asyncio.get_event_loop() - loop.run_until_complete(main()) + asyncio.run(main())