Fix Code generation and Types to be compatible with Python 3.11+
Please answer these questions before submitting your pull requests. Thanks!
-
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes: Not in Jira
-
Fill out the following pre-review checklist:
- [ ] I am adding a new automated test(s) to verify correctness of my new code
- [ ] I am adding new logging messages
- [ ] I am adding a new telemetry message
- [ ] I am adding new credentials
- [ ] I am adding a new dependency
- [x] I am fixing code generator on Python 3.11
- [x] I am adding source code compatibility with Python 3.11
-
Please describe how your code solves the related issue.
I'm using this project as third-party library to in my project. This project runs on Python 3.10, Python 3.11. The only one feature I'm use is generate SQL queries to request data from Snowflake, but project team doesn't support Python 3.9+. To improve my build quality I started run unit tests, but one or two of them failed. The issue is in new Python 3.11 commands flow who discovered the error in the extract_func_global_refs method. I rewrote it with the correct logic. Additionally I send you patch to fix source codes incompatibility with Python 3.11
P.S.: All unit tests passed with Python 3.9, Python 3.10, Python 3.11.
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
recheck
@sfc-gh-aling can you review this one please