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

fix: type annotation breaking on py3.9 #28396

Merged
merged 2 commits into from
May 9, 2024

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented May 9, 2024

SUMMARY

A recent change as broke Superset on python 3.9. To my understanding we still support python 3.9 as per https://github.com/apache/superset/blob/master/pyproject.toml#L27

I do think we should run our tests on the minimal python version as well to avoid these issues, but I'm not sure on how to change it on github actions, or we don't set it or we use python-version: ["current", "next"]

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@michael-s-molina
Copy link
Member

michael-s-molina commented May 9, 2024

Thanks for the fix @dpgaspar!

I do think we should run our tests on the minimal python version as well to avoid these issues, but I'm not sure on how to change it on github actions, or we don't set it or we use python-version: ["current", "next"]

That's a fair point. I didn't even notice that we were missing the from __future__ import annotations because neither the tests or pre-commit hook complained about it. I believe we'll have many more of these problems if these checks don't catch these types of errors.

@mistercrunch Is it possible to fix this?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 9, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.13%. Comparing base (2e5f3ed) to head (826f6de).
Report is 58 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #28396       +/-   ##
===========================================
+ Coverage   60.49%   83.13%   +22.64%     
===========================================
  Files        1931      521     -1410     
  Lines       76241    37256    -38985     
  Branches     8566        0     -8566     
===========================================
- Hits        46122    30973    -15149     
+ Misses      28015     6283    -21732     
+ Partials     2104        0     -2104     
Flag Coverage Δ
hive ?
javascript ?
mysql 77.20% <100.00%> (?)
postgres 77.32% <100.00%> (?)
presto 53.66% <100.00%> (-0.14%) ⬇️
python 83.13% <100.00%> (+19.64%) ⬆️
sqlite 76.78% <100.00%> (?)
unit 58.35% <100.00%> (+0.72%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 9, 2024
@dpgaspar dpgaspar merged commit b224b83 into apache:master May 9, 2024
29 checks passed
@dpgaspar dpgaspar deleted the fix/annotations branch May 9, 2024 13:44
@mistercrunch
Copy link
Member

#28419 should help prevent this

imancrsrk pushed a commit to imancrsrk/superset that referenced this pull request May 10, 2024
michael-s-molina pushed a commit that referenced this pull request May 13, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 2024
irublev pushed a commit to HighviewPower/superset that referenced this pull request Oct 29, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lgtm This PR has been approved by a maintainer size/XS v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants