Page MenuHomePhabricator

Make pywikibot work with SQL on all platforms and all Python versions supported
Closed, ResolvedPublic

Description

Steps to reproduce

  1. run any script with -mysqlquery or replace.py with -sql parameter

Expected behavior
If the database is live (on Toolforge automatically, at home using replicas from dump), the pagegenerator should retrieve pages according to the query and process them

Current behavior
It throws an error, if you fix it, it throws another one and another one and ... on Windows. On Linux it works, but has some not really good features as listed in subtasks. Also a documentation how to use it should exist. On Python 3.6 it can not install dependencies for sql at all

Event Timeline

What is the error exactly?
I get this:

mpaa@tools-bastion-03:~/core {master}$ python scripts/listpages.py -mysqlquery:"SELECT page_namespace, page_title FROM page WHERE page_namespace = 0 LIMIT 15"
   1 "?"
   2 "A Bruised Reed Shall He Not Break"
   3 "A Family Sketch"
   4 "A Little While"
   5 "A Morris for May-Day"
   6 "Abstinence sows sand all over"
   7 "Amarillis I Did Woo"
   8 "And the sins of the fathers shall be"
   9 "And with what body do they come?" --
  10 "And with what body do they come?" —
  11 "Arcturus" is his other name --
  12 "Arcturus" is his other name —
  13 "As the Coming of Dawn"
  14 "Ave Caesar"
  15 "Back to the Army Again"
15 page(s) found

Well, at least on my Windows it doesn't work at all, stuck on libraries installation. On my Linux (and Toolforge) it works with ton of deps and additional compiler installed and only on some versions of Python in addition. See subtasks for more

Dvorapa renamed this task from Make pywikibot work with SQL again to Make pywikibot work with SQL on all platforms.Feb 12 2018, 11:18 PM
Dvorapa updated the task description. (Show Details)
Dvorapa renamed this task from Make pywikibot work with SQL on all platforms to Make pywikibot work with SQL on all platforms and all Python versions supported.Feb 12 2018, 11:29 PM
Dvorapa updated the task description. (Show Details)

Yeah, and on Python 3.6 it fails to install dependencies on any platform I've tried

Dvorapa assigned this task to Mpaa.

I've tested it after @Mpaa's patch on Toollabs (Debian/Ubuntu) and also on my local machine (Arch Linux) using sql dump and it works for me as expected on both Python 2 and 3. I'm closing this for now, but still waiting for someone who could test it on Windows (and Mac?). Please anyone test it by yourself too and reopen/open new task if any problem occurs.

Dvorapa triaged this task as Medium priority.Jun 16 2018, 8:08 PM
Dvorapa removed a project: TestMe.