jayvdb created this task. jayvdb added a subscriber: jayvdb. jayvdb added a project: Pywikibot-Other-scripts.
TASK DESCRIPTION The ISBN validation data in isbn.py have not been updated since September 2007. The ISBN ranges are updated regularly, meaning the isbn.py script is currently wrong. Rather than keeping this data up to date, the algorithm in isbn.py should be replaced with an external package which provides the same functionality and is py3 compatible, packaged on pypi, and is regularly updated as the ISBN ranges are issued and modified.
There are several such packages on pypi. See https://pypi.python.org/pypi?%3Aaction=search&term=isbn&submit=searc...
The most useful is https://pypi.python.org/pypi/python-stdnum
Also up to date: https://github.com/nekobcn/isbnid
https://pypi.python.org/pypi/isbnlib / https://pypi.python.org/pypi/isbntools
https://pypi.python.org/pypi/isbn_hyphenate
Ideally isbn is able to use whichever library is installed.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a project: Google-Code-in-2014. jayvdb added a comment.
This has been proposed as a https://phabricator.wikimedia.org/tag/google-code-in-2014/ task: http://www.google-melange.com/gci/task/view/google/gci2014/5871428750540800
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: Aklapper, jayvdb, pywikipedia-bugs
jayvdb added a comment.
As the ISBN data in this script is very outdated, I dont see the benefit in keeping it. However, removing the old code/data could become problematic , especially if you dont provide perfect backwards compatibility. So, dont remove it in your changeset, otherwise your changeset might be hit with a -2. If you leave the old code in the file, unmodified, it can still be accessed by other scripts which might depend on it via an import .
If the old code can be easily used as a fallback if no external libraries exist, that would be nice. (but optional if it isnt easy to do)
After your changeset adding support for external libraries, another changeset can then remove all the old code/data, and then it doesnt matter if someone hits it with a -2.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: Aklapper, jayvdb, pywikipedia-bugs
murfel claimed this task.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel Cc: Aklapper, jayvdb, pywikipedia-bugs
gerritbot added a project: Patch-For-Review. gerritbot added a comment.
Change 184225 had a related patch set uploaded (by Murfel): External isbn packages support
https://gerrit.wikimedia.org/r/184225
https://phabricator.wikimedia.org/tag/patch-for-review/
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, gerritbot Cc: Aklapper, jayvdb, pywikipedia-bugs
murfel added a comment.
Given that the script uses a library, it can say for sure whether an isbn is correct and add Template:Please_check_ISBN https://en.wikipedia.org/wiki/Template:Please_check_ISBN or Template:Listed Invalid ISBN https://en.wikipedia.org/wiki/Template:Listed_Invalid_ISBN if it's not, so it's going to be more efficient.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb moved this task to pywikibot on the Google-Code-in-2014 workboard.
TASK DETAIL https://phabricator.wikimedia.org/T85240
WORKBOARD https://phabricator.wikimedia.org/project/board/74/
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: murfel, jayvdb Cc: murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a comment.
IMO {{Listed Invalid ISBN}} https://www.wikidata.org/wiki/Q7611261 should only ever be added by a human, and hopefully a bibliophile, as "listed" means it appeared in print on the physical item if it had a physical item, or nearest equivalent for born-digital items. fwiw, I created that template 8 years ago; how time flies. Interesting to see it now has 650+ uses on en.wp, and has been translated into 14 other languages. ;-)
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: murfel, jayvdb, Aklapper, pywikipedia-bugs
gerritbot added a subscriber: gerritbot. gerritbot added a comment.
Change 184225 merged by jenkins-bot: External isbn packages support
https://gerrit.wikimedia.org/r/184225
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, gerritbot Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a comment.
The next step for this bug is to:
1. add python-stdnum as a dependency in setup.py 2. add tests for cosmetic_changes use of isbn 3. determine what to do with the ISBN rule in fixes.py - i.e. is it useful
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a blocking task: T89996: Add isbn package dependency.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a blocking task: T89998: cosmetic changes has no tests.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a comment.
In https://phabricator.wikimedia.org/T85240#984192, @jayvdb wrote:
The next step for this bug is to:
- add python-stdnum as a dependency in setup.py
Done, as an optional dependency
- add tests for cosmetic_changes use of isbn
Done.
- determine what to do with the ISBN rule in fixes.py - i.e. is it useful
Outstanding.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb removed a project: Patch-For-Review. jayvdb set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T85240
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: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb closed blocking task T89996: Add isbn package dependency as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T85240
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a comment.
Review of ISBN cosmetic_changes vs fixes is https://phabricator.wikimedia.org/tag/easy/.
TASK DETAIL https://phabricator.wikimedia.org/T85240
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, pywikipedia-bugs
jayvdb added a project: Easy.
TASK DETAIL https://phabricator.wikimedia.org/T85240
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: murfel, jayvdb Cc: gerritbot, murfel, jayvdb, Aklapper, 01tonythomas, pywikipedia-bugs
Xqt closed blocking task T89998: cosmetic changes has no tests as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T85240
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: murfel, Xqt Cc: gerritbot, murfel, jayvdb, Aklapper, 01tonythomas, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org