valhallasw created this task. valhallasw added subscribers: valhallasw, XZise, jayvdb. valhallasw added a project: pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION @jayvdb added support for datetime in https://github.com/wikimedia/pywikibot-core/commit/9245e04ebe0ff1ebe30addfa8... @xzise added support for bools in https://github.com/wikimedia/pywikibot-core/commit/cadd9615d678728133a934135... but inadvertently broke datetime support there
TASK DETAIL https://phabricator.wikimedia.org/T99450
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw Cc: jayvdb, XZise, valhallasw, Aklapper, pywikipedia-bugs
valhallasw edited the task description. valhallasw set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T99450
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw Cc: jayvdb, XZise, valhallasw, Aklapper, pywikipedia-bugs
valhallasw added a comment.
It's inconsistent now in any case:
__setattr__(..., bytes) -> sets unicode ? __setattr__(..., list(bytes)) -> sets list(bytes)
Also, as far as I can see, passing a string is broken now because list('abc') = ['a', 'b', 'c']...
TASK DETAIL https://phabricator.wikimedia.org/T99450
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: valhallasw Cc: jayvdb, XZise, valhallasw, Aklapper, pywikipedia-bugs
XZise edited the task description.
TASK DETAIL https://phabricator.wikimedia.org/T99450
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, valhallasw, Aklapper, pywikipedia-bugs
XZise added a comment.
I don't know in which commit but previously all items in the params were either bytes or unicode (or that were the types `__setitem__`'s value was expecting). But then it was changed so that each parameter contains a list which was generated by splitting the value along the pipes. And with that it allowed devs to already add lists themselves to allow any type but those weren't modified (it converts only bytes/unicode into the list).
Also `__setitem__` doesn't “convert“ any values anymore with my change but instead now only `_encoded_items` and that is not modifying the dictionary `Request` is using to hold the parameters. So yes the docstring is not up to date but there is a reason behind all of that.
TASK DETAIL https://phabricator.wikimedia.org/T99450
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, valhallasw, Aklapper, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org