Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing space in formatted currency with international=True and symbol following value #82717

Closed
Sanjo mannequin opened this issue Oct 20, 2019 · 5 comments
Closed

Trailing space in formatted currency with international=True and symbol following value #82717

Sanjo mannequin opened this issue Oct 20, 2019 · 5 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@Sanjo
Copy link
Mannequin

Sanjo mannequin commented Oct 20, 2019

BPO 38536
Nosy @malemburg, @Yhg1s, @methane, @amiremohamadi, @sanjo
PRs
  • bpo-38536: Removes trailing space in formatted currency #16864
  • 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 = <Date 2020-01-20.03:50:30.237>
    created_at = <Date 2019-10-20.08:58:32.930>
    labels = ['type-bug', 'library', '3.9']
    title = 'Trailing space in formatted currency with international=True and symbol following value'
    updated_at = <Date 2020-01-20.03:50:30.235>
    user = 'https://github.com/Sanjo'

    bugs.python.org fields:

    activity = <Date 2020-01-20.03:50:30.235>
    actor = 'methane'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-20.03:50:30.237>
    closer = 'methane'
    components = ['Library (Lib)']
    creation = <Date 2019-10-20.08:58:32.930>
    creator = 'Jonas Aschenbrenner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38536
    keywords = ['patch']
    message_count = 5.0
    messages = ['354989', '354990', '354992', '360286', '360287']
    nosy_count = 6.0
    nosy_names = ['lemburg', 'twouters', 'methane', 'SilentGhost', 'Amir', 'Jonas Aschenbrenner']
    pr_nums = ['16864']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue38536'
    versions = ['Python 3.9']

    @Sanjo
    Copy link
    Mannequin Author

    Sanjo mannequin commented Oct 20, 2019

    >>> import locale
    >>> locale.setlocale(locale.LC_ALL, ('de_DE', 'UTF-8'))
    'de_DE.UTF-8'
    >>> locale.currency(1345345345352.22, international=True)
    '1345345345352,22 EUR '

    Expected: '1345345345352,22 EUR'

    @Sanjo Sanjo mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 20, 2019
    @SilentGhost
    Copy link
    Mannequin

    SilentGhost mannequin commented Oct 20, 2019

    This isn't just de_DE locale, but any locale that puts currency symbol after the value. This issue is even "acknowledged" in the test. I'd think that appropriate fix would be to .rstrip smb on line Lib/locale.py:282
    Alternatively, function return value could be stripped.

    @SilentGhost SilentGhost mannequin added 3.8 only security fixes 3.9 only security fixes labels Oct 20, 2019
    @SilentGhost SilentGhost mannequin changed the title Trailing space in formatted currency with international=True and locale de_DE Trailing space in formatted currency with international=True and symbol following value Oct 20, 2019
    @amiremohamadi
    Copy link
    Mannequin

    amiremohamadi mannequin commented Oct 20, 2019

    Hi!
    I'm a newbie.
    Can I work on it with your help???

    @methane
    Copy link
    Member

    methane commented Jan 20, 2020

    New changeset e96d954 by Inada Naoki in branch 'master':
    bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)
    e96d954

    @methane
    Copy link
    Member

    methane commented Jan 20, 2020

    I'm not sure this fix should be backported.

    @methane methane removed 3.7 (EOL) end of life 3.8 only security fixes labels Jan 20, 2020
    @methane methane closed this as completed Jan 20, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant