This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Deprecation warnings in test_ntpath
Type: behavior Stage: resolved
Components: Tests, Windows Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, miss-islington, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2019-06-24 23:51 by ZackerySpytz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14357 merged ZackerySpytz, 2019-06-24 23:57
PR 14366 merged miss-islington, 2019-06-25 06:50
PR 14367 merged miss-islington, 2019-06-25 06:50
Messages (6)
msg346458 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-06-24 23:51
C:\CPython\cpython>python.bat -Werror -m test test_ntpath
Running Debug|x64 interpreter...
Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_ntpath
test test_ntpath failed -- Traceback (most recent call last):
  File "C:\CPython\cpython\\lib\ntpath.py", line 518, in abspath
    return normpath(_getfullpathname(path))
OSError: [WinError 123] The filename, directory name, or volume label syntax is
incorrect: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\CPython\cpython\lib\test\test_ntpath.py", line 285, in test_abspath
    tester('ntpath.abspath("")', cwd_dir)
  File "C:\CPython\cpython\lib\test\test_ntpath.py", line 41, in tester
    gotResult = eval(fn)
  File "<string>", line 1, in <module>
  File "C:\CPython\cpython\\lib\ntpath.py", line 520, in abspath
    return _abspath_fallback(path)
  File "C:\CPython\cpython\\lib\ntpath.py", line 501, in _abspath_fallback
    cwd = os.getcwdb()
DeprecationWarning: The Windows bytes API has been deprecated, use Unicode filenames
instead

test_ntpath failed

== Tests result: FAILURE ==

1 test failed:
    test_ntpath

Total duration: 1 sec 297 ms
Tests result: FAILURE


It seems that eval() is called an extra time without a warning filter in the tester() function.
msg346486 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-06-25 06:50
New changeset 9fe42b49c79c453d905d0395150ba0607fbab18b by Serhiy Storchaka (Zackery Spytz) in branch 'master':
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
https://github.com/python/cpython/commit/9fe42b49c79c453d905d0395150ba0607fbab18b
msg346488 - (view) Author: miss-islington (miss-islington) Date: 2019-06-25 07:12
New changeset 20372d65243d5573fba17d026681a3b24d95c284 by Miss Islington (bot) in branch '3.8':
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
https://github.com/python/cpython/commit/20372d65243d5573fba17d026681a3b24d95c284
msg346489 - (view) Author: miss-islington (miss-islington) Date: 2019-06-25 07:12
New changeset 695d7ad710de17b33870d34e0fff04a31f0f3e2b by Miss Islington (bot) in branch '3.7':
bpo-37393: Fix deprecation warnings in test_ntpath. (GH-14357)
https://github.com/python/cpython/commit/695d7ad710de17b33870d34e0fff04a31f0f3e2b
msg346490 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-06-25 07:13
Thank you Zackery!
msg346531 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-25 15:02
We should also remove that deprecation warning, as PEP 528 (or was it PEP 529) undeprecated bytes paths.
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81574
2019-06-25 15:02:17steve.dowersetmessages: + msg346531
2019-06-25 07:13:22serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg346490

stage: patch review -> resolved
2019-06-25 07:12:32miss-islingtonsetmessages: + msg346489
2019-06-25 07:12:23miss-islingtonsetnosy: + miss-islington
messages: + msg346488
2019-06-25 06:50:09miss-islingtonsetpull_requests: + pull_request14184
2019-06-25 06:50:08serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg346486
2019-06-25 06:50:01miss-islingtonsetpull_requests: + pull_request14183
2019-06-24 23:57:22ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14174
2019-06-24 23:51:38ZackerySpytzcreate