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.

Author FFY00
Recipients FFY00, barry, brett.cannon, eric.snow, jaraco, ncoghlan
Date 2021-10-20.23:15:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634771710.27.0.594592936094.issue45547@roundup.psfhosted.org>
In-reply-to
Content
ResourceLoader[1] is deprecated in favor of ResourceReader, which itself is surpassed by TraversableResources.

Would it make sense to replace ResourceLoader usages with ResourceReader in the importlib loaders?
And perhaps, would it make sense to replace them with the files()/Traversable protocol instead?

IMO this could simplify the code a bit, but that's subjective I guess, and better re-use the bytecode caching mechanism in SourceLoader, by providing an equivalent based on files()/Traversable instead.

This could also help push to add support for non filesystem based loaders in other parts of the code, like py_compile, which currently only supports operations on the filesystem.

Is this something we are interested in -- modernizing the importlib loaders with, arguably, better abstractions -- or do we want to keep the old protocols around?

[1] https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader
History
Date User Action Args
2021-10-20 23:15:10FFY00setrecipients: + FFY00, barry, brett.cannon, jaraco, ncoghlan, eric.snow
2021-10-20 23:15:10FFY00setmessageid: <1634771710.27.0.594592936094.issue45547@roundup.psfhosted.org>
2021-10-20 23:15:10FFY00linkissue45547 messages
2021-10-20 23:15:10FFY00create