Xqt added a comment.
> It should leave it as %d or it breaks backwards compatibility. Having %s instead of %d does not break anything because %s can work with any python types whereas %d accepts real numbers only. Having %d instead of %s lead archivebot to fail on a few of small wikis like bn, chk, fa, hi and others for seven years but it would work with %s. With Python 7.5.0 the textlib.to_local_number function was fixed but unfortunately this broke archivebot when having %d variable fields. Therefore a patch was made fix this issue by converting %d to %s because all fields are strings not numbers after textlib.to_local_number changes. With rPWBC5178710 <https://phabricator.wikimedia.org/rPWBC51787100619d32eaa9ce025720d0d93f3e5cc2e1> the 7 years old patch was dropped and few new fields were intoduced. This patch is part of the current master and will be ported to stable release in about 4 weeks. The new fields must use %s formatting whereas the old field can use %d formatting for the number fields. The following table shows what happens for `counter` field and the new `localcounter` field as a sample. Small wikis ----------- Language code: bn, chb fa, gu, hi, km, kn, lo, lo, ml, or, pa, te All numbers are localized with Pywikibot 7.5.1 and below. With Pywikibot 7.6 the `local...` fields must be used instead. | **Pywikibot release** | **%(counter)s** | **%(counter)d** | **%(localcounter)s** | **%(localcounter)d** | | 7.6.0 //master// | {icon check color=green} | {icon check color=green} | {icon check color=green} | {icon check-circle color=yellow} | | 7.5.1 //stable// | {icon check color=green} | {icon check-circle color=yellow} | {icon times color=red} | {icon times color=red} | | 7.5.0 | {icon check color=green} | {icon times color=red} | {icon times color=red} | {icon times color=red} | | 7.4.0 and below | {icon check color=green} | {icon times color=red} | {icon times color=red} | {icon times color=red} | | Other wikis ----------- | **Pywikibot release** | **%(counter)s** | **%(counter)d** | **%(localcounter)s** | **%(localcounter)d** | | 7.6.0 //master// | {icon check color=green} | {icon check color=green} | {icon check color=green} | {icon check-circle color=yellow} | | 7.5.1 //stable// | {icon check color=green} | {icon check-circle color=yellow} | {icon times color=red} | {icon times color=red} | | 7.5.0 | {icon check color=green} | {icon times color=red} | {icon times color=red} | {icon times color=red} | | 7.4.0 and below | {icon check color=green} | {icon check color=green} | {icon times color=red} | {icon times color=red} | | Legend ------ | **icon** | **behavior** | | {icon check color=green} | Bot works | | {icon check-circle color=yellow} | Bot works but templates are changed | | {icon times color=red} | Bot fails | | WARNING: The fields `monthname` and `monthnameshort` must always **%s** format. TASK DETAIL https://phabricator.wikimedia.org/T313785 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: matej_suchanek, MarcoAurelio, Xqt, Aklapper, PotsdamLamb, pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, MJL, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
