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 a dataclass default is hashable (Python 3.11 compatibility) #6900

Closed
wants to merge 299 commits into from

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)


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.

jddarby and others added 30 commits May 16, 2023 11:00
* Add temporary build workflow for AOSM extension

* Add Releaser to maintain a release with the latest build in a consistent place
Add empty init files to inner modules so setuptools recognises them
Use latest RG model to remove unnecessary dependency on version
Use latest Deployment model to remove unnecessary dependency on version
Update readme with install/bug reporting instructions
Add CNF NFD generation to build command
sunnycarter and others added 24 commits October 9, 2023 12:42
* Validation requirements on helm names

* lint

* markups

* lint
* Lower case ACR names and fix interactive mode for lists

* lint

* remove duplicate else branch
* Regen Python SDK from 2023-09-01 API 
  - also uses latest AutoRest client
  - fix for HybridNetworkManagementClient init signature (swap order of subscription_id and credential parameters)

* Update CLI extension code to use new SDK

* added SAMI to publisher pre deploy

* Update bicep templates to use 2023-09-01

* Update NF templates

* Update metaschema

* Add Allow-Publisher to required feature flags

* Use secure objects for deployment parameters
Correctly get array item types in CNF deployment parameter schemas
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
* moved blob url to vhd config only; untested

* stopped error in post innit before validate

* changed ordering of inputs so that blob and filepath are next to each other; helptext for filepath different for each option

* Markups from sunny

* appease mypy

---------

Co-authored-by: Jordan <jordan.layton@metaswitch.com>
Co-authored-by: Sunny Carter <sunny.carter@metaswitch.com>
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

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

Hi @Cyclam,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@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.

@Cyclam Cyclam closed this Oct 25, 2023
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

10 participants