This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients pablogsal, serhiy.storchaka
Date 2021-05-30.09:44:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622367850.33.0.100033596673.issue44268@roundup.psfhosted.org>
In-reply-to
Content
Non-integer numbers in GNUTranslations.ngettext() are deprecated since 3.7 (see issue28692 for rationale). But I forget to add deprecation warning for default implementation (which just tests n == 1) and forget to add the "deprecated" directive in the module documentation. So currently

    gettext("Elapsed: %s second", "Elapsed: %s seconds", 1.25)

will emit a warning if there is a translation for these strings, and no warnings if it is not translated yet, or translation file is not found, or null translation is used.

It is now time to convert warnings to errors, but it would be error-prone since many developers do not have translations yet when write a code or use no translation (and fallback to hard-coded English).

The safest way is to add deprecation warnings also for default and fallback implementation before turning all of them into errors. Pablo, can we add these warnings in 3.10?
History
Date User Action Args
2021-05-30 09:44:10serhiy.storchakasetrecipients: + serhiy.storchaka, pablogsal
2021-05-30 09:44:10serhiy.storchakasetmessageid: <1622367850.33.0.100033596673.issue44268@roundup.psfhosted.org>
2021-05-30 09:44:10serhiy.storchakalinkissue44268 messages
2021-05-30 09:44:09serhiy.storchakacreate