jayvdb added a subscriber: Multichill.
jayvdb added a comment.
If we are going to not call `unicodedata.normalize`, without implementing a
(inefficient and difficult) "normalise every title using the API", the
alternative is to add a simple precaution to prevent use of `Link` with titles
which would cause issue 10254.
It seems this is possible with a broad check to see if the title contains any
combining character, like so
>>> if PYTHON_VERSION == (2, 6, 6) and any(unicodedata.combining(c) for c in
title):
... raise UnicodeEncodeError('%s contains combining characters, which are
not supported on Python 2.6.6' % title)
@multichill, would this be acceptable to you?
TASK DETAIL
https://phabricator.wikimedia.org/T102461
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Multichill, XZise, Ricordisamoa, gerritbot, Aklapper, jayvdb,
pywikibot-bugs-list, Anshoe, Malyacko, P.Copp
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs