Vajrasky Kok added the comment:
In test_shutil.py, yes, this is the only place. But in other tests, we got
different type of warnings, such as:
test_mailbox.py:46: RuntimeWarning: tests may fail, delete still pending for
@test_4456_tmp
test_decimal:5608: UserWarning: C tests skipped: no
Roundup Robot added the comment:
New changeset e306cf07046a by Serhiy Storchaka in branch '3.4':
Issue #20056: Fixed deprecation warning about bytes path in test_shutil on
http://hg.python.org/cpython/rev/e306cf07046a
New changeset 8480179d2a7f by Serhiy Storchaka in branch 'default':
Issue
Serhiy Storchaka added the comment:
Thank you Vajrasky.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20056
___
Vajrasky Kok added the comment:
Okay, here is the patch based on Serhiy's suggestion.
--
keywords: +patch
Added file: http://bugs.python.org/file36289/silent_warning_shutil_rmtree.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Is this the only place in tests which emits deprecation warnings on Windows?
--
assignee: - serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20056
Vajrasky Kok added the comment:
Okay, here is the problem. In Windows, you get DeprecationWarning if you pass
bytes object to method such as os.lstat.
foo.py
==
import os
os.lstat(bC:\\Users\\vajrasky\\Code\\cpython\\python.bat)
C:\Users\vajrasky\Code\cpythonpython.bat -Wdefault foo.py
Zachary Ware added the comment:
Perhaps you could change the test to catch the warning and confirm its
presence on Windows?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20056
___
Serhiy Storchaka added the comment:
with self.assertWarns(DeprecationWarning) if windows else
contextlib.ExitStack():
shutil.rmtree(victim)
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20056
Ezio Melotti added the comment:
Even if the problem is not in test_shutil, those warnings shouldn't be there.
Vajrasky, can you check if you can still reproduce this issue, and see if you
can fix it (either by converting the filenames to unicode, or by silencing the
warnings)?
--
Mark Lawrence added the comment:
The deprecation warnings are coming from the various os calls so are nothing to
do with test_shutil. I think this can be closed as not a bug.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, zach.ware
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20056
___
___
New submission from Vajrasky Kok:
You don't have to be an administrator get this deprecation warning. I am not
sure whether showing the deprecation warning is intended behaviour or not.
C:\Users\vajrasky\Code\cpythonPCbuild\python.exe Lib\test\test_shutil.py
12 matches
Mail list logo