GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gettext: deprecate selecting plural form by fractional numbers (part 2) · Issue #88434 · python/cpython

gettext: deprecate selecting plural form by fractional numbers (part 2) #88434

New issue
Copy link
New issue
Copy link
Closed
Closed
gettext: deprecate selecting plural form by fractional numbers (part 2)#88434
Copy link
Assignees
serhiy-storchaka
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

@serhiy-storchaka
serhiy-storchaka
opened on May 30, 2021
Issue body actions
BPO 44268
Nosy @serhiy-storchaka, @pablogsal

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-05-30.09:44:10.301>
labels = ['type-feature', 'library', '3.10', '3.11']
title = 'gettext: deprecate selecting plural form by fractional numbers (part 2)'
updated_at = <Date 2021-05-30.19:03:22.590>
user = 'https://github.com/serhiy-storchaka'

bugs.python.org fields:

activity = <Date 2021-05-30.19:03:22.590>
actor = 'pablogsal'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-05-30.09:44:10.301>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 44268
keywords = []
message_count = 2.0
messages = ['394762', '394776']
nosy_count = 2.0
nosy_names = ['serhiy.storchaka', 'pablogsal']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue44268'
versions = ['Python 3.10', 'Python 3.11']

Linked PRs

  • gh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation not found #110574

Activity

  1. serhiy-storchaka commented on May 30, 2021

    @serhiy-storchaka
    serhiy-storchaka
    on May 30, 2021
    MemberAuthor
    More actions

    Non-integer numbers in GNUTranslations.ngettext() are deprecated since 3.7 (see bpo-28692 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?

  2. serhiy-storchaka
    added
    3.10 (EOL)end of lifeend of life
    3.11only security fixesonly security fixes
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancementA feature request or enhancement
    on May 30, 2021
  3. pablogsal commented on May 30, 2021

    @pablogsal
    pablogsal
    on May 30, 2021
    Member
    More actions

    Pablo, can we add these warnings in 3.10?

    Thanks for checking! Yeah, I think it makes sense to go ahead adding these warnings to 3.10 . Please, add me as a reviewer to the backport PR to 3.10.

  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. serhiy-storchaka
    added this to Gettext issueson Jun 25, 2022
  6. serhiy-storchaka
    self-assigned this
    on Oct 7, 2023
  7. serhiy-storchaka commented on Oct 8, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 8, 2023
    MemberAuthor
    More actions

    While working on this issue I have found that stacklevel for the existing deprecation warning does is not always correct and that the code where new warnings will be added is not tested at all. So I opened a separate issue #110519 for this because these changes are worth to be backported.

  8. serhiy-storchaka
    moved this to In Progress in Gettext issueson Oct 9, 2023
  9. serhiy-storchaka
    added 2 commits that reference this issue on Oct 9, 2023

    pythongh-88434: Emit deprecation warnings for non-integer numbers in …

    7acacc1

    gh-88434: Emit deprecation warnings for non-integer numbers in gettex…

    38bd2c5
  10. serhiy-storchaka
    closed this as completedon Oct 14, 2023
  11. github-project-automation
    moved this from In Progress to Done in Gettext issueson Oct 14, 2023
  12. aisk
    added a commit that references this issue on Feb 11, 2024

    pythongh-88434: Emit deprecation warnings for non-integer numbers in …

    70f6f94
  13. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-88434: Emit deprecation warnings for non-integer numbers in …

    c47e0aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Projects

  • Gettext issues
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.