classification
Title: ResourceLoader.get_data() should accept a PathLike
Type: Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: barry, brett.cannon, jayyin11043
Priority: normal Keywords:

Created on 2017-12-29 15:33 by barry, last changed 2018-01-26 22:04 by barry. This issue is now closed.

Messages (6)
msg309178 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2017-12-29 15:33
Currently get_data() only accepts a string.  It should also accept a os.PathLike
msg310798 - (view) Author: Jay Yin (jayyin11043) * Date: 2018-01-26 21:25
I'm taking a look now, this looks interesting
msg310801 - (view) Author: Jay Yin (jayyin11043) * Date: 2018-01-26 21:31
this would extend to set and get data right?, also would it be good to use the current get_data() (one that reads only string) function for the overloaded one and extract the string path from the os.path object? or would we want the os.path object to be handled separately?
msg310802 - (view) Author: Jay Yin (jayyin11043) * Date: 2018-01-26 21:36
nvm I temporarily forgot I was working with python here, I'd need to use "is" to check what the entered "path" is huh?
msg310804 - (view) Author: Jay Yin (jayyin11043) * Date: 2018-01-26 21:41
I hope this isn't a dumb question but where is ResourceLoader.get_data() implemented, using ATOM to search the whole project and I can't seem to find it.
msg310808 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2018-01-26 22:04
Hi Jay.  Thanks for your interest in contributing to Python!

Actually, I'm going to close this issue since we ultimately decided to deprecate the ResourceLoader ABC:

https://docs.python.org/3.7/library/importlib.html?highlight=resourceloader#importlib.abc.ResourceLoader

I'd also suggest that if you're interested in answering your questions for the curiosity, or want to contribute to Python in other areas, you should join the python-dev mailing list.
History
Date User Action Args
2018-01-26 22:04:33barrysetstatus: open -> closed
resolution: wont fix
messages: + msg310808

stage: resolved
2018-01-26 21:41:19jayyin11043setmessages: + msg310804
2018-01-26 21:36:33jayyin11043setmessages: + msg310802
2018-01-26 21:31:36jayyin11043setmessages: + msg310801
2018-01-26 21:25:01jayyin11043setnosy: + jayyin11043
messages: + msg310798
2017-12-29 15:33:19barrycreate