New submission from Maor Kleinberger <[email protected]>:
As in many functions in python3, io.open_code should probably accept pathlike objects and not just path strings. Below is open_code's docstring: > Opens the provided file with the intent to import the contents. > This may perform extra validation beyond open(), but is otherwise > interchangeable with calling open(path, 'rb'). The second bit is not entirely true, as open accepts pathlike objects and open_code doesn't. Fixing this will help solve future bugs and existing bugs like https://bugs.python.org/issue39517 I'd be happy to open a pull request if it is agreed that this should be changed. ---------- components: Library (Lib) messages: 362292 nosy: kmaork priority: normal severity: normal status: open title: Allow passing Pathlike objects to io.open_code type: enhancement versions: Python 3.9 _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue39691> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
