You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "fitzee (via GitHub)" <gi...@apache.org> on 2026/07/15 00:07:23 UTC
[PR] fix(migration): use sqlalchemy.orm.declarative_base to avoid MovedIn20Warning [superset]
fitzee opened a new pull request, #42056:
URL: https://github.com/apache/superset/pull/42056
### SUMMARY
The migration added in #41591 imported `declarative_base` from the deprecated `sqlalchemy.ext.declarative` path. SQLAlchemy 1.4 moved it to `sqlalchemy.orm.declarative_base` and emits `MovedIn20Warning` on the old path.
The migration file is imported at pytest collection time by its unit test, which means any test run with warnings-as-errors fails at collection — blocking unrelated PRs (e.g. #42052).
One-line fix: update the import to the canonical `sqlalchemy.orm` path.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
### TESTING INSTRUCTIONS
1. `pytest tests/unit_tests/migrations/test_strip_metricsqlexpressions_from_ag_grid_params.py` — should pass with no `MovedIn20Warning`
2. Confirm no `sqlalchemy.exc.MovedIn20Warning` at collection time
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(migration): use sqlalchemy.orm.declarative_base to avoid MovedIn20Warning [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42056:
URL: https://github.com/apache/superset/pull/42056#issuecomment-4975344730
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42056?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.20%. Comparing base ([`d68e84e`](https://app.codecov.io/gh/apache/superset/commit/d68e84e7315049325a47270777d35adaeb32b6bb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ad0cfb6`](https://app.codecov.io/gh/apache/superset/commit/ad0cfb60050b5d6931b888cfb9f6ce3648690c65?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (d68e84e) and HEAD (ad0cfb6). Click for more details.
>
> <details><summary>HEAD has 22 uploads less than BASE</summary>
>
>| Flag | BASE (d68e84e) | HEAD (ad0cfb6) |
>|------|------|------|
>|hive|4|1|
>|python|18|2|
>|presto|4|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #42056 +/- ##
==========================================
- Coverage 64.49% 56.20% -8.30%
==========================================
Files 2747 2747
Lines 153843 153843
Branches 35268 35268
==========================================
- Hits 99221 86460 -12761
- Misses 52712 66554 +13842
+ Partials 1910 829 -1081
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.06% <ø> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.04% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.10% <ø> (-17.06%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/42056/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42056?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(migration): use sqlalchemy.orm.declarative_base to avoid MovedIn20Warning [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42056:
URL: https://github.com/apache/superset/pull/42056#issuecomment-4975308975
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(migration): use sqlalchemy.orm.declarative_base to avoid MovedIn20Warning [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #42056:
URL: https://github.com/apache/superset/pull/42056
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org