-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(tests): Remove walrus operator for Python 3.7 compatiblity #18205
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18205 +/- ##
==========================================
- Coverage 66.05% 65.86% -0.19%
==========================================
Files 1591 1591
Lines 62418 62418
Branches 6286 6286
==========================================
- Hits 41228 41113 -115
- Misses 19568 19683 +115
Partials 1622 1622
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@ad-m |
@ofekisr when Superset dropped support for Python 3.7? I see more indication about support Python 3.7 compatibility i codebase eg.: Line 19 in 568b8e1
Line 73 in 568b8e1
Discussion in #16889 mentions switching CI to Python 3.8 (mostly), but keeping support for the last 3 versions of Python. Python v3.10 is not supported yet. |
What is your take on that @villebro ? I thought we switch to 3.8 and 3.9 |
Thank you for presenting these doubts. This looks python versions supported are a project-wide issue that goes far beyond the scope of this PR of a few line changes. I have the impression that comments under pull requests on GitHub are not a permanent and long-term solution to achieve a consensus and a clear policy in this regard. A mature project such as Apache Superset must have a clear policy of supported Python versions to provide users with a secure plan for the necessary updates. I will open discussions on this on the dev@ list so that all interested parties can share their views known so that we can reach a real consensus instead of relying on an "unwritten agreement". |
@amitmiran137 @ofekisr as long as |
I am ok to move to 3.8. I use Python 3.7, because that's how I setup the project as a supported Python version. I have noticed a strange behavior of the project after rebase (see my comment at https://github.com/apache/superset/pull/17530/files#r793833184 also), which indicates that code incompatible with Python 3.7 is leaking into this project, which has unexpected effects for me. I started gathering facts for a mailing list message... In SIP-57 we indicated that breaking changes mean: "Any changes that are version bumps in Python that would require users to upgrade their systems. We currently support the last three minor versions of Python.". The same document gives guidelines about announcing deprecations to users: "The changelog should contain information about features that are deprecated, and clearly notate when it is going to be permanently removed.". I am unable to find in In my opinion, the user contract resulting from semantic versioning (mainly the values for the entire community) requires us to fix support for Python 3.7 (I will be happy to help with this in terms of my knowledge of the project), then we released the patch version, which restores Python 3.7 support for end-users (I do not know if 1.4.0 and earlier has real support for Python 3.7) and carried out the Python 3.7 deprecation process as defined in SIP-57. In this case, Python 3.7 could be dropped sometime after Python 3.10 support was added to maintain support for the three Python releases as claimed in SIP-57. |
Merging this to unblock Python 3.7 support. I will follow-up with a PR to officially deprecate support for 3.7 as per the announcement on the dev list. |
SUMMARY
A new feature called assignment expressions has been added to Python v3.8. A new syntactical operator— “The Walrus Operator” is part of it. The syntax of it is not backward compatible.
The minimum Python version supported by Apache Superset is 3.7, so we can not use any v3.8+ non-backward compatible features of Python.
superset/setup.py
Lines 172 to 176 in 568b8e1
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
That code was introduced 9 days ago on master via #18060. PR was created by @ofekisr and accepted by @amitmiran137. Could you take a look here?