[issue44564] DeprecationWarning in test_enum over formatting

Karthikeyan Singaravelan report at bugs.python.org
Mon Jul 5 00:24:06 EDT 2021


New submission from Karthikeyan Singaravelan <tir.karthi at gmail.com>:

It seems the line above this is wrapped under a block to check for deprecation warning but this line got missed out.

PYTHONWARNINGS=always ./python.exe -Wall -m test test_enum
0:00:00 load avg: 3.91 Run tests sequentially
0:00:00 load avg: 3.91 [1/1] test_enum
/Users/kasingar/stuff/python/cpython/Lib/test/test_enum.py:2324: 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
  self.assertEqual(OkayEnum.one, '{}'.format(OkayEnum.one))

== Tests result: SUCCESS ==

1 test OK.

Total duration: 257 ms
Tests result: SUCCESS

----------
components: Library (Lib)
keywords: newcomer friendly
messages: 396967
nosy: ethan.furman, xtreak
priority: normal
severity: normal
status: open
title: DeprecationWarning in test_enum over formatting
type: behavior
versions: Python 3.11

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


More information about the Python-bugs-list mailing list