Since WDQ has been shut down the various WDQ implementations in pywikibot should either be removed (or replaced with a notice explaining what has happened) or rebuilt to make use of the sparql engine instead.
Likely related tasks which might be folded into this one
- T153444: Add deprecation warning when using WDQ in pywikibot
- T135592: WikiDataQuery bulk loads all items in stream/file cache instead of iterating
- T89769: testQueryApiGetter timeout failure
- T159149: testQueryApiGetter is failing with "502 Bad Gateway"
- T135302: wikidataquery_tests.TestApiSlowFunctions.testQueryApiGetter fails for python 3.4