This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add errors argument to importlib.abc.Traversable.read_text
Type: Stage:
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: FFY00, brett.cannon, jaraco
Priority: normal Keywords:

Created on 2021-05-21 00:40 by FFY00, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg394088 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-21 00:40
errors should be supported by Traversable.open and is currently supported in importlib.resources.open_text, but Traversable.read_text cannot do it, making it an unsuitable replacement for open_text.
msg394089 - (view) Author: Filipe Laíns (FFY00) * (Python triager) Date: 2021-05-21 00:42
I am gonna wait until/if GH-26272 (#44196) gets merged to submit a PR because it will conflict with that.
msg394212 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-05-23 17:42
It would be straightforward to add that parameter to `read_text` but I'm uncertain if it will be needed. Since a Traversable already provides an open method which _does_ explicitly pass through keyword arguments to the underlying opener, perhaps it would be best to direct users to that interface if `errors` is needed and save supporting that parameter for `read_text` unless a user experience demands it. WDYT?
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88368
2021-05-23 17:42:07jaracosetmessages: + msg394212
2021-05-21 00:42:57FFY00setmessages: + msg394089
components: + Library (Lib)
versions: + Python 3.11
2021-05-21 00:40:18FFY00create