Currently, when users attempt to authenticate to Superset using OAuth or BotPassword credentials, Pywikibot enters an HTTP redirect loop without clear error messaging. This creates a poor user experience and makes hard to understand why login fails.
Proposed Solution:
Add explicit error handling and user-friendly error messages in pywikibot.data.superset.SupersetQuery login() to detect when OAuth or BotPassword authentication is being used and inform users that these methods are not supported for Superset authentication.
Example error message:
Error: Superset authentication does not support OAuth or BotPassword. Please use standard username/password authentication in user-config.py: usernames["meta"]["meta"] = "WIKIMEDIA_USERNAME"
Code Review Requirements:
For the patch to pass Pywikibot code review, please ensure:
- Follow Gerrit guidelines:
- Manual:Pywikibot/Gerrit - For_developers
- Gerrit: Commit message guidelines
- See also: T407059 (Pywikibot contribution howto documentation)
- Code quality:
- Patch must follow the Pywikibot style guide
- No flake8 errors or warnings
- Commit message must follow style guidelines
- Testing:
- Added error handling must include unit tests
- Tests should verify proper error detection and messaging for OAuth/BotPassword scenarios