Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
```
C:\pwb\core>pwb.py vm-auto-erl-neu -cc
WARNING: .\scripts\vm-auto-erl-neu.py:560: _NotImplementedWarning: pywikibot.bot
.handleArgs is deprecated.
for arg in pywikibot.handleArgs():
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 77, in emit
if self.shouldRollover(record):
File "C:\Python27\lib\logging\handlers.py", line 156, in shouldRollover
msg = "%s\n" % self.format(record)
File "C:\pwb\core\pywikibot\bot.py", line 121, in format
assert(msg.startswith(record.pathname + ':'))
AssertionError
Logged from file tools.py, line 743
NOTE: option cosmetic_changes is False
########## timestamp: 2015-02-11T13:06:09Z ############```
Anyhow the script is running.
TASK DETAIL
https://phabricator.wikimedia.org/T89233
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
XZise added a comment.
Well my newest version of the patch does by default what you need, but it also could add the missing months if you want it.
TASK DETAIL
https://phabricator.wikimedia.org/T73124
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Xqt, Legoktm, jayvdb, Multichill, XZise, pywikipedia-bugs
Xqt added a comment.
I personally need the first variant 31.03. + 1 month => 30.4. but it could be a good idea to have both possibilities for rounding up and down.
TASK DETAIL
https://phabricator.wikimedia.org/T73124
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Xqt, Legoktm, jayvdb, Multichill, XZise, pywikipedia-bugs
XZise added a comment.
Okay I've got a question: What would be the 31st March + 1 month? Would it be the last day in April or the 1 day in May? Or like PHP which selects the day in the month after that (so 31 May).
This doesn't affect the calculation of the difference however. That would be probably easier than the calculation as you could simply add the month difference and years difference multiplied by 12. So something like:
delta = (date2.month - date1.month) % 12 + (date2.year - date1.year) * 12
return -delta if date2 < date1 else delta
TASK DETAIL
https://phabricator.wikimedia.org/T73124
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Xqt, Legoktm, jayvdb, Multichill, XZise, pywikipedia-bugs
jayvdb added a comment.
@xzise , yes, that is a problem with "any number of users per APISite object" - it means APISite needs logic to determine which account to use when, and IMO that should be done in scripts with the bot operator in control, and not done inside the pywikibot library.
TASK DETAIL
https://phabricator.wikimedia.org/T71283
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: XZise, jayvdb, Ricordisamoa, pywikipedia-bugs
XZise added a subscriber: XZise.
XZise added a comment.
But how should the script know what type of write they need? Maybe there should be a dict in the site which shows which user has which rights and then it selects from a list the first user which has that right.
TASK DETAIL
https://phabricator.wikimedia.org/T71283
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: XZise, jayvdb, Ricordisamoa, pywikipedia-bugs
jayvdb added a comment.
Having two accounts (user & sysop) breaks the 0,1,∞ design principle . https://en.wikipedia.org/wiki/Zero_one_infinity_rule
Either we have one user per APISite object, or any number of users per APISite object.
My preference is only one user per APISite, and the selection of user is done using a user-config variable or -user: command line argument. And if there are scripts which *need* to *write* using two different accounts, which is rare, they would instantiate two different site objects.
TASK DETAIL
https://phabricator.wikimedia.org/T71283
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: jayvdb, Ricordisamoa, pywikipedia-bugs
jayvdb added a project: Pywikibot-network.
jayvdb added a comment.
Hi @evanontario, yes we've had a few other people interested in attempting this task, and doing the microtasks. There are still tasks which do not have good solutions for them, and dont have unit tests, so feel free to participate in code reviews, or build unit tests. However, https://phabricator.wikimedia.org/tag/pywikibot-network/ is also a suitable place to find microtasks for this oauth project.
TASK DETAIL
https://phabricator.wikimedia.org/T74065
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Legoktm, Evanontario, Sitic, Qgil, Ricordisamoa, Halfak, Krinkle, jayvdb, valhallasw, MZMcBride, csteipp, scfc, coren, pywikipedia-bugs
Evanontario added a comment.
Hello,
I plan to attempt this task for Google Summer of Code. I'm just now getting used to the code, getting used to GIT, and gerrit. I have next week off classes so I'll probably put some time into this then, and I'm going to do a little bit today as well. I've also looked over some of the reported bugs for login.py, and looks like some of the easy ones already have patches proposed for them.
TASK DETAIL
https://phabricator.wikimedia.org/T74065
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Evanontario
Cc: Legoktm, Evanontario, Sitic, Qgil, Ricordisamoa, Halfak, Krinkle, jayvdb, valhallasw, MZMcBride, csteipp, scfc, coren, pywikipedia-bugs
XZise added a comment.
Okay the problem is a follows: When getting the redirect target the API returns all redirects along the way. And pywikibot is checking if one redirect along that way is redirecting to an item on that list and throws an exception if that happens.
Now I'm not sure how we should fix that. One way would be only throw that exception what the page redirects to itself. That way scripts would at least get some redirects but those then need to detect that they could get into a loop. Currently a script can't get into a loop, because as soon as that could happen it throws that exception.
A more advanced one (which was PS3 of my patch 182530) would be to differ between immediate and ultimate target. Then it would only throw the exception when the immediate/ultimate (depending on what is requested) target couldn't be reached. The default would be to return the immediate target and there would be the same problem as above. But we could add a special state (e.g. by None) which would be the default and return the immediate target but throw an exception when there is a loop somewhere. Now I mention this in the second option as adding an option to the first idea doesn't really make sense (it would be possible though).
Another uncertainty with that option would be what is going to happen when the software allows double redirects. Do we want to add a third option which returns the target which would be chosen by the software? How would we set that option? The chance is probably low as the software is already aware of multiple redirects so there seems to be no complication with following them. Does someone know if they will never support it or if they haven't got to it?
TASK DETAIL
https://phabricator.wikimedia.org/T85711
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Xqt, Aklapper, XZise, jayvdb, pywikipedia-bugs