Skip to content

Incorrect deprecation warning for 'N' specifier #114678

Closed
@skrah

Description

@skrah

Bug report

Bug description:

In the main branch, the following warning is issued whenever a fill character (possibly utf-8) either is 'N' or contains 'N':

>>> from _decimal import *
>>> Decimal("0").__format__("N<g")
<stdin>-2:1: DeprecationWarning: Format specifier 'N' is deprecated
  Decimal("0").__format__("N<g")
'0'

Fix (after applying the patches from #114563):

https://www.bytereef.org/contrib/0003-main-fix-deprecation-warning.patch

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixesextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions