MohammadtheEditor created this task.
MohammadtheEditor added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  I have been trying to protect a page according to the documents available 
here 
<https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.html#pywikibot.page.BasePage.protect>.
 As there was no parameter documentations for edit, move, create and upload, I 
had to assume by the default values that the values are going to Boolean.
  However that is not the case, the four arguments mentioned above expect a 
string (a valid protection level as mentioned in the documents)  and therefore 
passing true to the arguments causes a TypeError.
  Here's what I'm going to do:
  
  - Update the documents to involve the mentioned parameters explaining their 
accepted values.
  - Set default values of said arguments to None and change the 
`process_deprecated_arg` function to work with that.
  
  I wanted to share the issue and request for comments, I also suggest adding a 
warning that clearly indicates deprecation of protections as this can only be 
found on the source code.

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

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

To: MohammadtheEditor
Cc: Aklapper, pywikibot-bugs-list, MohammadtheEditor, Viztor, DannyS712, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to