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

Incorrect deprecation warning for 'N' specifier #114678

Closed
skrah opened this issue Jan 28, 2024 · 1 comment
Closed

Incorrect deprecation warning for 'N' specifier #114678

skrah opened this issue Jan 28, 2024 · 1 comment
Labels
3.13 bugs and security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@skrah
Copy link
Contributor

skrah commented Jan 28, 2024

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

@skrah skrah added the type-bug An unexpected behavior, bug, or error label Jan 28, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Jan 28, 2024
…in Decimal format

Co-authored-by: Stefan Krah <skrah@bytereef.org>
@sunmy2019 sunmy2019 added the extension-modules C modules in the Modules dir label Jan 29, 2024
serhiy-storchaka added a commit that referenced this issue Jan 29, 2024
…imal format (GH-114683)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
@serhiy-storchaka serhiy-storchaka added the 3.13 bugs and security fixes label Jan 29, 2024
@serhiy-storchaka
Copy link
Member

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

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…in Decimal format (pythonGH-114683)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants