[issue27232] os.fspath() should not use repr() on error

2016-10-06 Thread Berker Peksag
Berker Peksag added the comment: This has already been fixed in ea7b6a7827a4: >>> import os >>> os.fspath(None) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not NoneType -- nosy: +berker.peksag

[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- resolution: not a bug -> status: closed -> open ___ Python tracker ___

[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: No, that issue just adds the address to the repr() of types. It is not normal to use repr for type objects in error messages: >>> int(None) Traceback (most recent call last): File "", line 1, in TypeError: int() argument must be a string, a bytes-like

[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread SilentGhost
SilentGhost added the comment: This is behaviour introduced by issue 25548, it would make sense to me to discuss this problem there if you think it's necessary. repr in error messages has been a standard approach in Python for a very long time, however. -- nosy: +SilentGhost

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Removed file: http://bugs.python.org/file43239/fspath-exception.patch ___ Python tracker ___

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file43240/fspath-exception.patch ___ Python tracker ___

[issue27232] os.fspath() should not use repr() on error

2016-06-05 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: The current implementation of os.fspath() outputs something like this if you call os.fspath(0): expected str, bytes or os.PathLike object, not This patch changes the output to: expected str, bytes or os.PathLike object, not int -- components: