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

Please port to Python3.12 #28194

Closed
tillea opened this issue Jan 15, 2024 · 4 comments
Closed

Please port to Python3.12 #28194

tillea opened this issue Jan 15, 2024 · 4 comments
Assignees
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@tillea
Copy link

tillea commented Jan 15, 2024

Describe the bug

The test suite does not pass when using Python3.12 as it is reported in a Debian bug report. It results in

E       AttributeError: 'TestApplication' object has no attribute 'assertNotEquals'. Did you mean: 'assertNotEqual'?
tests_core/test_application.py:56: AttributeError
E       AttributeError: 'TestApplication' object has no attribute 'assertNotEquals'. Did you mean: 'assertNotEqual'?
tests_core/test_application.py:35: AttributeError
E           AttributeError: 'TestCommandRegistration' object has no attribute 'assertDictContainsSubset'
tests_core/test_command_registration.py:96: AttributeError
E           AttributeError: 'TestCommandRegistration' object has no attribute 'assertDictContainsSubset'
tests_core/test_command_registration.py:564: AttributeError

While fixing the assertNotEquals can be easily fixed with this patch assertDictContainsSubset is not supported any more as you can read in the Python3.12 documentation.
(BTW, the patch is against the Debian packaged version 2.50.0 so not the latest release but it should be pretty easy to adapt sind the replacement is simple.)

Related command

Simply run the test suite under Python3.12.

Errors

E       AttributeError: 'TestApplication' object has no attribute 'assertNotEquals'. Did you mean: 'assertNotEqual'?
tests_core/test_application.py:56: AttributeError
E       AttributeError: 'TestApplication' object has no attribute 'assertNotEquals'. Did you mean: 'assertNotEqual'?
tests_core/test_application.py:35: AttributeError
E           AttributeError: 'TestCommandRegistration' object has no attribute 'assertDictContainsSubset'
tests_core/test_command_registration.py:96: AttributeError
E           AttributeError: 'TestCommandRegistration' object has no attribute 'assertDictContainsSubset'
tests_core/test_command_registration.py:564: AttributeError

Issue script & Debug output

See above

Expected behavior

The unittest should be passed when using Python3.12.

Environment Summary

azure-cli 2.50.0

Additional context

No response

@tillea tillea added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 15, 2024
Copy link

Hi @tillea,

2.50.0 is not the latest Azure CLI(2.56.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Jan 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jan 15, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 15, 2024

Thank you for opening this issue, we will look into it.

@tillea
Copy link
Author

tillea commented Jan 15, 2024

Hi @tillea,

2.50.0 is not the latest Azure CLI(2.56.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

I'm perfectly aware that this is not the latest version. However, I've seeked for the string assertNotEquals inside the Github web interface and found the according hits so I expect the problem to persists even in the latest release.

Kind regards, Andreas.

@yonzhan yonzhan added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Azure CLI Team The command of the issue is owned by Azure CLI team and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Jan 15, 2024
@yonzhan yonzhan added this to the Backlog milestone Jan 15, 2024
@bebound bebound mentioned this issue Jan 16, 2024
4 tasks
@bebound
Copy link
Contributor

bebound commented Jan 16, 2024

3.12 is not supported yet.
I've added this item in #27673

@bebound bebound closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants