Skip to content

Use default_factory when dataclass defaults are hashable#6901

Merged
yanzhudd merged 1 commit intoAzure:mainfrom
jddarby:use-default_factory-when-dataclass-defaults-are-hashable
Oct 26, 2023
Merged

Use default_factory when dataclass defaults are hashable#6901
yanzhudd merged 1 commit intoAzure:mainfrom
jddarby:use-default_factory-when-dataclass-defaults-are-hashable

Conversation

@Cyclam
Copy link
Copy Markdown
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
Copy Markdown

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

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

@yonzhan
Copy link
Copy Markdown
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
@azclibot
Copy link
Copy Markdown
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.

5 participants