Repository navigation
Fallback to python3 when running az command - #7469
Robert Fairhead (robertfairhead) wants to merge 21 commits into
Conversation
|
Robert Fairhead (@robertfairhead) This shim that This was why we didn't use For example, 3 runs of that import shows the following times on a MacBook Pro with Intel i7 and SSD: |
|
Derek Bekoe (@derekbekoe) Fair enough on the start up time. I switched to a test in the bash script that checks if That should present no change to the behavior for most users but provide support for those who invoke it as reported in the referenced issues. |
|
Assign this to Willie Xu (@williexu) |
|
This is indeed an idea we should keep exploring. It should have also carefully considered in the broader discussion around what's the long-term plan as we approaching the end of the Python2 lifecycle. Reassign to Willie Xu (@williexu) as I'm moving out of the project. |
Added MacOS example for generating SAS token with expiration time. The call to the date function `date -d` works on Linux, but not on MacOS. I provided MacOS sample.
Updated help text and test location for low priority vmss
|
I cleared the merge conflicts on this PR so it should be ready for review again. If you'd like to go another direction, that's fine. I can close out the PR. I just used this workaround for myself when using the az cli. |
33e9b94 to
fa06642
Compare
|
FWIW, there's https://pypi.org/project/fastentrypoints/ if you want entrypoints-like behavior without the startup time penalty. |
|
Robert Fairhead (@robertfairhead) we are going to investigate some other options but I appreciate you being willing to share what works for you with the project. For now I will close this PR. |
Closes #7367
Closes #1043
This removes the bash script wrapper for the
azcommand that hardcodedpythonas the python executable, breaking the az cli for python3 users.In it's place, it uses distutils entry points to have python create its own shim that chooses the correct python executable based on how it was installed, adding python3 support.
The functionality in `azure-cli/azure/cli/main.py was refactored into a main function there to allow for the entry point to work.
This checklist is used to make sure that common guidelines for a pull request are followed.
[N/A] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.