-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
{Misc} Remove some Python 2.7 legacy code #30368
Conversation
️✔️AzureCLI-FullTest
|
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
storage message put | cmd storage message put update parameter content : updated property type from custom_type to string |
||
storage message update | cmd storage message update update parameter content : updated property type from custom_type to string |
Misc |
...e/cli/command_modules/keyvault/vendored_sdks/azure_keyvault_securitydomain/_serialization.py
Outdated
Show resolved
Hide resolved
9b941c7
to
87330fe
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
913f3c3
to
bd45b9f
Compare
@wangzelin007 @jiasli I won't add more to this PR. To summarize better what this PR contains: I fixed some of the warnings from the pyupgrade section from ruff. https://docs.astral.sh/ruff/rules/open-alias/ Apart from that, I have grepped all over the code to remove ImportError for obvious Python 2 libraries; mostly that was This one can also be fixed, but I didn't do so. There are two matches: This one finds a few matches, but pylint doesn't complain since it was fixed. Maybe because those few instances are a bit special. |
@atombrella, first, thanks for the great work. Do you mind creating separate PRs for each change, such as the |
@jiasli :) I've opened some PRs that should be more granular in terms of changes. I'll close this PR. |
Description
Removed a bit of Python 2.7 code that I found by searching for
ImportError
andPython 2.7
.There are still quite a fair pieces of Python 2.7 compatibility around.
sys.version_info
is a good place to start.Note that I also saw a fair chunk of https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow in the code
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.