[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-29 Thread Eric V. Smith
Eric V. Smith added the comment: You can demonstrate this without the json module: # python2 >>> open(False) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found # python3 >>> open(False).readlines() The python3 version d

[issue45327] json loads is stuck infinitely when the file name is Boolean

2021-09-29 Thread Vinayak Hosamani
New submission from Vinayak Hosamani : Below snippet works fine on Python2 >>> import json >>> tc_report_file = False >>> tc_data = json.load(open(tc_report_file)) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found >>> as