-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[ServiceConnector-passwordless] improvements for pkg_resources is deprecated #8833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the extension to version 3.3.4, introduces a helper to detect installed packages, and adjusts imports and release notes accordingly.
- Bump extension version from 3.3.3 to 3.3.4 in setup and config
- Add
is_packaged_installedutility and consume it in credential-free flow - Update
HISTORY.rstwith a new release entry
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Version bumped to 3.3.4 |
| config.py | Version bumped to 3.3.4 |
| _utils.py | Added is_packaged_installed helper |
| _credential_free.py | Imported new helper from _utils.py |
| HISTORY.rst | Added 3.3.4 release notes entry |
Comments suppressed due to low confidence (3)
src/serviceconnector-passwordless/azext_serviceconnector_passwordless/_utils.py:143
- [nitpick] Function name 'is_packaged_installed' is unclear; consider renaming to 'is_package_installed' for grammatical correctness and clarity.
def is_packaged_installed(package_name):
src/serviceconnector-passwordless/azext_serviceconnector_passwordless/_utils.py:143
- Add unit tests for 'is_packaged_installed' to cover both installed and not-installed scenarios and validate error logging paths.
def is_packaged_installed(package_name):
src/serviceconnector-passwordless/HISTORY.rst:7
- [nitpick] The changelog entry for version 3.3.4 is too vague; consider detailing specific improvements and fixes to help users understand what changed.
* Some improvements and issue fixes.
| __import__(package_name) | ||
| return True | ||
| except ImportError: | ||
| return False |
Copilot
AI
Jun 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using 'import' to check package installation, consider using 'importlib.util.find_spec' to avoid executing package code for a simple presence check.
| __import__(package_name) | |
| return True | |
| except ImportError: | |
| return False | |
| from importlib.util import find_spec | |
| return find_spec(package_name) is not None |
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ serviceconnector-passwordless-3.3.4 ] : https://dev.azure.com/msazure/One/_build/results?buildId=126332741&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.Fix Azure/azure-cli#31591