[New-bugs-announce] [issue44798] test_enum emits a deprecation warning from test_custom_strenum_with_warning

Irit Katriel report at bugs.python.org
Sat Jul 31 12:32:45 EDT 2021


New submission from Irit Katriel <iritkatriel at gmail.com>:

% ./python.exe -E -We -m test -v test_enum


======================================================================
ERROR: test_custom_strenum_with_warning (test.test_enum.TestEnum)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/Lib/test/test_enum.py", line 2324, in test_custom_strenum_with_warning
    self.assertEqual(OkayEnum.one, '{}'.format(OkayEnum.one))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/iritkatriel/src/cpython-1/Lib/enum.py", line 1006, in __format__
    warnings.warn(
    ^^^^^^^^^^^^^^
DeprecationWarning: in 3.12 format() will use the enum member, not the enum member's value;
use a format specifier, such as :d for an integer-based Enum, to maintain the current display

----------------------------------------------------------------------

----------
components: Tests
messages: 398647
nosy: ethan.furman, iritkatriel
priority: normal
severity: normal
status: open
title: test_enum emits a deprecation warning from test_custom_strenum_with_warning

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44798>
_______________________________________


More information about the New-bugs-announce mailing list