Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Remove networking imports outside azure core (#3683)
# Description This pull request removes all networking imports flagged by rule `C4749(networking-import-outside-azure-core-transport)` from [azure-pylint-guidelines-checker](https://github.com/Azure/azure-sdk-tools/tree/2eaf22b95a3a6bbe51380e6efad14c822f1d7d5e/tools/pylint-extensions/azure-pylint-guidelines-checker), and refactors the uses of those imports to do http requests through azure-core. Concretely this pull request: * Adds `src/promptflow-evals/promptflow/evals/_http_utils.py` which includes a sync and async version of azure.core.pipeline.Pipeline that provides a requests-like api for general http requests. * Refactors the sdk and tests to use those pipelines * Removes the dependency on `aiohttp_retry` * Remove both duplicate implementations of `AsyncHTTPClientWithRetry`. ## Background This PR is part of an effort to ready `promptflow-evals` to be migrated to Azure/azure-sdk-for-python. Azure SDKs are disallowed from directly using networking libraries like `requests`, `aiohttp`, etc... They're instead meant to use `azure-core`, which under the hood can delegate to those libraries. # All Promptflow Contribution checklist: - [x] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [x] **I have read the [contribution guidelines](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md).** - [x] **I confirm that all new dependencies are compatible with the MIT license.** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [x] Title of the pull request is clear and informative. - [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [x] Pull request includes test coverage for the included changes.
- Loading branch information