Author William.Schwartz
Recipients William.Schwartz, barry, jaraco
Date 2021-01-11.21:00:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> For that, please submit a PR to importlib_resources and it will get synced to CPython later.

Will do once PR 23611 gets in shape. 

> Can you tell me more about the use-case that exhibited this undesirable behavior?

Using the [PyOxidizer] "freezer". It compiles Python together with frozen Python code or byte code.

> That is, what loader is it that supports `open_binary` but not `is_resource` and doesn't have a `__origin__`?

PyOxidizer's [OxidizedImporter] importer. It [does not set `__file__`] (i.e., `__spec__.origin__ is None`). Its maintainer has resolved some ambiguities in the resources API contract (#36128) [differently from CPython], but I don't think that's related to the issue I ran into. The resource-related functionality of the importer is implemented here (extension module written in Rust):

[does not set `__file__`]:
[unsure about `ResourceReader` semantics]:
Date User Action Args
2021-01-11 21:00:16William.Schwartzsetrecipients: + William.Schwartz, barry, jaraco
2021-01-11 21:00:16William.Schwartzsetmessageid: <>
2021-01-11 21:00:15William.Schwartzlinkissue42531 messages
2021-01-11 21:00:15William.Schwartzcreate