-
Notifications
You must be signed in to change notification settings - Fork 341
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
s3_bucket - fix typing for Python <3.9 #2288
s3_bucket - fix typing for Python <3.9 #2288
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 39s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 03s |
55460c9
into
ansible-collections:main
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #2290 🤖 @patchback |
Fixes: #2287 SUMMARY Support for type hinting generics in standard collections was first added in Python 3.9. We're currently not running the sanity tests against Python 3.7 (including the compilation/import tests), so we missed this. (We currently test 3.9-3.12) Using quay.io/ansible/default-test-container:8.12.0 locally to run the tests against 3.7 I see: (2.7 and 3.6 are skipped because this collection doesn't support them) Running sanity test "import" on Python 2.7 Running sanity test "import" on Python 3.6 Running sanity test "import" on Python 3.7 ERROR: Found 1 import issue(s) on python 3.7 which need to be resolved: ERROR: plugins/modules/s3_bucket.py:571:0: traceback: TypeError: 'type' object is not subscriptable See documentation for help: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/import.html Running sanity test "import" on Python 3.8 ERROR: Found 1 import issue(s) on python 3.8 which need to be resolved: ERROR: plugins/modules/s3_bucket.py:571:0: traceback: TypeError: 'type' object is not subscriptable See documentation for help: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/import.html Running sanity test "import" on Python 3.9 Running sanity test "import" on Python 3.10 Running sanity test "import" on Python 3.11 Running sanity test "import" on Python 3.12 ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_bucket ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis (cherry picked from commit 55460c9)
This is a backport of PR #2288 as merged into main (55460c9). Fixes: #2287 SUMMARY Support for type hinting generics in standard collections was first added in Python 3.9. We're currently not running the sanity tests against Python 3.7 (including the compilation/import tests), so we missed this. (We currently test 3.9-3.12) Using quay.io/ansible/default-test-container:8.12.0 locally to run the tests against 3.7 I see: (2.7 and 3.6 are skipped because this collection doesn't support them) Running sanity test "import" on Python 2.7 Running sanity test "import" on Python 3.6 Running sanity test "import" on Python 3.7 ERROR: Found 1 import issue(s) on python 3.7 which need to be resolved: ERROR: plugins/modules/s3_bucket.py:571:0: traceback: TypeError: 'type' object is not subscriptable See documentation for help: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/import.html Running sanity test "import" on Python 3.8 ERROR: Found 1 import issue(s) on python 3.8 which need to be resolved: ERROR: plugins/modules/s3_bucket.py:571:0: traceback: TypeError: 'type' object is not subscriptable See documentation for help: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/import.html Running sanity test "import" on Python 3.9 Running sanity test "import" on Python 3.10 Running sanity test "import" on Python 3.11 Running sanity test "import" on Python 3.12 ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_bucket ADDITIONAL INFORMATION Reviewed-by: Mark Chappell
Fixes: #2287
SUMMARY
Support for type hinting generics in standard collections was first added in Python 3.9.
We're currently not running the sanity tests against Python 3.7 (including the compilation/import tests), so we missed this. (We currently test 3.9-3.12)
Using
quay.io/ansible/default-test-container:8.12.0
locally to run the tests against 3.7 I see:(2.7 and 3.6 are skipped because this collection doesn't support them)
ISSUE TYPE
COMPONENT NAME
s3_bucket
ADDITIONAL INFORMATION