Skip to content
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

Use default_factory when dataclass defaults are hashable #6901

Conversation

Cyclam
Copy link
Contributor

@Cyclam Cyclam commented Oct 25, 2023

Python 3.11 dataclasses require hashable defaults to use a default_factory.

This PR implements that for the az aosm extension.

Fixes #6426 (comment)

Testing that this resolves all instance of the mutable default is not allowed error to be completed by @yanzhudd, as agreed offline.

Function testing of the extension has been completed using the test suite with live tests.


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az aosm nfd generate-config --definition-type cnf

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)

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.json automatically.
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.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Oct 25, 2023

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 25, 2023

Thank you for your contribution! We will review the pull request and get back to you soon.

@yanzhudd yanzhudd merged commit a21756f into Azure:main Oct 26, 2023
15 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ aosm ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=99986&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants