[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

Karthikeyan Singaravelan report at bugs.python.org
Sun Jul 19 03:41:33 EDT 2020


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

Probably related to issue36346

./python -Wall -m test test_decimal  
0:00:00 load avg: 3.07 Run tests sequentially
0:00:00 load avg: 3.07 [1/1] test_decimal
/root/cpython/Lib/test/test_decimal.py:592: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  s = _testcapi.unicode_legacy_string('9.999999')
/root/cpython/Lib/test/test_decimal.py:592: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  s = _testcapi.unicode_legacy_string('9.999999')
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2834: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  s = _testcapi.unicode_legacy_string('ROUND_\x00UP')
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2828: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  c.rounding = _testcapi.unicode_legacy_string(rnd)
/root/cpython/Lib/test/test_decimal.py:2834: DeprecationWarning: PyUnicode_FromUnicode(NULL, size) is deprecated; use PyUnicode_New() instead
  s = _testcapi.unicode_legacy_string('ROUND_\x00UP')

== Tests result: SUCCESS ==

1 test OK.

Total duration: 14.8 sec
Tests result: SUCCESS

----------
components: Tests
messages: 373939
nosy: inada.naoki, xtreak
priority: normal
severity: normal
status: open
title: test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)
type: behavior
versions: Python 3.10

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


More information about the Python-bugs-list mailing list