Skip to content

Incorrect deprecation warning for 'N' specifier #114678

Closed

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

Activity

  1. added a commit that references this issue on Jan 28, 2024
  2. added a commit that references this issue on Jan 29, 2024
  3. serhiy-storchaka commented on Jan 29, 2024

    @serhiy-storchaka
    Member

    Thank you @skrah. I commited changes based on your patch.

  4. added a commit that references this issue on Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only 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