https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
Web browser: --- Bug ID: 57602 Summary: pywikibot.Site.protect does not exist Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: valhallasw@arctus.nl Classification: Unclassified Mobile Platform: ---
There is no protect functionality in core yet!
valhallasw@lisilwen:~/src/pwb/pywikibot-core$ python pwb.py protect -links:User:Valhallasw/linkpage -site:test -family:test Processing page User:Valhallasw Do you want to change the protection level of [[test:User:Valhallasw]]? ([Y]es, [N]o, [A]ll) Y Traceback (most recent call last): File "pwb.py", line 123, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 64, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "scripts/protect.py", line 286, in <module> main() File "scripts/protect.py", line 280, in main bot.run() File "scripts/protect.py", line 137, in run move=self.move) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/__init__.py", line 251, in wrapper return method(*__args, **__kw) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/page.py", line 1417, in protect return self.site.protect(self, edit, move, reason) File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/site.py", line 230, in __getattr__ % (self.__class__.__name__, attr)) AttributeError: APISite instance has no attribute 'protect'
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |56961 Summary|pywikibot.Site.protect does |pywikibot.Site.protect does |not exist |have unit tests
--- Comment #1 from Merlijn van Deen valhallasw@arctus.nl --- This has been implemented by GEOFBOT, but we should add some unit tests. Actual live testing would depend on a real test wiki, though...
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ricordisamoa@openmailbox.or | |g Blocks| |58941
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|General |tests
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal CC| |ladsgroup@gmail.com
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- (In reply to Merlijn van Deen from comment #1)
This has been implemented by GEOFBOT, but we should add some unit tests. Actual live testing would depend on a real test wiki, though...
Why isnt test.wikipedia good enough? Another option is WMF beta labs...?
https://bugzilla.wikimedia.org/show_bug.cgi?id=57602
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on|56961 | Summary|pywikibot.Site.protect does |pywikibot.Site.protect does |have unit tests |not have unit tests
--- Comment #3 from John Mark Vandenberg jayvdb@gmail.com --- The unit test framework has the ability to flag tests as 'write' tests, so they are not run by default.
pywikipedia-bugs@lists.wikimedia.org