Skip to content

Add Python tests for newer versions#2149

Closed
tonybaloney wants to merge 13 commits into
microsoft:mainfrom
tonybaloney:patch-2
Closed

Add Python tests for newer versions#2149
tonybaloney wants to merge 13 commits into
microsoft:mainfrom
tonybaloney:patch-2

Conversation

@tonybaloney
Copy link
Copy Markdown
Contributor

@tonybaloney tonybaloney commented Jul 21, 2022

Copy of #2100

@tonybaloney tonybaloney requested a review from squirrelsc as a code owner July 21, 2022 01:16
@squirrelsc
Copy link
Copy Markdown
Contributor

See an error in check tab

The workflow is not valid. .github/workflows/continuous-integration-workflow.yml (Line: 56, Col: 13): Unexpected symbol: '"3'. Located at position 26 within expression: matrix.python-version == "3.8" .github/workflows/continuous-integration-workflow.yml (Line: 60, Col: 13): Unexpected symbol: '"3'. Located at position 26 within expression: matrix.python-version == "3.8"

@tonybaloney tonybaloney requested a review from LiliDeng as a code owner July 21, 2022 04:18
@tonybaloney
Copy link
Copy Markdown
Contributor Author

This PR shows some backward incompatible changes with the way data classes work. It will now raise a ValueError if you set the default value of a field to a mutable type.

This has always been problematic in Python, leading to unexpected behaviours, so the new error is just enforcing something which was always there.

I'll include some changes to the source to use zero-arg lambda's to comply with this without breaking compatibility to older versions of LISA

@squirrelsc
Copy link
Copy Markdown
Contributor

@tonybaloney Thank you for the changes, they are really adding value to LISA. Can you split it to two PRs? One is about more test matrix, another is to fix the mutable types. So we can get the second change merged quicker. And we encourage to create meaningful commit, and rebase to main. So if it's possible, Please try to use "git rebase -i" and "git add/reset -p" to edit each commit, and merge the history in the PR. Thank you again!

@tonybaloney
Copy link
Copy Markdown
Contributor Author

@squirrelsc this is a good idea. 3.11 seems to require more changes, so I will split into 2. One testing up to 3.10 and the other expanding beyond with mutable fields in a factory

@LiliDeng
Copy link
Copy Markdown
Collaborator

@tonybaloney hi, Anthony, any update :)

@LiliDeng
Copy link
Copy Markdown
Collaborator

@tonybaloney it has been long time since your last update, close it for now, feel free to reopen it when you have time to update it, thank you.

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.

3 participants