rusackas opened a new pull request, #43466: URL: https://github.com/apache/superset/pull/43466
### SUMMARY `superset/daos/tag.py` imports `current_user_can_modify_object` from `superset.commands.tag.utils`, but that function was relocated to `superset.commands.utils` in #43389, which merged shortly after #43390 added this import. Neither PR could see the other's in-flight change, and there was no textual conflict, so both merged clean. The result: `daos/tag.py` (and everything importing it, including chart/dataset/etc. REST APIs) fails at import time on current `master`. The fix re-points the import at its new home. It's done as a lazy, function-local import rather than a top-level one, since `superset.commands.utils` itself imports `TagDAO` from `superset.daos.tag` — a top-level import in both directions would be circular. Also updates two existing tests in `tests/unit_tests/tags/commands/update_test.py` that patched the old module-level attribute (`superset.daos.tag.current_user_can_modify_object`); with the import now local to the function, the patch target moves to where the function actually lives (`superset.commands.utils.current_user_can_modify_object`). ### TESTING INSTRUCTIONS `pytest tests/unit_tests/tags/ tests/unit_tests/commands/ tests/unit_tests/semantic_layers/ tests/unit_tests/daos/` — 1474 passed. Also verified `create_app()` completes without the prior `ImportError` (confirmed the error reproduces on `master` before this fix, and is gone after). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
