classification
Title: test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: methane, serhiy.storchaka, xtreak
Priority: normal Keywords: patch

Created on 2020-07-19 07:41 by xtreak, last changed 2020-07-20 03:03 by methane. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21542 merged methane, 2020-07-19 08:03
PR 21543 closed serhiy.storchaka, 2020-07-19 08:14
Messages (2)
msg373939 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-07-19 07:41
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
msg373979 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2020-07-20 03:03
New changeset 902356a7b0564e2c9659aaec56211de4d37109d0 by Inada Naoki in branch 'master':
bpo-41338: Fix DeprecationWarning in tests (GH-21542)
https://github.com/python/cpython/commit/902356a7b0564e2c9659aaec56211de4d37109d0
History
Date User Action Args
2020-07-20 03:03:12methanesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-07-20 03:03:02methanesetmessages: + msg373979
2020-07-19 08:14:02serhiy.storchakasetnosy: + serhiy.storchaka
pull_requests: + pull_request20685
2020-07-19 08:03:27methanesetkeywords: + patch
stage: patch review
pull_requests: + pull_request20684
2020-07-19 07:41:32xtreakcreate