[issue26027] Support Path objects in the posix module

Martin Panter report at bugs.python.org
Fri Aug 26 21:56:37 EDT 2016


Martin Panter added the comment:

This change causes test_os to produce warnings, and can fail:

$ hg update b64f83d6ff24
$ ./python -bWerror -m test -u all -W test_os
[. . .]
======================================================================
ERROR: test_path_t_converter (test.test_os.PathTConverterTests) (name='stat', path=bytearray(b'@test_12055_tmp'))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/test_os.py", line 2865, in test_path_t_converter
    result = fn(path, *extra_args)
DeprecationWarning: stat: path should be string, bytes, os.PathLike or integer, not bytearray

Similar warnings:
DeprecationWarning: lstat: path should be string, bytes or os.PathLike, not bytearray
DeprecationWarning: access: path should be string, bytes, os.PathLike or integer, not bytearray
DeprecationWarning: open: path should be string, bytes or os.PathLike, not bytearray

----------
nosy: +martin.panter
status: closed -> open

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


More information about the Python-bugs-list mailing list