Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-Scripts, good first task.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
Restricted Application added a comment.


  Thank you for tagging this task with #good_first_task 
<https://phabricator.wikimedia.org/tag/good_first_task/> for Wikimedia 
newcomers!
  
  Newcomers often may not be aware of things that may seem obvious to seasoned 
contributors, so please take a moment to reflect on how this task might look to 
somebody who has never contributed to Wikimedia projects.
  
  A #good_first_task <https://phabricator.wikimedia.org/tag/good_first_task/> 
is a self-contained, non-controversial task with a clear approach. It should be 
well-described with pointers to help a completely new contributor, for example 
it should clearly point to the codebase URL and provide clear steps to help a 
contributor get set up for success.  We've included some guidelines at 
https://phabricator.wikimedia.org/tag/good_first_task/ !
  
  Thank you for helping us drive new contributions to our projects <3

TASK DESCRIPTION
  **Problem:**
  speedy_delete.py script includes talk pages to be deleted. But user talk 
pages should usually not be deleteted except they have a {{sd}}. The talk pages 
are included by this generator code snippet:
  
    generator = pagegenerators.CategorizedPageGenerator(
        self.csd_cat, start=self.saved_progress)
    # wrap another generator around it so that we won't produce orphaned
    # talk pages.
    generator = pagegenerators.PageWithTalkPageGenerator(generator)
  
  **Solution**
  
  1. remove `PageWithTalkPageGenerator` part
  2. call `page.delete()` with //deletetalk// option, set it to true if 
`page.namespace()` is even but not 2
  3. add a reason for deleting the talk page (don't produce orphaned talk pages)
  
  **Dependency**
  APISite.delete() 
<https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.site.html#pywikibot.site._apisite.APISite.delete>
 should implement the //deletetalk// option for `mw_version < '1.38wmf24'` 
instead of simply showing a warning. (Not part of this talk)
  
  **Further information**
  
  - https://www.mediawiki.org/wiki/Manual:Pywikibot/Development
  - 
https://doc.wikimedia.org/pywikibot/master/scripts_ref/scripts.html#module-scripts.speedy_delete
  - 
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.pagegenerators.html#pagegenerators.PageWithTalkPageGenerator
  - 
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.delete
  - 
https://doc.wikimedia.org/pywikibot/master/_modules/pywikibot/site/_apisite.html#APISite.delete

TASK DETAIL
  https://phabricator.wikimedia.org/T420170

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to