[issue38445] os.path.exists() takes bool as argument and returns True

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a large change, so I take it. -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue38445] os.path.exists() takes bool as argument and returns True

2020-09-21 Thread Irit Katriel
Change by Irit Katriel : -- components: +IO versions: +Python 3.10, Python 3.9 -Python 3.7 ___ Python tracker ___ ___

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-14 Thread Tal Einat
Change by Tal Einat : -- nosy: -taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Eryk Sun
Eryk Sun added the comment: > Maybe os.fspath() can be used I think that would already be the case if genericpath.exists didn't have to support file descriptors. It's documented that the path argument "refers to an existing path or an open file descriptor". Modifying _fd_converter would

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Tal Einat
Tal Einat added the comment: Mariano Anaya, you're welcome to work on this and create a PR. There's no need to have this issue assigned to you: feel free to just begin working. Anyone reading this will know that you intended to work on this. (FYI, we only assign issues to core developers,

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Maybe os.fspath() can be used: >>> os.fspath(True) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not bool -- ___ Python tracker

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eryk, I think testing for bool in _fd_converter and issuing a warning is a good idea. Do you want to create a PR? -- nosy: +serhiy.storchaka ___ Python tracker

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Eryk Sun
Eryk Sun added the comment: Note that the underlying stat call supports file descriptors, which are non-negative integers. This is a supported and tested capability for genericpath.exists (see GenericTest.test_exists_fd in Lib/test/test_genericpath.py). False and True are integers with the

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Mariano Anaya
Mariano Anaya added the comment: Hi, I would like to take a look at this issue. Could someone please assign it to me? Thanks -- nosy: +Mariano Anaya ___ Python tracker ___

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Nika
New submission from Nika : os.path.exists() accepts either True or False as argument and returns True. Reproducible on Windows, e. g., in jupyter notebook or in Eclipse, although not in IDLE, which returns False, as expected. import os print(os.path.exists(False)) -- messages: