jayvdb created this task. jayvdb claimed this task. jayvdb added a subscriber: XZise. jayvdb added a project: pywikibot-core. jayvdb changed Security from none to none.
TASK DESCRIPTION We should replace our ipaddress detection library with the python ipaddress library, however it has some minor problems which we may want to have fixed first.
[[http://bugs.python.org/issue22282]]
TASK DETAIL https://phabricator.wikimedia.org/T76286
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: pywikipedia-bugs, XZise, jayvdb
jayvdb moved this task to Upstream issues on the pywikibot-core workboard.
TASK DETAIL https://phabricator.wikimedia.org/T76286
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb Cc: pywikipedia-bugs, XZise, jayvdb
XZise added a subscriber: jayvdb. XZise added a comment.
For more information see @jayvdb's upload: https://gerrit.wikimedia.org/r/#/c/155698/
As discussed in the comments, we still need to fix the remaining issues for ourselves even if it's get backported to Python 3.3 as others might use Python versions prior to that.
On the other hand the invalid but accepted IPv6 addresses are really corner cases so I don't think we require the fix for productive purposes but the test suite only. If someone has a problem in the future that module they should update their Python version as it's broken (similar to the Unicode normalization bug).
TASK DETAIL https://phabricator.wikimedia.org/T76286
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
To: jayvdb, XZise Cc: pywikipedia-bugs, XZise, jayvdb
Ricordisamoa added a subscriber: Ricordisamoa.
TASK DETAIL https://phabricator.wikimedia.org/T76286
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, Ricordisamoa Cc: pywikipedia-bugs, XZise, jayvdb, Ricordisamoa
gerritbot added a subscriber: gerritbot. gerritbot added a project: Patch-For-Review. gerritbot added a comment.
Change 155698 had a related patch set uploaded (by John Vandenberg): Use ipaddress module if installed
https://gerrit.wikimedia.org/r/155698
https://phabricator.wikimedia.org/tag/patch-for-review/
TASK DETAIL https://phabricator.wikimedia.org/T76286
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, gerritbot Cc: gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
Multichill added a subscriber: Multichill. Multichill added a comment.
Our primary python version is still 2.x. This patch shouldn't throw (tons of) warnings when running on Python 2.x without the (buggy) python ipaddress library installed.
TASK DETAIL https://phabricator.wikimedia.org/T76286
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, Multichill Cc: Multichill, gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
jayvdb added a comment.
In https://phabricator.wikimedia.org/T76286#1039867, @Multichill wrote:
Our primary python version is still 2.x. This patch shouldn't throw (tons of) warnings when running on Python 2.x ...
The current patch is ready for review; it uses DeprecationWarning which are not shown by default.
Python 2.x without the (buggy) python ipaddress library installed.
The bugs in the Python 2 library are the same that exist in the Python 3 library, which have been reported upstream and received no response from python devs so far. Note that the bug does not reject valid IP addresses - i.e. any IP address which is an IP address will be detected as an IP address.
The only **known** potential for a regression is that a user called "1111:2222:3333:4444:5555:6666:00.00.00.00" could be considered an IP address instead of a user, and AFAIK the MW title algorithm doesnt allow colon (:) in usernames so that isnt a problem.
If you can see any potential for actual regressions, please raise them.
TASK DETAIL https://phabricator.wikimedia.org/T76286
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: Multichill, gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
XZise added a comment.
It is also using the regex if no module is installed so for Python 2 users there will be no difference.
And what John said: The module works almost exactly like the regex. The only difference is that it allows leading zeros in the IPv4 part of an IPv6 address. Those could be interpreted as octal numbers so it is disallowed to avoid ambiguity. And after that is fixed, the chance that Python 2 users will have it sooner is higher as they are using the backport (so all versions are fixed and it's not like 3.4.2 which will still have that problem).
TASK DETAIL https://phabricator.wikimedia.org/T76286
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, XZise Cc: Multichill, gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
gerritbot added a comment.
Change 155698 merged by jenkins-bot: Use ipaddress module if installed
https://gerrit.wikimedia.org/r/155698
TASK DETAIL https://phabricator.wikimedia.org/T76286
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, gerritbot Cc: Multichill, gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
jayvdb closed this task as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T76286
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: Multichill, gerritbot, jayvdb, Ricordisamoa, XZise, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org